Operating System - HP-UX
1819814 Members
4187 Online
109607 Solutions
New Discussion юеВ

Re: FTP problem - invalid argument: getpeername

 
Ravinder Singh Gill
Regular Advisor

FTP problem - invalid argument: getpeername

Trying to FTP, but instantly gets a message saying connection refused by remote host. On remote host syslog shows entries like the following message. Can anyone advise?

Jul 15 15:50:09 inetd[9340]: registrar/tcp: Connection from (ipaddress) at Fri Jul 15 16:19:07 2005

Jul 15 15:50:09 ftpd[9339]: getpeername (ftpd): Invalid argument
8 REPLIES 8
Ravinder Singh Gill
Regular Advisor

Re: FTP problem - invalid argument: getpeername

Is anyone able to advise please?
Mel Burslan
Honored Contributor

Re: FTP problem - invalid argument: getpeername

is ftpd running fulll time on your server or is it inetd initiated ?

could you please provide output from

ps -ef | grep ftpd

While you are ftp ing to this server from a remote host

also output of

grep ftp /etc/inetd.conf



________________________________
UNIX because I majored in cryptology...
Ravinder Singh Gill
Regular Advisor

Re: FTP problem - invalid argument: getpeername

percival:/etc# ps -ef | grep ftpd
root 16446 4507 0 17:09:08 pts/2 0:00 grep ftpd
root 16374 1310 0 17:08:44 ? 0:00 ftpd: : root: IDLE
percival:/etc#
Ravinder Singh Gill
Regular Advisor

Re: FTP problem - invalid argument: getpeername

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -u 111
Ravinder Singh Gill
Regular Advisor

Re: FTP problem - invalid argument: getpeername

Any ideas?
Mel Burslan
Honored Contributor

Re: FTP problem - invalid argument: getpeername

well, since your ftpd is not running with some exotic switches, the only question is how many firewalls do you have between this client and this server and who is in charge of those firewalls.

The error you are getting getpeername:Invalid argument, implies that the socket connection ftpd is expecting to find is getting closed immediately, even before this getpeername call gets executed. I do not think that your server is doing it. The only other option is to look for the restrictions in the firewall.

Are you able to successfully establish ftp sessions from other clients to this server or is it the response to ftp request coming from anywhere ?

try ftp'ing from a neighboring node while watching the syslog. By neighboring node, I am implying something like this :

ftp server ip : 192.168.100.40
ftp client ip : 192.168.100.x

where netmask is 255.255.255.0, i.e., on the same subnet so that we should not worry about any cross network routing hence eliminating firewall blockage possibilities.

also you can change your ftp line in your inetd.conf file to something like this:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -Llu 111

for more extensive logging. Then

inetd -k
inetd -l

then try the ftp while on a separate window, running

tail -f /var/adm/syslog/syslog.log

________________________________
UNIX because I majored in cryptology...
Ravinder Singh Gill
Regular Advisor

Re: FTP problem - invalid argument: getpeername

This is happening when someone is trying to connect to the server from another company. If I ftp to the server from one of the servers in our company (different site) it works fine.
Mel Burslan
Honored Contributor

Re: FTP problem - invalid argument: getpeername

which emphasizes my firewall issues possibility. There is a loss of socket connection between the client and the server.

I do not believe you can do anything unless you are the firewall administrator at the same time. And even if you are, I do not have any experience in the firewalls to tell you want to do.

Bring the issue up to the attention of your firewall admins as quickly as possible if this is a production issue.
________________________________
UNIX because I majored in cryptology...