Mkeventd failing to start, no error message

Hello, to be honest I don’t know what I did to have this error, but I need help troubleshooting this, the mkeventd isn’t starting, and it isn’t showing an error message, I also don’t know if there is a log file for this.

I also created another “test” site to see if it works, and it did, so I am clueless.

CMK version: 2.3.0p6
OS version: Debian 12

Error message:

OMD[hds]:~$ omd status
agent-receiver: running
mkeventd: stopped
rrdcached: running
npcd: running
nagios: running
apache: running
redis: running
crontab: running

Overall state: partially running

So, this is what it shows after I stopped the site and the start again.

OMD[hds]:~$ omd start
Temporary filesystem already mounted
Starting agent-receiver…OK
Starting mkeventd…Failed
Starting rrdcached…OK
Starting npcd…OK
Starting nagios…OK
Starting apache…OK
Starting redis…OK
Initializing Crontab…OK

Hi Robert,
do you have another site or a syslog-software occupying the ports on your server?

You can check that with ss -tulpan or netstat -tulpan

Another thing you can do to troubleshoot is to go su - <your-site> and then check var/log/mkeventd.log

Thank you so much for responding, I checked the ports as you said, the were no other site or software using the same ports as my checkmk site, and this is the last entry in mkeventd.log.

2024-06-16 17:27:10,237 [20] [cmk.mkeventd] -----------------------------------------------------------------
2024-06-16 17:27:10,237 [20] [cmk.mkeventd] mkeventd version 2.3.0p6 starting
2024-06-16 17:27:10,238 [20] [cmk.mkeventd.EventServer] Created FIFO '/omd/sites/hds/tmp/run/mkeventd/events' for receiving events
2024-06-16 17:27:10,239 [20] [cmk.mkeventd.EventServer] Opened UNIX socket '/omd/sites/hds/tmp/run/mkeventd/eventsocket' for receiving events
2024-06-16 17:27:10,239 [40] [cmk.mkeventd.EventStatus] Error loading event state from /omd/sites/hds/var/mkeventd/status
Traceback (most recent call last):
  File "/omd/sites/hds/lib/python3/cmk/ec/main.py", line 2634, in load_status
    status = ast.literal_eval(path.read_text(encoding="utf-8"))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/hds/lib/python3.12/ast.py", line 66, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/hds/lib/python3.12/ast.py", line 52, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 1
    -w 200.00,80.00% -c 500.00,100.00% 172.17.1.108', 'SERVICEACKCOMMENT': '', '
       ^^^^^^
SyntaxError: invalid syntax
2024-06-16 17:27:10,333 [40] [cmk.mkeventd] FATAL ERROR: Traceback (most recent call last):
  File "/omd/sites/hds/lib/python3/cmk/ec/main.py", line 3437, in main
    event_status.load_status(event_server)
  File "/omd/sites/hds/lib/python3/cmk/ec/main.py", line 2634, in load_status
    status = ast.literal_eval(path.read_text(encoding="utf-8"))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/hds/lib/python3.12/ast.py", line 66, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/hds/lib/python3.12/ast.py", line 52, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 1
    -w 200.00,80.00% -c 500.00,100.00% 172.17.1.108', 'SERVICEACKCOMMENT': '', '
       ^^^^^^
SyntaxError: invalid syntax

Looks like something is wrong with the thresholds of a service of your host “172.17.1.108” (Could be the host check “IMCP” where 200 is the rta and 80% is the packetloss). But I can’t imagine any reason why that would prevent your mkeventd from starting…

It is not directly a problem with the check itself but with the entry in the status file of the mkeventd.
If it is not so important to clear all events you can remove the file.

and then try to restart the mkeventd.
You can also try to fix the content but i don’t think it is worth the time.

2 Likes

Thank you @andreas-doehler that worked perfectly.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.