From: Frank S. <fst...@bi...> - 2024-08-08 14:02:46
|
Hi Steve, thanks a lot for caring! Steve Dickson wrote: > Why not just set the static port through something like /etc/nfs.conf? The code for the remote uptime server isn't aware of /etc/nfs.conf, so I can't use that, unfortunately. >> /* transp = svctcp_create(RPC_ANYSOCK, 0, 0); */ >> /* my code added: */ >> int sd; >> struct sockaddr_in sin; >> sd = socket(AF_INET, SOCK_STREAM, 0); >> bzero(&sin, sizeof(sin)); >> sin.sin_family = AF_INET; >> sin.sin_addr.s_addr = INADDR_ANY; >> sin.sin_port = htons(62222); >> bind(sd, &sin, sizeof(sin)); >> transp = svctcp_create(sd, 0, 0); >> /* end of my code added */ > > Looks reasonable... but where did you come up with 62222? > Are you sure it is not already being used? That was just an arbitrary one. I started with 852 which was used in the past, then thought it might be a problem with ports < 1024 and used different values above 60000. But it's always the same problem no matter which port number I try. > Just curious... is systemd involved with anything? Yes, the systems are running systemd, and rpcbind is started via rpcbind.service and rpcbind.socket. Is it possible that the rpcbind daemon expects sth. different from the uptime server for opening a fixed port, and refuses to open the tcp port because my patched code is talking some "too old" standard? However, there is no indication in the journal, i.e. no message at all from rpcbind, though, even not when starting it in debug mode. > Yeah it is not obvious as to why this is happening... Again I would > look at systemd "helping out" and make sure the port is not already > be used. I'm not sure I understand the comment about systemd: Do you mean it might somehow prevent opening the port by some security restrictions or similar? I stopped the rpcbind daemon (including rpcbind.socket) and started it manually, but still the same error... -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * |