systemctl status wazuh-api failed

Skip to first unread message

Hattim Khaleel

unread,
Oct 23, 2019, 8:46:52 AM10/23/19
to Wazuh mailing list

Hi,
I have error whrn checking the "systemctl status wazuh-api"

[root@wazuhmanager auth]# systemctl status wazuh-api
● wazuh-api.service - Wazuh API daemon
Loaded: loaded (/etc/systemd/system/wazuh-api.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2019-10-23 12:09:21 UTC; 34min ago
Docs: https://documentation.wazuh.com/current/user-manual/api/index.html
Process: 50026 ExecStop=/bin/kill -HUP $MAINPID (code=exited, status=1/FAILURE)
Process: 50010 ExecStart=/usr/bin/node /var/ossec/api/app.js (code=exited, status=1/FAILURE)
Main PID: 50010 (code=exited, status=1/FAILURE)

Oct 23 12:09:21 wazuhmanager kill[50026]: -q, --queue use sigqueu...)
Oct 23 12:09:21 wazuhmanager kill[50026]: -p, --pid print pids ...m
Oct 23 12:09:21 wazuhmanager kill[50026]: -l, --list [=] list signal...e
Oct 23 12:09:21 wazuhmanager kill[50026]: -L, --table list signal...s
Oct 23 12:09:21 wazuhmanager kill[50026]: -h, --help display this help a...t
Oct 23 12:09:21 wazuhmanager kill[50026]: -V, --version output version info...t
Oct 23 12:09:21 wazuhmanager systemd[1]: wazuh-api.service: control process ...1
Oct 23 12:09:21 wazuhmanager kill[50026]: For more details see kill(1).
Oct 23 12:09:21 wazuhmanager systemd[1]: Unit wazuh-api.service entered fail....
Oct 23 12:09:21 wazuhmanager systemd[1]: wazuh-api.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@wazuhmanager auth]#



Daria Kempny

unread,
Oct 23, 2019, 2:13:16 PM10/23/19
to Wazuh mailing list

Hello Hattim Khaleel,

This behavior may be cause by different reasons, in order to determine more information about the failed service please run 'journalctl -u wazuh-api'. And provide us with the output so we may have some more information about the issue.

This may occur for example, if there are file permission issues, missing nodejs version 4.6.1 or greater, or other misconfigurations.

Please check if Nodejs is installed by running 'node -v'  which will provide  the installed version number.

If the problem persists please let us know and we will be glad to help you find a solution.

Best regards,
Daria Kempny

Victor Fernandez

unread,
Oct 23, 2019, 2:14:43 PM10/23/19
to Hattim Khaleel, Wazuh mailing list
Hi Hattim,

Please give us more details so we can help you:
  • Version of Wazuh.
  • Did you installed via packages or sources?
  • Operating system you're running Wazuh on.
  • Which steps you followed to reproduce this problem.
According to the logs, it seems that the Systemd service lost the PID of the API when trying to restart it. That made the kill command miss an argument (that PID).

Did you try to restart the API again?
systemctl restart wazuh-api

I wonder if MAINPID (the PID of the API process) could be lost due to some condition, or there is an issue with a specific version of Systemd.

As this seems to be a bug, I suggest you to open an issue in the API project on GitHub: https://github.com/wazuh/wazuh-api/issues/new

Best regards,

Victor Manuel Fernandez-Castro 
Core Engineering | vic...@wazuh.com


--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/a7ffa7fe-8b04-490e-af0c-862cbdc0a7a1%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages