I am searching all over internet but could not find any information about INVALIDARGUMENT .

After stopping service in systemd, I got this response.

Oct 18 21:17:04 BSU00383 systemd: Stopping filebeat...
Oct 18 21:17:04 BSU00383 systemd: filebeat.service: main process exited, code=exited, status=2/INVALIDARGUMENT

It looks like the application side failed to process the SIGTERM signal before receiving SIGKILL signal from systemd but in what situations does systemd returns INVALIDARGUMENT in general?

I am using Red Hat Enterprise Linux 7.4 .

I appreciate if some one can help me out...


Yu Watanabe


The "INVALIDARGUMENT" name is a "code" for exit status 2.

In systemd source code (looking at v219, which is the version shipped with RHEL 7), there's a constant for it defined in enum ExitStatus:


These constants seem to come from the LSB standard (which tried to standardize init scripts, when init scripts used to be a thing...)

Looking at the relevant section of LSB, there's this table:

1      generic or unspecified error (current practice)
2      invalid or excess argument(s)
3      unimplemented feature (for example, "reload")
4      user had insufficient privilege
5      program is not installed
6      program is not configured
7      program is not running

Which matches the other systemd constants... So it seems systemd tried to use the LSB standard, since there's some small benefit for programs following this standard.

Of course, not all programs follow this standard, so systemd might end up telling what it thinks that error code means, even though program authors might have decided to use exit status 2 (and others through 7) for completely different purposes...

| improve this answer | |
  • 2
    Thank you for the reply ! I will mark this as solution. – Yu Watanabe Nov 21 '18 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.