Operating System - HP-UX
1748092 Members
5975 Online
108758 Solutions
New Discussion юеВ

Re: Remsh not working for specific commands.

 
Sudheesh Varma VK
Occasional Advisor

Remsh not working for specific commands.

I have a strange issue with remsh commands in my HPUX servers with OS version 11.11 .

I have set up of sevrers with running remote shell commands between HPUX servers at three diffrent Datacenters. I am suddenly started facing some issues with remsh commands between two datacenters.
Below command get stucked and never comes out.

host2DC2# remsh host1DC1 grep -i Rebooting /tmp/DR.log

Also
host3DC1#remsh host4DC2 grep -i Rebooting /tmp/DR.log

Above comandsThese never comes out .
Not all remsh commands gets hanged , for example host3DC1#remsh host4DC2 date
works fine.
All servers in three servers are in same domain.
Another thing to point is the servers which shows this issue not showing any issue with third datacenter servers. There I get proper results.
The issue due to this is multiple important scripts get hunged and that creates production issues.

I would request any one please help me on this ??
13 REPLIES 13
Pete Randall
Outstanding Contributor

Re: Remsh not working for specific commands.

Try

remsh host1DC1 -n "grep -i Rebooting /tmp/DR.log"


Pete

Pete
Sudheesh Varma VK
Occasional Advisor

Re: Remsh not working for specific commands.

same result , never get a output.
Eric SAUBIGNAC
Honored Contributor

Re: Remsh not working for specific commands.

Bonsoir,

You said "Below command get stucked and never comes out". Really never comes out, or just times out ?

I mean do you have, after a significant timeout, an error message like "rcmd_af: connect: 10.1.25.12: Connection timed out" ?

If so, maybe you have some routing issues between hosts, or maybe the target hosts is simply down at the moment you do the remsh ? Afterall your are looking for word Rebooting ...

HTH

Eric
Dennis Handly
Acclaimed Contributor

Re: Remsh not working for specific commands.

>host2DC2# remsh host1DC1 grep -i Rebooting /tmp/DR.log
>host3DC1# remsh host4DC2 grep -i Rebooting /tmp/DR.log

Is the prompt an indication of a different "from" machine?
I was thinking it depended on source and target but your date(1) example seems to match a hang above.
Can you rlogin to the hung machine and see what that remsh process is doing? Is it doing a grep or hasn't logged in yet?
Sudheesh Varma VK
Occasional Advisor

Re: Remsh not working for specific commands.

The system name before # is just a example to show the datacenter.

The date commend never gets hanged . What I am seeing is if the data out put is large it gets hanged. For example if I do a grep command to file with smaller in size , I get repply. Also if there is no out put still no issues , it just comes out with no out put.
It is something depends on commnad out put data size.
Below commands will never stuck .
#remsh host1DC1 date
#remsh host1DC1 grep ABDFCD /var/adm/syslog/syslog.log

But the below commnads will hang.
#remsh host1DC1 grep -i vmunix /var/adm/syslog/syslog.log

Above command a lot to report , so it will never come out. I waited for more than 2 hours in one session .



Sudheesh Varma VK
Occasional Advisor

Re: Remsh not working for specific commands.

Can anyone please help me on this ?
Dennis Handly
Acclaimed Contributor

Re: Remsh not working for specific commands.

>Can anyone please help me on this?

Other than making sure your patches are up to date with swa or contacting the Response Center, you could try sending the output to a remote file then use rcp/ftp/scp to copy it back?

Does ssh work?
Sudheesh Varma VK
Occasional Advisor

Re: Remsh not working for specific commands.

ssh and ftp works ok for smaller and larger files.
Michael Steele_2
Honored Contributor

Re: Remsh not working for specific commands.

I have struggled for long periods with 'remsh' as you are now. And can provide two important words of advice:

a) 'remsh' is executed in the default login. So if you have 'sh' on server one, and 'ksh' on server two, and your script calls #!/usr/bin/ksh, then you're going to see the env change on server 1, the server using the /usr/bin/sh env.

b) PATH's are not always up to date. Give the full path for every command. So grep becomes /usr/bin/grep.

c) unquoted commands are executed on the local host.

d) quoted commands are executed on the remote host

For example

remsh host1 -n "grep -i patten file", will give you a different output from

remsh host1 -n "cat file" | grep -i pattern

This is because ...grep -i pattern... is executed on the local box, while "cat file" is executed on the remote box.
Support Fatherhood - Stop Family Law