Operating System - HP-UX
1752806 Members
5577 Online
108789 Solutions
New Discussion юеВ

remshd and rcp work intermittently

 
Cameron┬аMacDonald
Frequent Visitor

remshd and rcp work intermittently

Hi

I am hoping that someone can help with an oddity on one of our systems. The system is running HP-UX B.11.23 and we have had a script that synchronises files with another system running the same OS. Recently the rcp and remsh commands that we run overnight as a cron job have been failing. Unfortunately we are not sure how long this has been failing for.

An example of the issue is as follows ...

# remsh es-serv2 hostname
remshd: Login incorrect.
# remsh es-serv2 hostname
remshd: Couldn't look up address for your host
# remsh es-serv2 hostname
es-serv2
# remsh es-serv2 hostname
remshd: Login incorrect.
# remsh es-serv2 hostname
remshd: Login incorrect.
# remsh es-serv2 hostname
remshd: Couldn't look up address for your host
# remsh es-serv2 hostname
es-serv2
#

As you can see the remsh has worked 2 times out of seven. The name resolution is done through the hosts file and a .rhosts file is in place. This has worked for years without issue.

The only changes that we have made to our system is that we have added some iSCSI targets and to facilitate this have installed the iSCSI initiator along with 2 NICS and APA software to bond the NICs together.

This problem doesn't seem to manifest itself on the second system... Yet

Can anyone please help with this


Regards

Mac....

P.S Apologies if this is posted in the wrong place or formatted incorrectly but this is the first time I have posted anything on a forum as always been able to Google an answer!
5 REPLIES 5
Mel Burslan
Honored Contributor

Re: remshd and rcp work intermittently

My vote on this one is on the network side. Since you mentioned installing 2 new NICs with APA. I am not sure if your APA is configure in failover mode or fat-pipe mode, if one of the two interfaces are not connected to the right VLAN on the switch side, this might happen.

Please ask your network admins to put a sniffer on both ends of this connection and run the same scenario while they capture packets, before you start pulling your hair. The results can show you a very obvious error that you might be overlooking or may tell the network people that their switch ports are not configured properly.
________________________________
UNIX because I majored in cryptology...
Bill Hassell
Honored Contributor

Re: remshd and rcp work intermittently

Check the /etc/nsswitch.conf file. If dns is first, my vote is that you have a flaky DNS connection or server. You can verify this by adding the IP address to the .rhosts file on the es-serv2 machine. If everything works then you have a bad (overloaded?) DNS server. You can also verify the problem by changing nsswitch.conf from: dns then files, to: files then dns on the remote server. Be sure to add the IP address of the local system to the remote /etc/hosts file.


Bill Hassell, sysadmin
Cameron┬аMacDonald
Frequent Visitor

Re: remshd and rcp work intermittently

Bill, Thanks for the reply. Fairly sure not DNS issue as system resolving through hosts file first and a ping has no problem resolving the name.


Mel, This was my initial thought but I ruled this out as I would have thought that if it was a network/routing issue that it would still managed to resolve the name through the hosts file. But having said that I have seen stranger things happen and I suppose the errors seen might be red-herrings so to speak. Will have a look-see at the network traffic as you suggest as see what the results are
Cameron┬аMacDonald
Frequent Visitor

Re: remshd and rcp work intermittently

Mel,

Network checks didn't turn up anything. Had a thought and tried changing the script to use ssh instead of remsh and scp instead of rcp. Once I had set-up the security on the systems there weren't any errors. Can only assume they do there resolution differently. I know it doesn't solve the initial problem and would still like to know what it is but at least the scripts are running error free now.

Thanks to both yourself and Bill for your replies

Regards

Mac....
Cameron┬аMacDonald
Frequent Visitor

Re: remshd and rcp work intermittently

Using ssh and scp instead of remsh and rcp stopped the errors. Not a fix so much as a get round!!