systemd doesn't detect dead daemon process [duplicate]
Clash Royale CLAN TAG#URR8PPP
This question already has an answer here:
how does systemd determine service is stopped?
2 answers
I have a aaa.service
file (controlling the JBoss), that besides other regular stuff contains
[Service]
Type=forking
ExecStart=/my/script start
ExecReload=/my/script restart
ExecStop=/my/script stop
PIDFile=...
/my/script start
creates the PID-file and service aaa status
shows it issuing a strange warning:
Supervising process xxx which is not our child. We'll most likely not notice when it exits.
Full output:
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 34min ago
Process: 32435 ExecStart=/my/script start (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
Jan 22 20:54:56 I011-830 su[32447]: (to aaa) root on none
Jan 22 20:54:56 I011-830 su[32447]: pam_unix(su-l:session): session opened for user aaa by (uid=0)
Jan 22 20:55:16 I011-830 aaa[32435]: Starting JBoss application server: Starting JBoss application server:
Jan 22 20:55:16 I011-830 systemd[1]: aaa.service: Supervising process 32542 which is not our child. We'll most likely not notice when it exits.
Now my actual problem is, that if the process get killed other then by issuing service aaa stop
, the systemd doesn't detect it. Even more it claims, that it's running and don't want to start it again:
# cat <pid-file>
No such file or directory
# service aaa status
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 40min ago
Process: 32435 ExecStart=/konsens/app/aaa/init/aaastart (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
...
# service aaa start
# <--- Instant return, no process started
How can I achieve following goals?
- systemd should be able to start and stop my service
service aaa status
should show the status of the process regardless if it was started by systemd or manually issuing/my/service start
- systemd should be able to start service after it was killed manually
- systemd should be able to stop service, that I have started manually
systemd
marked as duplicate by elbarna, RalfFriedl, msp9011, Mr Shunz, Thomas Jan 23 at 11:15
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
how does systemd determine service is stopped?
2 answers
I have a aaa.service
file (controlling the JBoss), that besides other regular stuff contains
[Service]
Type=forking
ExecStart=/my/script start
ExecReload=/my/script restart
ExecStop=/my/script stop
PIDFile=...
/my/script start
creates the PID-file and service aaa status
shows it issuing a strange warning:
Supervising process xxx which is not our child. We'll most likely not notice when it exits.
Full output:
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 34min ago
Process: 32435 ExecStart=/my/script start (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
Jan 22 20:54:56 I011-830 su[32447]: (to aaa) root on none
Jan 22 20:54:56 I011-830 su[32447]: pam_unix(su-l:session): session opened for user aaa by (uid=0)
Jan 22 20:55:16 I011-830 aaa[32435]: Starting JBoss application server: Starting JBoss application server:
Jan 22 20:55:16 I011-830 systemd[1]: aaa.service: Supervising process 32542 which is not our child. We'll most likely not notice when it exits.
Now my actual problem is, that if the process get killed other then by issuing service aaa stop
, the systemd doesn't detect it. Even more it claims, that it's running and don't want to start it again:
# cat <pid-file>
No such file or directory
# service aaa status
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 40min ago
Process: 32435 ExecStart=/konsens/app/aaa/init/aaastart (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
...
# service aaa start
# <--- Instant return, no process started
How can I achieve following goals?
- systemd should be able to start and stop my service
service aaa status
should show the status of the process regardless if it was started by systemd or manually issuing/my/service start
- systemd should be able to start service after it was killed manually
- systemd should be able to stop service, that I have started manually
systemd
marked as duplicate by elbarna, RalfFriedl, msp9011, Mr Shunz, Thomas Jan 23 at 11:15
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
This is unix.stackexchange.com/questions/437251 , unix.stackexchange.com/questions/434709 , unix.stackexchange.com/questions/394431 , et al. again, with a minor variation upon not actually speaking the forking readiness protocol.
– JdeBP
Jan 22 at 22:47
add a comment |
This question already has an answer here:
how does systemd determine service is stopped?
2 answers
I have a aaa.service
file (controlling the JBoss), that besides other regular stuff contains
[Service]
Type=forking
ExecStart=/my/script start
ExecReload=/my/script restart
ExecStop=/my/script stop
PIDFile=...
/my/script start
creates the PID-file and service aaa status
shows it issuing a strange warning:
Supervising process xxx which is not our child. We'll most likely not notice when it exits.
Full output:
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 34min ago
Process: 32435 ExecStart=/my/script start (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
Jan 22 20:54:56 I011-830 su[32447]: (to aaa) root on none
Jan 22 20:54:56 I011-830 su[32447]: pam_unix(su-l:session): session opened for user aaa by (uid=0)
Jan 22 20:55:16 I011-830 aaa[32435]: Starting JBoss application server: Starting JBoss application server:
Jan 22 20:55:16 I011-830 systemd[1]: aaa.service: Supervising process 32542 which is not our child. We'll most likely not notice when it exits.
Now my actual problem is, that if the process get killed other then by issuing service aaa stop
, the systemd doesn't detect it. Even more it claims, that it's running and don't want to start it again:
# cat <pid-file>
No such file or directory
# service aaa status
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 40min ago
Process: 32435 ExecStart=/konsens/app/aaa/init/aaastart (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
...
# service aaa start
# <--- Instant return, no process started
How can I achieve following goals?
- systemd should be able to start and stop my service
service aaa status
should show the status of the process regardless if it was started by systemd or manually issuing/my/service start
- systemd should be able to start service after it was killed manually
- systemd should be able to stop service, that I have started manually
systemd
This question already has an answer here:
how does systemd determine service is stopped?
2 answers
I have a aaa.service
file (controlling the JBoss), that besides other regular stuff contains
[Service]
Type=forking
ExecStart=/my/script start
ExecReload=/my/script restart
ExecStop=/my/script stop
PIDFile=...
/my/script start
creates the PID-file and service aaa status
shows it issuing a strange warning:
Supervising process xxx which is not our child. We'll most likely not notice when it exits.
Full output:
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 34min ago
Process: 32435 ExecStart=/my/script start (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
Jan 22 20:54:56 I011-830 su[32447]: (to aaa) root on none
Jan 22 20:54:56 I011-830 su[32447]: pam_unix(su-l:session): session opened for user aaa by (uid=0)
Jan 22 20:55:16 I011-830 aaa[32435]: Starting JBoss application server: Starting JBoss application server:
Jan 22 20:55:16 I011-830 systemd[1]: aaa.service: Supervising process 32542 which is not our child. We'll most likely not notice when it exits.
Now my actual problem is, that if the process get killed other then by issuing service aaa stop
, the systemd doesn't detect it. Even more it claims, that it's running and don't want to start it again:
# cat <pid-file>
No such file or directory
# service aaa status
Loaded: loaded (/etc/systemd/system/aaa.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-01-22 20:55:16 CET; 40min ago
Process: 32435 ExecStart=/konsens/app/aaa/init/aaastart (code=exited, status=0/SUCCESS)
Main PID: 32542
Tasks: 0 (limit: 512)
CGroup: /system.slice/aaa.service
...
# service aaa start
# <--- Instant return, no process started
How can I achieve following goals?
- systemd should be able to start and stop my service
service aaa status
should show the status of the process regardless if it was started by systemd or manually issuing/my/service start
- systemd should be able to start service after it was killed manually
- systemd should be able to stop service, that I have started manually
This question already has an answer here:
how does systemd determine service is stopped?
2 answers
systemd
systemd
asked Jan 22 at 20:45
Boris BrodskiBoris Brodski
1207
1207
marked as duplicate by elbarna, RalfFriedl, msp9011, Mr Shunz, Thomas Jan 23 at 11:15
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by elbarna, RalfFriedl, msp9011, Mr Shunz, Thomas Jan 23 at 11:15
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
This is unix.stackexchange.com/questions/437251 , unix.stackexchange.com/questions/434709 , unix.stackexchange.com/questions/394431 , et al. again, with a minor variation upon not actually speaking the forking readiness protocol.
– JdeBP
Jan 22 at 22:47
add a comment |
1
This is unix.stackexchange.com/questions/437251 , unix.stackexchange.com/questions/434709 , unix.stackexchange.com/questions/394431 , et al. again, with a minor variation upon not actually speaking the forking readiness protocol.
– JdeBP
Jan 22 at 22:47
1
1
This is unix.stackexchange.com/questions/437251 , unix.stackexchange.com/questions/434709 , unix.stackexchange.com/questions/394431 , et al. again, with a minor variation upon not actually speaking the forking readiness protocol.
– JdeBP
Jan 22 at 22:47
This is unix.stackexchange.com/questions/437251 , unix.stackexchange.com/questions/434709 , unix.stackexchange.com/questions/394431 , et al. again, with a minor variation upon not actually speaking the forking readiness protocol.
– JdeBP
Jan 22 at 22:47
add a comment |
1 Answer
1
active
oldest
votes
How can I achieve following goals?
1 systemd should be able to start and stop my service
Most distributions have backwards compatibility so you can store your service in /etc/init.d/ if you don't want to make a native service.
2 service aaa status should show the status of the process regardless if it was started by systemd or manually issuing /my/service start
One way to do this is to add a check in your script to call systemctl start aaa.service
if it was not called that way to begin with. a trap can be used for exit.
3 systemd should be able to start service after it was killed manually
solved by #2
4 systemd should be able to stop service, that I have started manually
solved by #2
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
How can I achieve following goals?
1 systemd should be able to start and stop my service
Most distributions have backwards compatibility so you can store your service in /etc/init.d/ if you don't want to make a native service.
2 service aaa status should show the status of the process regardless if it was started by systemd or manually issuing /my/service start
One way to do this is to add a check in your script to call systemctl start aaa.service
if it was not called that way to begin with. a trap can be used for exit.
3 systemd should be able to start service after it was killed manually
solved by #2
4 systemd should be able to stop service, that I have started manually
solved by #2
add a comment |
How can I achieve following goals?
1 systemd should be able to start and stop my service
Most distributions have backwards compatibility so you can store your service in /etc/init.d/ if you don't want to make a native service.
2 service aaa status should show the status of the process regardless if it was started by systemd or manually issuing /my/service start
One way to do this is to add a check in your script to call systemctl start aaa.service
if it was not called that way to begin with. a trap can be used for exit.
3 systemd should be able to start service after it was killed manually
solved by #2
4 systemd should be able to stop service, that I have started manually
solved by #2
add a comment |
How can I achieve following goals?
1 systemd should be able to start and stop my service
Most distributions have backwards compatibility so you can store your service in /etc/init.d/ if you don't want to make a native service.
2 service aaa status should show the status of the process regardless if it was started by systemd or manually issuing /my/service start
One way to do this is to add a check in your script to call systemctl start aaa.service
if it was not called that way to begin with. a trap can be used for exit.
3 systemd should be able to start service after it was killed manually
solved by #2
4 systemd should be able to stop service, that I have started manually
solved by #2
How can I achieve following goals?
1 systemd should be able to start and stop my service
Most distributions have backwards compatibility so you can store your service in /etc/init.d/ if you don't want to make a native service.
2 service aaa status should show the status of the process regardless if it was started by systemd or manually issuing /my/service start
One way to do this is to add a check in your script to call systemctl start aaa.service
if it was not called that way to begin with. a trap can be used for exit.
3 systemd should be able to start service after it was killed manually
solved by #2
4 systemd should be able to stop service, that I have started manually
solved by #2
answered Jan 22 at 21:33
user1133275user1133275
3,317723
3,317723
add a comment |
add a comment |
1
This is unix.stackexchange.com/questions/437251 , unix.stackexchange.com/questions/434709 , unix.stackexchange.com/questions/394431 , et al. again, with a minor variation upon not actually speaking the forking readiness protocol.
– JdeBP
Jan 22 at 22:47