- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ssh and background processes - processes hang
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
тАО06-27-2006 03:50 AM
тАО06-27-2006 03:50 AM
ssh myserver
nohup sleep 200 &
Ctrl-D
Connection now hangs. I was hoping an upgrade to HP's 4.30 secure shell would remedy this problem but it doesn't seem to. I've seen two solutions posted so far:
1) nohup command /dev/null 2&>1 --> this works but complicates script writing, especially when I'm not the one writing the script!
2) run a cron job to kill sshd sessions with 'notty' in the ps -ef output. This idea seemed more intriguing. It worked until I upgraded to 4.30. Now I never see notty in the output!
I'm disappointed that HP keeps releasing upgrades to secure shell without fixing this bug. Considering that I want to upgrade to the latest version, does anyone know if there's a way to get the notty output back? Any other imaginative ideas on how to deal with this. Has anyone compiled from the source with different results?
TIA...Kevin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2006 04:46 AM
тАО06-27-2006 04:46 AM
Re: ssh and background processes - processes hang
Change ssh to ssh -vvv above.
See what happens.
Also check the swinstall log from secure shell.
You can swremove this version and install version 4.2
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2006 05:21 AM
тАО06-27-2006 05:21 AM
Re: ssh and background processes - processes hang
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
It hangs at this point. Do you know if HP keeps older versions off ssh available? I only see 4.30 on software.hp.com.
Thanks!
...Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2006 05:31 AM
тАО06-27-2006 05:31 AM
SolutionIf you have a software contract, you may open a call at the response center. They are permitted to grant you access to an ftp site with the version of ssh you need.
If you can't do that, click my profile, use the contact form to send me an email and I'll make arrangements for you to get the last 4.2 version.
HP might pull the version on software.hp.com and put the previous back if there is a serious flaw. This can be reported via the response center regardless of whether you have a software contract or not.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2006 12:43 AM
тАО06-29-2006 12:43 AM
Re: ssh and background processes - processes hang
Don't know if this helps...
But, we've started using "at" jobs to circumvent the problem.
at -f some_script now
Just a thought....
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2006 01:00 AM
тАО06-29-2006 01:00 AM
Re: ssh and background processes - processes hang
It's not a bug; that's the way it's supposed to work. When you "ssh myserver" you're opening up a tty that stays open until all commands in it are done. Since you nohup'ed sleep 200, it's going to wait until the sleep 200 is done. In theory, the nohup is supposed to disassociate the tty from the command. I've had issues on HPs with it doing that even straight which is why I tend to use "at now" commands.
The same thing happens if you ssh to a server, open up an X based GUI, then try to exit. As long as the X gui is running, your ssh will appear to have hung when you try to exit.
You can try using the -T option to disable tty allocation. I haven't tried that so I'm not sure if it'll do what you're looking for.
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2006 01:33 AM
тАО06-29-2006 01:33 AM
Re: ssh and background processes - processes hang
Doug, I just tried the '-T' option but it behaves the same way. Also, your explanation of nohup behavior helps clarify some things.
Ted & Doug, normally 'at' would work fine. The current problem I'm wrestling with is launching multiple scripts during a backup. Some servers ssh over to other servers to restart applications which are effectively nohup's.
With all of this in mind I'm going to stop wrestling with ssh (since it's behaving correctly) and re-engineer how we run our backup scripts.
As always, many thanks, all!
...Kevin