[ale] After 15 years, Nohup is sttll broken???
neal at mnopltd.com
neal at mnopltd.com
Wed Jul 31 10:45:20 EDT 2019
Thank you for the reply. Additional response inline below.
On 2019-07-31 09:19, Chris Fowler wrote:
> -------------------------
>
>> FROM: "Neal Rhodes via Ale" <ale at ale.org>
>> TO: "Jim Kinney" <jim.kinney at gmail.com>
>> CC: "Atlanta Linux Enthusiasts" <ale at ale.org>
>> SENT: Wednesday, July 31, 2019 10:10:41 AM
>> SUBJECT: Re: [ale] After 15 years, Nohup is sttll broken???
>
>> Well, indirectly - if the ssh session didn't die, it probably
>> wouldn't
>> happen.
> 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).
Hmm. I forgot about that. However, the man page for ssh_config states
that tcpkeepalive is on by default. So...
I think we're seeing the ssh sessions die because the Sonicwall VPN is
configured to kill any connections after xx time. I cannot get that
changed.
>> BUT - isn't that the whole freaking point of nohup? No-Hang-Up?
>>
>> Wasn't the original point of nohup that I didn't want a modem
>> disconnect, or accidently hitting CTRL-C on the keyboard, to kill a
>> background job I had started?
>
> I've always thrown nohup in the background on exection
>
> nohup ./script.sh &
Hmm. That IS an interesting point, and worth experimentation. Thanks.
>
>> What if I needed to start something via nohup, then shutdown my
>> notebook, and drive home? My ssh session is gonna die.
>
> 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.
>
>> Regards,
>>
>> Neal
>>
>> On 2019-07-31 09:05, Jim Kinney wrote:
>>> Sounds like an ssh problem. Is keepalive set on?
>>>
>>> On July 31, 2019 10:03:53 AM EDT, Neal Rhodes via Ale
>> <ale at ale.org>
>>> wrote:
>>>
>>>> So, about 15 years ago, when we were transitioning from SCO Unix
>> to
>>>> Linux, we noticed that nohup didn't work on long running Progress
>>>> Database jobs.
>>>>
>>>> We would start an update job via nohup, leave, several hours
>> later
>>>> the
>>>> ssh session would timeout, and at some point the job would get a
>>>> hangup
>>>> signal and die. Which is sometimes really annoying if it's a 15
>>>> hour
>>>> job.
>>>>
>>>> Our workaround at the time was a script, "mynohup":
>>>>
>>>> #!/bin/bash
>>>> set -x
>>>> echo "at `date` Starting: $* " >> mynohup.out
>>>> echo "$* >> mynohup.out " | at now
>>>> set +x
>>>>
>>>> Which has worked flawlessly for 14.9 years.
>>>>
>>>> Now we are transitioning to new servers, running
>>>> 2.6.32-696.30.1.el6.x86_64 #1 SMP Tue May 22 03:28:18 UTC 2018
>>>> x86_64
>>>> x86_64 x86_64 GNU/Linux
>>>>
>>>> inside VMs, and we experienced some awkwardness with some admin
>> UI
>>>> which
>>>> had Apache -> PHP -> sh -> sudo - adminuser -> mynohup something.
>>>> Barfing up some messages about tty devices. I thought of at
>> least
>>>> unwinding the old kluge.
>>>>
>>>> So, I thought, surely this has been fixed now, and tried running
>> a
>>>> job
>>>> via nohup from an ssh session.
>>>>
>>>> Sure enough, at some point after leaving the office, the DB log
>>>> shows....
>>>>
>>>> [2019/07/30 at 22:07:25.844-0500] P-28382 7: (562) HANGUP signal
>>>> received.
>>>> [2019/07/30 at 22:07:25.847-0500] P-28382 7: (453) Logout by neal
>> on
>>>>
>>>> /dev/pts/4.
>>>> [2019/07/30 at 22:07:28.241-0500] P-28439 8: (562) HANGUP signal
>>>> received.
>>>> [2019/07/30 at 22:07:28.241-0500] P-28439 8: (453) Logout by
>>>> tdiadmin on
>>>> batch.
>>>>
>>>> Wuh? The sole point of nohup is to not get a hangup, and ....????
>>>>
>>>> regards,
>>>>
>>>> Neal
>>>> -------------------------
>>>> Ale mailing list
>>>> Ale at ale.org
>>>> https://mail.ale.org/mailman/listinfo/ale
>>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>>> http://mail.ale.org/mailman/listinfo
>>>
>>> --
>>> Sent from my Android device with K-9 Mail. All tyopes are thumb
>>> related and reflect authenticity.
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> https://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
More information about the Ale
mailing list