Solved

Command Line FTP Not Working

Posted on 2009-05-09
5
646 Views
Last Modified: 2013-12-16
Hi All,

I found a problem today on my cron servers running EL5 my monthly upload scripts stopped working for all FTP uploads to the live external servers.

I am run FTP commands manually today and it seems /usr/bin/ftp is not working in fact using netstat it now even leaving cron servers. I have checked every thing i can think of but it just will not open a connection live servers running proftd via inetd.

It really bugging me because i can FTP on command line through windows box and connect to our hired server but i can not connect from cron boxes at all. So i tried connecting from cron servers from FTP command to my friends servers in USA no problem worked OK am i missing some thing here can any one help me with this odd problem?

Regards

Darren
0
Comment
Question by:Darrennew
  • 2
  • 2
5 Comments
 

Expert Comment

by:tuanle55
ID: 24345337
Can you clarify what the "error message" is or what exactly you mean by what is not working?  Check your FW settings.  Run traceroutes and ping test from both the client and servers.  Check if IPTABLES or SELINUX is enabled.  Try rebooting y our Linux box as well.
0
 
LVL 1

Author Comment

by:Darrennew
ID: 24345486
HI

I get no error message just get timeout.

SE Linux is disabled all firewall is OK.

I can ftp to hired server with my windows box so the connection through my gatway firewall to hired server is fine.

I have also rebooted the box as well.

I can connect to my Friends server and uploads.google.com from the cron boxes the problem is i can't connect to the hired server from cron boxes this is what is baffling me why i can't.

surely if i can connect to another ftp server from cron servers then i should be able to connect to hired live server?

Also remembering i can also connect using ftp command from windows xp to the hired server connects on problems.

I wondering if it a ftp session probem ? unsure seems very odd don't you think

Regards

Darren
0
 
LVL 5

Expert Comment

by:0ren
ID: 24345689
are there any logs ?
try to add at the end of the crontab line "> logfile 2>&1" and check the log later ( or just check cron logs )
you should make sure all commands and paths on scripts running from crontab have full path.
0
 
LVL 5

Expert Comment

by:0ren
ID: 24345735
run the following and post the output

grep ftp /etc/services
grep ftp /etc/hosts.deny
grep ftp /etc/hosts.allow
getenforce
chkconfig --list | grep ftp

maybe it will help
0
 
LVL 1

Accepted Solution

by:
Darrennew earned 0 total points
ID: 24345821
Hi all,

Very strange but its working now what happened is i did purchase a second ip address the first ip was ending xxx.xxx.x.244 and the new on is xxx.xxx.x.24 reasons was for SSL certs i don'e if this is a problem wih 1and1 cisco firewalls? change ftp xxx.xxx.x.24 will not connect but ftp xxx.xxx.x.244 connects OK but windows of GUI FTP client can connect on any of two IPs i have never had this sort of problem before very strange!.

Thanks for all your imput  I try and issue you some All points for you input two or three minds are better than one once again many thanks


Darren
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now