Java process getting terminated in Redhat by SIGTERM from Systemd
2
votes
0
answers
439
views
I'm starting a Java process using nohup and & (running it in the background). This process gets terminated frequently. There is no pattern on when it is getting terminated. From the application (java process) logs it was evident that it was receiving a SIGTERM signal. So I used strace to figure out the source of the SIGTERM signal and it turned out to be systems.
Why would systemd try to kill a process that it does not manage?
Strace Output
13:35:20.838755 futex(0x7f1ef1ae49d0, FUTEX_WAIT, 16917, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
22:17:17.211643 --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} ---
22:17:17.211876 futex(0x7f1ef0e9c720, FUTEX_WAKE_PRIVATE, 1) = 1
22:17:17.211974 rt_sigreturn({mask=[]}) = 202
22:17:17.212183 futex(0x7f1ef1ae49d0, FUTEX_WAIT, 16917, NULL) = ?
22:17:17.538874 +++ exited with 143 +++
I've already combed through DMESG and messages logs and there was nothing that points to why the process was killed.
Edit:
The java process is started by a user as a bash command. But the user login is controlled using pblocald which is a systemd unit.
Asked by Raghu
(121 rep)
Jul 21, 2023, 09:03 AM
Last activity: Jul 21, 2023, 04:05 PM
Last activity: Jul 21, 2023, 04:05 PM