You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sep 17 16:15:57 ip-172-31-31-213.ec2.internal systemd[1]: mongodb_exporter.service: Main process exited, code=exited, status=216/GROUP
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit mongodb_exporter.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 216.
Sep 17 16:15:57 ip-172-31-31-213.ec2.internal systemd[1]: mongodb_exporter.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit mongodb_exporter.service has entered the 'failed' state with result 'exit-code'.
Sep 17 16:15:57 ip-172-31-31-213.ec2.internal systemd[1]: mongodb_exporter.service: Scheduled restart job, restart counter is at 5.
Additional context
Issue has been ran into before: #815
I fixed this by changing the group in the service file to mongodb_exporter.
I'm not 100% sure if changing the group to mongodb_exporter would have security implications, but I have the feeling that it would be negligble at worst.
@BupycHuk I actually did replace the $OPTIONS with the flags I needed, but this issue was still present. It seems like not all operating systems have the group nogroup which is what's causing this issue. Amazon linux has nobody instead of nogroup
# Debian OS
$ cat /etc/group | grep no
nogroup:x:65534:
# Amazon linux
$ cat /etc/group | grep no
nobody:x:65534:
For reference this is the service file I'm using now.
Describe the bug
mongodb_exporter systemd service failing to start on
al2023-ami-2023.5.20240916.0-kernel-6.1-x86_64
To Reproduce
wget 'https://github.com/percona/mongodb_exporter/releases/download/v0.41.0/mongodb_exporter-0.41.0.linux-64-bit.rpm'
sudo yum install ./mongodb_exporter-0.41.0.linux-64-bit.rpm
systemctl start mongodb_exporter
journalctl -u mongodb_exporter
Expected behavior
mongodb_exporter service starts
Logs
Environment
Additional context
Issue has been ran into before:
#815
I fixed this by changing the group in the service file to mongodb_exporter.
I'm not 100% sure if changing the group to
mongodb_exporter
would have security implications, but I have the feeling that it would be negligble at worst.taking a look at the mongod service file, they specify the same user and group, for example.
https://github.com/mongodb/mongo/blob/master/debian/mongod.service#L8-L9
This change can be made here:
https://github.com/percona/mongodb_exporter/blob/main/.scripts/systemd/mongodb_exporter.service#L10
The text was updated successfully, but these errors were encountered: