<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Neal Rhodes via Ale" <ale@ale.org><br><b>To: </b>"Jim Kinney" <jim.kinney@gmail.com><br><b>Cc: </b>"Atlanta Linux Enthusiasts" <ale@ale.org><br><b>Sent: </b>Wednesday, July 31, 2019 10:10:41 AM<br><b>Subject: </b>Re: [ale] After 15 years, Nohup is sttll broken???<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">Well, indirectly - if the ssh session didn't die, it probably wouldn't <br>happen.</blockquote>I've been using keepalive SSH options for years to keep session up.  I had system that did dialout ppp to servers with an idle timeout set for pppd.  SSH session would drop so I used the keep alive out of band SSH messages to keep those connections up.  I now use the same options for standard networks (real speeds).</div><div data-marker="__QUOTED_TEXT__"><br data-mce-bogus="1"></div><div data-marker="__QUOTED_TEXT__"><br><div><br></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><br><br>BUT - isn't that the whole freaking point of nohup?   No-Hang-Up?<br><br>Wasn't the original point of nohup that I didn't want a modem <br>disconnect, or accidently hitting CTRL-C on the keyboard, to kill a <br>background job I had started?</blockquote><div><br></div><div>I've always thrown nohup in the background on exection<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>nohup ./script.sh &<br data-mce-bogus="1"></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><br><br>What if I needed to start something via nohup, then shutdown my <br>notebook, and drive home?   My ssh session is gonna die.</blockquote></div><div data-marker="__QUOTED_TEXT__"><div>tmux.  Start the tmux session and run the job in a tmux pane.  When you get home SSH back to the server and attach to the tmux session.  I use this in development so I can occasionally check up on build status via JuiceSSH on Android.  <br></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><br><br>Regards,<br><br>Neal<br><br><br><br>On 2019-07-31 09:05, Jim Kinney wrote:<br>> Sounds like an ssh problem. Is keepalive set on?<br>> <br>> On July 31, 2019 10:03:53 AM EDT, Neal Rhodes via Ale <ale@ale.org><br>> wrote:<br>> <br>>> So, about 15 years ago, when we were transitioning from SCO Unix to<br>>> Linux, we noticed that nohup didn't work on long running Progress<br>>> Database jobs.<br>>> <br>>> We would start an update job via nohup, leave, several hours later<br>>> the<br>>> ssh session would timeout, and at some point the job would get a<br>>> hangup<br>>> signal and die.  Which is sometimes really annoying if it's a 15<br>>> hour<br>>> job.<br>>> <br>>> Our workaround at the time was a script, "mynohup":<br>>> <br>>> #!/bin/bash<br>>> set -x<br>>> echo "at `date` Starting: $* " >> mynohup.out<br>>> echo "$*  >> mynohup.out " | at now<br>>> set +x<br>>> <br>>> Which has worked flawlessly for 14.9 years.<br>>> <br>>> Now we are transitioning to new servers, running<br>>> 2.6.32-696.30.1.el6.x86_64 #1 SMP Tue May 22 03:28:18 UTC 2018<br>>> x86_64<br>>> x86_64 x86_64 GNU/Linux<br>>> <br>>> inside VMs, and we experienced some awkwardness with some admin UI<br>>> which<br>>> had Apache -> PHP -> sh -> sudo - adminuser -> mynohup something.<br>>> Barfing up some messages about tty devices.   I thought of at least<br>>> unwinding the old kluge.<br>>> <br>>> So, I thought, surely this has been fixed now, and tried running a<br>>> job<br>>> via nohup from an ssh session.<br>>> <br>>> Sure enough, at some point after leaving the office, the DB log<br>>> shows....<br>>> <br>>> [2019/07/30@22:07:25.844-0500] P-28382  7: (562)   HANGUP signal<br>>> received.<br>>> [2019/07/30@22:07:25.847-0500] P-28382  7: (453)   Logout by neal on<br>>> <br>>> /dev/pts/4.<br>>> [2019/07/30@22:07:28.241-0500] P-28439  8: (562)   HANGUP signal<br>>> received.<br>>> [2019/07/30@22:07:28.241-0500] P-28439  8: (453)   Logout by<br>>> tdiadmin on<br>>> batch.<br>>> <br>>> Wuh? The sole point of nohup is to not get a hangup, and ....????<br>>> <br>>> regards,<br>>> <br>>> Neal<br>>> -------------------------<br>>> Ale mailing list<br>>> Ale@ale.org<br>>> https://mail.ale.org/mailman/listinfo/ale<br>>> See JOBS, ANNOUNCE and SCHOOLS lists at<br>>> http://mail.ale.org/mailman/listinfo<br>> <br>> --<br>> Sent from my Android device with K-9 Mail. All tyopes are thumb<br>> related and reflect authenticity.<br>_______________________________________________<br>Ale mailing list<br>Ale@ale.org<br>https://mail.ale.org/mailman/listinfo/ale<br>See JOBS, ANNOUNCE and SCHOOLS lists at<br>http://mail.ale.org/mailman/listinfo<br></blockquote></div></div></body></html>