- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Remsh not working for specific commands.
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
Forums
Discussions
Discussions
Discussions
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
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
03-08-2010 06:18 AM
03-08-2010 06:18 AM
Remsh not working for specific commands.
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 ??
- Tags:
- remsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2010 06:22 AM
03-08-2010 06:22 AM
Re: Remsh not working for specific commands.
remsh host1DC1 -n "grep -i Rebooting /tmp/DR.log"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2010 09:03 AM
03-08-2010 09:03 AM
Re: Remsh not working for specific commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2010 09:42 AM
03-08-2010 09:42 AM
Re: Remsh not working for specific commands.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2010 12:41 PM
03-08-2010 12:41 PM
Re: Remsh not working for specific commands.
>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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2010 01:00 AM
03-09-2010 01:00 AM
Re: Remsh not working for specific commands.
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 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 08:49 AM
03-10-2010 08:49 AM
Re: Remsh not working for specific commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 09:18 AM
03-10-2010 09:18 AM
Re: Remsh not working for specific commands.
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 09:59 AM
03-10-2010 09:59 AM
Re: Remsh not working for specific commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 10:38 AM
03-10-2010 10:38 AM
Re: Remsh not working for specific commands.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 11:10 AM
03-10-2010 11:10 AM
Re: Remsh not working for specific commands.
The rcp is working fine if file size is too small in KBs. If it above 1 - 2 MB it hangs.
remsh working fine if the data to report back is less. Also no issues if no data found to report . The moment when the out put increses the remsh gets hanged.
Like
remsh host1 grep -i "123445656" /var/adm/syslog/syslog.log will come out with out any issue as it has nothing to report.
but
remsh host1 grep -i "vmunix" /var/adm/syslog/syslog.log will hang.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 11:39 AM
03-10-2010 11:39 AM
Re: Remsh not working for specific commands.
And you have neither read my response nor the man pages, again, quotes are for remote server execute, while the absence of quotes are for local execution.
remsh host1 grep -i "vmunix" /var/adm/syslog/syslog.log will hang.
This means nothing. It is nonesense. Try either
remsh host1 "cat /var/adm/syslog.log" | grep -i vmunix
-or-
remsh host1 "/usr/bin/grep -i \"vmunix\" \/var\/adm\/syslog\/syslog.log"
You're going to have to review the discussion on metacharacter expansion paying particular attention to the back slash meta char. "\".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 09:40 PM
03-10-2010 09:40 PM
Re: Remsh not working for specific commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2010 10:05 PM
03-10-2010 10:05 PM
Re: Remsh not working for specific commands.
Not always.
>remsh host1 grep -i "vmunix" /var/adm/syslog/syslog.log
This syntax works fine for me, the grep is executed on host1.
>remsh host1 "cat /var/adm/syslog.log" | grep -i vmunix
This also works, but you are making the network sweat by piping ALL of syslog.log back and then doing the grep. (Not to mention the evil cat. ;-)
>remsh host1 "/usr/bin/grep -i \"vmunix\" \/var\/adm\/syslog\/syslog.log"
This also works, but you don't need to quote a "/".
But your point is well taken, you need to be careful of about quoting the remsh command, especially if it includes ";", ">", "<", or "|".
- Tags:
- evil cat