Server moved, new IP, broken CRON job


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Server moved, new IP, broken CRON job
# 1  
Old 04-04-2008
Server moved, new IP, broken CRON job

Due to downsizing and attrition, I have inherited SysAdmin tasks, but unfortunately not all the required knowledge and skills came to me along with the assignment -> so I appreciate any advice and help ( be patient with my newbie terms and questions).

We moved a central server and changed it's IP address. Now a Cron job running on another server is broken.

here are the details:
*********************************

Need help with broken CRON task.

History:

We recently moved a server (name “ntpinet” )and had to change its IP address. A Cron job running on another server (name “mfg-02”) stopped working at that time.

Here is the Cron job that is attempting to run:

Code:
/usr/bin/rsync -e /usr/bin/ssh -I /root/.ssh/id_rsa -z -u -t --recursive root@ntpinet.inse.lucent.com: /usr/local/apache/htdocs/transfer/mfg02/home/samba/share/MAC.dat /home/sanmina/

This CRON should pull the updated MAC.dat file from the /usr/local/apache/htdocs/transfer/mfg02/home/samba/share/ directory on your machine ntpinet to the /home/sanmina/ directory on mfg02 .

I checked the file in that directory on ntpinet and it is up to date.

The id_rsa key file is from May 27, 2005 so maybe it is out of date and the rsync command is being rejected?


Steps tried:

1) had suggested that I remove the ntpinet entry on mfg02 from the known_hosts file and it would regenerate the key when it tried ssh to ntpinet the next time.
Removed the entry, but did not seem to regenerate the key

I looked at the known_hosts file on ntpinet under /root/.ssh and the mfg02 machine doesn't seem to be there.

So, I copied back the original known_hosts file on mfg02 and then edited the IP address in there to add the new ip address and name ntpinet server. So I made that one change on mfg02 , adding ntpinet to the known hosts file on mfg02.

2)
When I try to run the script manually, it hangs and finally gives the following timeout message.
Code:
[root@mfg02 ]# /usr/local/scripts/rsync.sh
ssh: connect to host ntpinet.inse.lucent.com port 22: Connection timed out
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)

Maybe I need to gen a new rsa_id script on ntpinet or mfg02 marlboro. I noticed ntpinet had a dsa_id but no rsa_id.

*******************************

Help !

Last edited by Yogesh Sawant; 04-04-2008 at 10:12 AM.. Reason: added code tags
# 2  
Old 04-04-2008
Sounds like dns resolving is broken - this host - ntpinet.inse.lucent.com - can't be resolved correctly by the client, in your case "mfg-02". This could be either : hard-coded instead of dynamic DHCP issue, i.e. client is still trying to connect to the server based on the old IP, or connection to this server, SSH one on port 22 is simply broken. Try using the IP address instead of the hostname.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

2. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

3. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

4. UNIX for Advanced & Expert Users

cron job to extact lines from files to another file and ftp to new server

i have a text file in this format: which creates a new one everyday in the form of filename _zing__r200_2012_8_10_log.txt Fri Aug 10 07:29:17 EDT 2012, usera(192.168.0.245) to anotheruser: hey top, this is a private test Fri Aug 10 07:29:28 EDT 2012, anotheruser(192.168.0.245) to usera: got... (2 Replies)
Discussion started by: bkkid
2 Replies

5. Shell Programming and Scripting

Script that will be a cron job to export rrd files for cacti server

I wrote a quick little script that will eventually end up as a cron job to export rrd files for my cacti server. Here is the script: #!/bin/bash rm -rf /backup/cacti_xml/* cd /var/www/html/rra ls -1 *.rrd | awk '{print "rrdtool dump "$1" > /backup/cacti_xml/"$1".xml"}' | sh -x Is there... (5 Replies)
Discussion started by: TheBigAmbulance
5 Replies

6. UNIX for Dummies Questions & Answers

Keep Server Alive with Cron Job

Despite my best efforts, my media streaming server still dies sometimes and I am in a random place trying to ssh into the server to restart it on my cell phone after customers start calling.... I tried using google to track down a script that would do the following Every 5 min execute: sudo... (1 Reply)
Discussion started by: ajhalls
1 Replies

7. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

8. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

9. Shell Programming and Scripting

Something about a cron job

Hi, I am kind of new to Unix world and my job requires me to collect the information about the system calls a process is making. I need to write a script which gets into action every nite at 10:00 pm and runs tills 10:10 pm and does the following things: 1. Get the process id for a running... (3 Replies)
Discussion started by: Tyche
3 Replies

10. UNIX for Dummies Questions & Answers

CRON Job - saving to a different server?

Thanks for the all the help last evening on CRON jobs. It's now working. Is it possible with cron to save a backup of a file to a different server or location? The idea being that if one host goes arse over tit, I'll have a backup of the DB on another server? Many thanks, Ed Ludlow (3 Replies)
Discussion started by: eludlow
3 Replies
Login or Register to Ask a Question