1831321 Members
3014 Online
110023 Solutions
New Discussion

ftp error message

 
steven Burgess_2
Honored Contributor

ftp error message

I have been advised of an error message after an unsuccesful ftp from our mainframe to one of my unix servers. Is there any where i can get a list of ftp errors?

message is

18:04:36 Lost connection with remote server, RC = 4
18:06:37 PASV command failed or timed out
18:06:37 USERFTP: stat

Thanks in advance



take your time and think things through
16 REPLIES 16
harry d brown jr
Honored Contributor

Re: ftp error message

In your syslog log file, and depending upon the ftpd options you use in /etc/inetd.conf. Do a man on ftpd to determine if you need to add more options.


live free or die
harry
Live Free or Die
Ron Kinner
Honored Contributor
Stefan Farrelly
Honored Contributor

Re: ftp error message

Looks like the TCP stack on the mainframe is having trouble keeping a constant connection while the ftp is going on.

Try running a ping to the mainframe from a different window/shell while the ftp is running. The ping will help to maintain the connectiong and may thus enable the ftp to complete.
Im from Palmerston North, New Zealand, but somehow ended up in London...
eran maor
Honored Contributor

Re: ftp error message

Hi

you can see all the ftp error in the syslog

/var/adm/syslog/syslog.log

if you want you can config the syslog to redirect error about ftp to a diff file .

the conf file of the syslog is : /etc/syslog.conf
love computers
Craig Rants
Honored Contributor

Re: ftp error message

You will have to make sure that inetd is set up for logging. In /etc/rc.config.d/netdaemons
check for INETD_ARGS="-l". If that's not set, you must set it then restart inetd, /sbin/init.d/inetd stop/start

Are you trying some sort of proxy ftp? What type of ftp are you trying to accomplish.

GL,
C

"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
steven Burgess_2
Honored Contributor

Re: ftp error message

I have looked at the syslog, can see the user
logging in but no errors, only the session from the mainframe generated the error message

Harry, ftpd ? Is this used instead of ftp and allows you to use options

If i attempt
/usr/lbin/ftpd -T

I get nothing, presume I'm doing this wrong

Please advise

Thanks


take your time and think things through
steven Burgess_2
Honored Contributor

Re: ftp error message

what entry do I need to put in the syslog.conf
file for it to redirect ftp errors elsewhere


take your time and think things through
Sanjay_6
Honored Contributor

Re: ftp error message

Hi Steven,

you can enable ftpd to use ftpaccess. You can then configure the log file in ftpaccess. you can specify the name of the file you want to log to and also the type of accounts for which you want to log ftp information. If you don't want to use ftpaccess, you can log all ftp transfers etc in syslog.log if you run ftpd with -L option. To do this you have to modify the /etc/inetd.conf file and then ask the system to reread the same using "inetd -c". Do a man ftpd and man ftpaccess to get more info on how you can configure ftpd to log info and on how you can use ftpaccess to configure ftp access and what level of logging you want.

Hope this helps.

Regds
Ron Kinner
Honored Contributor

Re: ftp error message

Steve, the program you use on a PC to start an ftp session with a server is ftp. The program which has to be running on the server in order to accept an ftp connection is ftpd.

You control ftpd options from the file: /etc/inetd.conf
There should be a line in there that looks like this:
ftp stream tcp nowait root /usr/lbin/ftpd ftpd

If you look at man ftpd
http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90681&service=hpux&path=../B2355-90681/00/01/110&title=HP-UX%20Reference%20Volume%202%3A%20Section%201M

you will see that you can add options to get it to log more info. -l, -v, -L, -i, and -o
are useful.

Believe you have to do
inet -c
to get it to reread the file so your changes will take effect.

However, when we had our ftp problem none of the options helped. What did help diagnose the problem was a ping. Not the simple little ping generated by default but a larger ping with a payload of better than 1500. Up to 1500 we had no problems but over 1500 we started missing pings. The ping was generated by an externa source. In this case a cisco router. Pinging the one machine worked perfectly but the other machine showed errors. Lanadmin and netstat -s did not show anything wrong. Turned out the NIC was sensitive to electromagnetic radiation and that this was a known issue. Thanks to Sanjay we found the problem.

Ron

Rita C Workman
Honored Contributor

Re: ftp error message

Well this may be off base...but since I have ftp jobs with mainframes...what the heck.

I might ask a couple questions:

Is this an automated ftp?

Have you ftp'd to/from the mainframe successfully before on this job?

Is it possible the password on the mainframe side has changed (or is requiring a change)? And your .netrc file is not in sync with that password?????

Just a couple things to check and rule out,
Rita

Mark Greene_1
Honored Contributor

Re: ftp error message

A list of ftp errors can be found in the man page for ftpd; I am not sure if this list is completely exhaustive for HP-UX.

A few things to check for ftp'ing to a mainframe: verify the default mode for prompting as it may or may not be interactive, and add the "prompt" command to your ftp script accordingly; also add the "hash" command to your script to generate some tcp traffic back to your system during the file transfer which may make a difference for being able to sustain the connection.

HTH
mark
the future will be a lot like now, only later
Dave La Mar
Honored Contributor

Re: ftp error message

Steven -
You didn't mention the mainframe OS but I'll give it a shot.
Our mainframe is VM/VSE. We send to HP-UX, NT, Linnux, etc.
The error codes for tcpip errors on the mainframe should be documented in the product guide for the mainframe ip product.
(We happen to use BSI's TCPIP product.)
Addtionally, errors are loged to syslst on the mainframe.
Our automated mainframe ftp jobs create a listing in which errors/successes are noted.

Best of luck.
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Justo Exposito
Esteemed Contributor

Re: ftp error message

Hi,

We do ftp from IBM 390 to HP/UX 11.0 and we can do it if we put the 390 user as root, but we can do it if don't with similar error, try to put the ftp user as root in your system.

Regards,

Justo.
Help is a Beatiful word
steven Burgess_2
Honored Contributor

Re: ftp error message

Sanjay, thanks for the update with regard to inetd.conf I have added -v to the option and requested the job to be run whilst in the syslog with a tail -f. All ran ok

Our m/frame operating system is VM, the initial error was reported by the tcp/ip product we use

The job is due to run 'automatically' in 15 mins so i'm going to monitor and see what happens

Thanks everyone for your input, ill report back in about an hour
take your time and think things through
steven Burgess_2
Honored Contributor

Re: ftp error message

Also

I can't ping the server because it's on the other side of our firewall (ftp server)

The inetrc file is ok as the initial log in has worked, the session was lost after 5 seconds
take your time and think things through
steven Burgess_2
Honored Contributor

Re: ftp error message

job has run ok!!!!

take your time and think things through