Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ftp problem

Status
Not open for further replies.

rachanta

Programmer
Apr 25, 2002
16
0
0
US
Hi:

I have two exactly identical servers (SUN E 250 solaris 2.6)on my network and I see some strange behavior with one of the servers. Actually these two work as ftp servers. From a different server we run an automated perl ftp program looks in x,y,z directories on the above remote servers and transfer the files to the third local server, The files initially are copied to above x.y,z directories from different source.
On successful ftp transfer the script also renames the original files on the ftp servers.
Now the problem is on one of the servers the script finds the file (as per my logs) but by the time it transfer the file dissapears and ftp completes with a failure note.I don't see any trace of the file on both local and remote servers. The original files no more exists on the servers. There is no other program running parallel on the system.

When we copy the files physically to the x,y,z directories the ftp script picks the files with out any problems.
When we swap the above two ftp servers we see this problem with one even though both are identical in all means.
How to diagnose this behaviour?

I sincerely appreciate your help.

Ram
 
Probably your ftp traffic is blocked or do not work in one of the directions (try first manually). If that is the case, then check whether the ports are blocked in a firewall or switch, or in the server.

If that is not the case, check the permissions in the target directory, and that you can actually can write there.

If manual ftps using the same parameters works, then your script should work as well.

Marcos.
 
Hi Macros:

I appreciate your response but in my case you know the directory permissions are identical and I even see some odd behaviour some times if we manually copy the files to those pick up directories we don't see any problem with ftp process but when the files are placed with a script then have a problem and the more interesting thing is the files gets deleted. Tell me under what circumstances the original files get deleted besides having something done similar in my perl program? In my script I just rename the original file in it's location after successful transfer. I even capture screen shots (ls -l) on pickup directories I see the files disappeared with the mentioned ftp call by the cron job.



Thanks,

Ram

 
Ram, are you sure the cron job is picking up the correct environment variables to enable your script to work? If not, you can add PATH etc variables explicitly and (hopefully) it will work. Best wishes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top