getpeername: Transport endpoint is not connected

Hi Folks,
I am getting the following error in /var/adm/messages. Can any one help me out on this?

ZXXXXXA:/# tail /var/adm/messages
Oct 26 00:13:04 ZXXXXXA ftpd[642]: [ID 582979 daemon.error] setsockopt SO_KEEPALIVE Invalid argument
Oct 26 00:13:04 ZXXXXXA ftpd[642]: [ID 344536 daemon.error] setsockopt (SO_OOBINLINE): Invalid argument
Oct 26 00:13:04 ZXXXXXA ftpd[642]: [ID 213165 daemon.error] fcntl F_SETOWN: Connection reset by peer
Oct 26 00:13:37 ZXXXXXA ftpd[1212]: [ID 572618 daemon.error] getpeername: Transport endpoint is not connected
Oct 26 00:13:54 ZXXXXXA ftpd[1331]: [ID 572618 daemon.error] getpeername: Transport endpoint is not connected
Oct 26 00:16:26 ZXXXXXA ftpd[3455]: [ID 572618 daemon.error] getpeername: Transport endpoint is not connected
Oct 26 00:19:50 ZXXXXXA ftpd[6093]: [ID 572618 daemon.error] getpeername: Transport endpoint is not connected
Oct 26 00:42:17 ZXXXXXA ftpd[23209]: [ID 572618 daemon.error] getpeername: Invalid argument
Oct 26 02:08:33 ZXXXXXA ftpd[28552]: [ID 572618 daemon.error] getpeername: Transport endpoint is not connected
Oct 26 02:10:31 ZXXXXXA ftpd[70]: [ID 572618 daemon.error] getpeername: Transport endpoint is not connected
ZXXXXXA:/#
1 Like

Maybe instantly aborted connections. It seems like you should not run getpeername on anything but an accepted tcp connection socket fd, and once it has gotten to the accept stage, we have a packet with the other end's IP. Maybe if the connectioon closes (FIN flag packet), it refuses to use that IP. I don't expect ftpd code to be silly enough to getpeername on a listening or pre-accept socket. It's just an opportunity to tell you a connection died, getpeername was just the first chance it had to notify you with this preemptively important message. Of course, he knows the former peer Ip and could look it up. Too many may be a denial of service attack.

1 Like

Thanks vivek i have the same issue..

Hi DGPickett,

I get the same error,

""Oct 18 23:00:55 App2 ftpd[23406]: [ID 572618 daemon.error] getpeername: Transport endpoint
is not connected.""

I am very new to systems and softwares,
could you explain more in this pls??

why this error and what would have actually occurred? and how this can be rectified?

Is it a problem in FTP connection between two machines?
just by making sure the correctness of the FTP connection can we get rid of this error?

could you please respond quickly?

Thanks in Advance,,

Here is the packet by packet: A client sends a TCP syn bit packet from his socket to a listening socket on a server. The server sends a syn-ack packet back and sets up a connection filter to divert this clients packets to a child socket that is now considered possible 'connected' to the client, so the listener just gets new connection packets. Middle packets are just ack packets, as I recall. When idle, keep-alive packets are sent, to ensure timers do not expire saying there is a disconnect. Sometimes routers delete and fake these to reduce traffic! Either end could send a fin packet to close it, and expects a fin-ack packet back in response. If a code bit gets a stale socket, and asks for the peer name (remote ip and port), while the information is probably available, the fact that the connection is closed is deemed a more appropriate response -- no point beating a dead horse, as it were.

1 Like