0

What's wrong with this code? Suddenly the nohup process dies, without a trace.

bin/sh
sleep 5s
cd /home/minecraft/OMC
nohup java -jar -Xms3400M -Xmx3400M -jar paperclip.jar &
  • Could you give some more context - are you running through ssh? Is nothing being written to nohup.out? If you run the nohup command directly without using a script, does it work? How are you checking that the process is running? – Benitok Mar 15 at 20:20
  • The first line in that script looks like a typo. – Kusalananda Mar 15 at 21:01
2

nohup itself isn't expected to live long (at least as nohup):

$ nohup sleep 10 < /dev/null > /dev/null &
[1] 773
$ pgrep nohup
$ pgrep sleep
773
$ echo "time passes.."
time passes..
[1]+  Done                    nohup sleep 10 < /dev/null > /dev/null

You want instead to look, in your case, for a java process.

  • So.. Do you mean, it's the Java process dying, which in return kills nohup? – brayjamin Mar 16 at 17:27
  • Hard to say without some logs. – DopeGhoti Mar 18 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.