Ahojte,
mam problem, ze mi nieco/niekto zabije systemd sluzbu a ja neviem zistit dovod preco sa to deje.
V logu sa objavi nasledovne:
Aug 04 10:58:14 cam01 systemd[1]: service1.service: Main process exited, code=killed, status=9/KILL
Aug 04 10:58:15 cam01 systemd[1]: service1.service: Failed with result 'signal'.
Aug 04 10:58:25 cam01 systemd[1]: service1.service: Scheduled restart job, restart counter is at 2.
Aug 04 10:58:25 cam01 systemd[1]: Stopped service1 service.
Aug 04 10:58:25 cam01 systemd[1]: Started service1 service.
Predpoklad je, ze niekto posle tomu procesu signal 9 (SIGKILL). Auditd hlasi nieco taketo:
time->Fri Aug 4 10:58:14 2023
type=PROCTITLE msg=audit(1691146694.920:1618335): proctitle="(null)"
type=OBJ_PID msg=audit(1691146694.920:1618335): opid=121629 oauid=-1 ouid=0 oses=-1 ocomm="dotnet"
type=SYSCALL msg=audit(1691146694.920:1618335): arch=c000003e syscall=62 success=yes exit=0 a0=1db1d a1=9 a2=7ffa90024a2a a3=7ffa905a67e8 items=0 ppid=1 pid=121629 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=2E4E4554205369676E616C2048616E exe="/usr/share/dotnet/dotnet" key="process_kill"
Nie som z toho mudrejsi, proctitle hlasi "null". Mozno by to mohol robit kernel? Co znamena proctitle="(null)"?
V kernel logu nie je vobec nic, ziaden OOM killer ani nic podobne.
Systemd sluzba je nasledovna a nie je na nicom zavisla ani nic na nej nezavisi:
[Service]
WorkingDirectory=/opt/sluzba1
ExecStart=/usr/bin/dotnet /opt/sluzba1/sluzba1.dll
Restart=always
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=service1
User=root
Deje sa to cca kazdu hodinu. Jedna sa o proprietarnu sluzbu, ktora bezi v .NETe na Linuxe. OS je Ubuntu 20.04.
Ta sluzba este obcas padne aj na:
Jul 20 18:53:40 cam01 systemd[1]: service1.service: Main process exited, code=killed, status=6/ABRT
Jul 20 18:53:41 cam01 systemd[1]: service1.service: Failed with result 'signal'.
Jul 20 18:53:51 cam01 systemd[1]: service1.service: Scheduled restart job, restart counter is at 1.
Jul 20 18:53:51 cam01 systemd[1]: Stopped service1 service.
Jul 20 18:53:51 cam01 systemd[1]: Started service1 service.
Ale tam je to jasne preco sa to deje, proces padne na ABRT (tam aj vidim v logu, ze ten proces crashne a skonci to na ABRT). Ale preco je v tom hornom pripade signal KILL? Aky je dovod, ze nieco (jadro?) posle procesu KILL? (jeden dovod ma napada a to je OOM v jadre, ale tu v logu nic nie je)