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...
BUNCH OF APPLICATION ERROR HERE
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...
Thanks,
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:
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...