- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ftp: connect: Connection timed out
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 10:59 PM
тАО11-18-2010 10:59 PM
Question:
I have a server that has on its crontab 2 entries in which are scripts that sends data by ftp to another server. But this target server is currently switched off (down). I┬┤m seing inside some files in /var/spool/cron/tmp some files with the message "ftp: connect: Connection timed out". And this files on this directory are very big they are filling up /var. Would it be possible that these connection timed out be the culprit, causing /var to fill up?
I appreciate your help if you can.
Regards
F.R.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 11:25 PM
тАО11-18-2010 11:25 PM
Re: ftp: connect: Connection timed out
Best regards,
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 11:29 PM
тАО11-18-2010 11:29 PM
Re: ftp: connect: Connection timed out
Find the large files in /var , and check for yourself if these files are the culprit :
cd /var
find . -xdev -size +100000000c -print
(this will print file in /var > 100Mb in size)
Reg,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 11:34 PM
тАО11-18-2010 11:34 PM
Re: ftp: connect: Connection timed out
Hi all
Horia: I have just commented out the entries of the ftp.
I├В┬┤m new into the company, I cannot just go and change stuff, but I├В┬┤ve done it.
the big file in /var are indeed in /var/spool/cron/tmp.
But the question still remains: does this ftp├В┬┤s connection timed outs are they the ones that causing /var to fill up?
regards
F.R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 11:42 PM
тАО11-18-2010 11:42 PM
Re: ftp: connect: Connection timed out
It is hard to tell at this point.
Most of the logging is kept in /var/adm.
This directory (and sub directories from it) should be monitored permanently by you (or the designated admin of the server).
Check /var/adm/syslog/syslog.log, etc....
Best regards,
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 11:51 PM
тАО11-18-2010 11:51 PM
Re: ftp: connect: Connection timed out
Noting suspicious on syslog.log, but those files in /var/spool/cron/tmp/ for example (croutSMCa01568) the very end of it (tail)contain the following:
ftp: connect: Connection timed out
ftp: connect: Connection timed out
lots of this entries.
regards
F.R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2010 02:16 AM
тАО11-19-2010 02:16 AM
Re: ftp: connect: Connection timed out
You could try to redirect cron jobs outputs
(with:
> /dev/null 2>&1
)
to /dev/null, to a file in /tmp, or to whatever your device has more space.
You can safely delete those files from /var/spool/cron/tmp.
Best regards
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2010 02:21 AM
тАО11-19-2010 02:21 AM
Re: ftp: connect: Connection timed out
I have been deleting them, then I have to use lsof to kill the processes of those deleted files.├В┬┤
I have commented the entries in cron related to ftp to the dead machine and so far so good, /var has not grown, but I am monitoring.
regards
Fernando
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2010 02:01 PM
тАО11-19-2010 02:01 PM
Re: ftp: connect: Connection timed out
My first guess would be, each of these files is collecting input from an instance of a cron job. When the job would finish, the cron daemon would use the file to mail the output to the job's owner.
Trouble is, although the target FTP server is down, the jobs are not giving up, but seem to be retrying again and again. And the cron daemon will most likely keep restarting new instances of the same jobs, until you do something. (A variant of "sorcerer's apprentice syndrome", I think.)
Depending on how often the cron jobs are scheduled, your process table might eventually become completely filled with cron job processes. At that point, no new processes can be started... which also means no one can log in to fix the problem. If it gets that bad, the only way to fix it may be to TOC the system.
Before removing those files, use the "fuser" command on them. Check out the process IDs listed: if they are related to those cron jobs, kill the processes. At that point, the files may seem to vanish on their own (because the cron daemon will be submitting them to sendmail, which will probably push the contents first to /var/spool/mqueue, and eventually to the job owner's mailbox).
If the files are already so large the attempt to mail them would cause problems, you might want to truncate the files instead of deleting them before killing the process that is holding the file.
The simplest "command" to truncate a file is to use the output redirection operator with no command, like this:
> /var/spool/cron/tmp/bigfile
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2010 09:42 PM
тАО11-19-2010 09:42 PM
SolutionIt would help if you mentioned this was a continuation of your other thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1455899
>I have just commented out the entries of the ftp.
Then you also have to kill the current jobs that are doing ftp.
>does this ftp's connection timed outs are they the ones that causing /var to fill up?
>the very end of it contain the following:
>ftp: connect: Connection timed out
>lots of this entries.
If you see that many messages in the cron jobs output, yes.
>Horia: You can safely delete those files from /var/spool/cron/tmp.
Not if the job is still running.
>then I have to use lsof to kill the processes of those deleted files.
Right. That should show you the process trees to kill.
>I have commented the entries in cron related to ftp to the dead machine and so far so good, /var has not grown
It looks like you have solved it.
>MK: the cron daemon will most likely keep restarting new instances of the same jobs
cron(1m) just starts jobs when you tell it. It knows nothing about restarting like init. Any retrying would be done by the jobs itself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2010 09:53 AM
тАО11-21-2010 09:53 AM
Re: ftp: connect: Connection timed out
Yes Dennis although I have closed that thread it is a continuation of the one you mention, because it was really bugging me until I put a comment on those ftp entries on the crontab. That realy solve my problem, since friday everthing is fine, and I have my sundays with no phone calls from office...
Thank you all for the support. I will assign some point as always.
regards
F.R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2010 04:17 AM
тАО11-22-2010 04:17 AM