Troubleshooting "omd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT"

Troubleshooting "omd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT"

This article explains why omd.service may fail with exit codes status=1/FAILURE or status=2/INVALIDARGUMENT.

LAST TESTED ON CHECKMK 2.4.0P18

Table of Contents

Problem

Your omd.service fails with exit codes status=1/FAILURE or status=2/INVALIDARGUMENT.


Solution

The exit codes you see are actually Checkmk exit codes, which systemd  then tries to interpret.
This means, that for example status=2/INVALIDARGUMENT, the "2" is the actual exit code from Checkmk, while "INVALIDARGUMENT" is an interpretation by systemd, according to the official systemd documentation.

From Checkmk, there are three possible exit codes for the omd.service:

  • 0: All sites or services are started successfully.

  • 1: All sites or services failed to start.

  • 2: When targeting a single site, this indicates that one or more services failed to start. When targeting multiple sites, this indicates that an unspecific error occurred.

The root cause of the exit codes 1 and 2 can be literally anything, so you have to dig into that the usual way. This article aims to provide the necessary context to understand that the exit codes are not systemd exit codes, but Checkmk exit codes.


Related articles