Stop nxlog service

Tags:

#1 Mareknejedly

Hi,

I have installed community version on Linux 18.04 AMD 64 and I encountered problem with stopping NX Log service. When I hit "sudo service nxlog stop", the command process but the service still persist. When I hit "sudo service nxlog status", the result is: ● nxlog.service - LSB: logging daemon Loaded: loaded (/etc/init.d/nxlog; generated) Active: failed (Result: exit-code) since Sun 2019-01-27 16:50:34 CET; 33s ago Docs: man:systemd-sysv-generator(8) Process: 8744 ExecStart=/etc/init.d/nxlog start (code=exited, status=1/FAILURE) Tasks: 7 (limit: 2321) CGroup: /system.slice/nxlog.service └─30012 /usr/bin/nxlog

led 27 16:50:34 logstash-VirtualBox systemd[1]: Starting LSB: logging daemon... led 27 16:50:34 logstash-VirtualBox nxlog[8744]: * Starting nxlog daemon... led 27 16:50:34 logstash-VirtualBox nxlog[8744]: 2019-01-27 16:50:34 ERROR Another instance is already running (pid 30012);Resource temporarily unavailable led 27 16:50:34 logstash-VirtualBox nxlog[8744]: Failed to start nxlog! led 27 16:50:34 logstash-VirtualBox nxlog[8744]: ...fail! led 27 16:50:34 logstash-VirtualBox systemd[1]: nxlog.service: Control process exited, code=exited status=1 led 27 16:50:34 logstash-VirtualBox systemd[1]: nxlog.service: Failed with result 'exit-code'. led 27 16:50:34 logstash-VirtualBox systemd[1]: Failed to start LSB: logging daemon.

Could you please advice me how I can stop it and run it again? Is the service working right when I do "sudo service nxlog status"?

Thank you for all your advice.

Kind regards,

Marek

#2 Zhengshi Nxlog ✓
#1 Mareknejedly
Hi, I have installed community version on Linux 18.04 AMD 64 and I encountered problem with stopping NX Log service. When I hit "sudo service nxlog stop", the command process but the service still persist. When I hit "sudo service nxlog status", the result is: ● nxlog.service - LSB: logging daemon Loaded: loaded (/etc/init.d/nxlog; generated) Active: failed (Result: exit-code) since Sun 2019-01-27 16:50:34 CET; 33s ago Docs: man:systemd-sysv-generator(8) Process: 8744 ExecStart=/etc/init.d/nxlog start (code=exited, status=1/FAILURE) Tasks: 7 (limit: 2321) CGroup: /system.slice/nxlog.service └─30012 /usr/bin/nxlog led 27 16:50:34 logstash-VirtualBox systemd[1]: Starting LSB: logging daemon... led 27 16:50:34 logstash-VirtualBox nxlog[8744]: * Starting nxlog daemon... led 27 16:50:34 logstash-VirtualBox nxlog[8744]: 2019-01-27 16:50:34 ERROR Another instance is already running (pid 30012);Resource temporarily unavailable led 27 16:50:34 logstash-VirtualBox nxlog[8744]: Failed to start nxlog! led 27 16:50:34 logstash-VirtualBox nxlog[8744]: ...fail! led 27 16:50:34 logstash-VirtualBox systemd[1]: nxlog.service: Control process exited, code=exited status=1 led 27 16:50:34 logstash-VirtualBox systemd[1]: nxlog.service: Failed with result 'exit-code'. led 27 16:50:34 logstash-VirtualBox systemd[1]: Failed to start LSB: logging daemon. Could you please advice me how I can stop it and run it again? Is the service working right when I do "sudo service nxlog status"? Thank you for all your advice. Kind regards, Marek
led 27 16:50:34 logstash-VirtualBox nxlog[8744]: 2019-01-27 16:50:34 ERROR Another instance is already running (pid 30012);Resource temporarily unavailable

This leads me to believe that it was already running or hung.
Verify with the ps command with something like ps ax| grep nxlog. If it is indeed not running, just remove the pid file at /run/nxlog/nxlog.pid and start it again. Possibly an unclean shutdown.