Fix systemd "status=216/GROUP" (group not found)
status=216/GROUP means systemd could not find or apply a group from Group= or SupplementaryGroups=. Check the names with getent group, then fix the unit.
Main PID: 47581 (code=exited, status=216/GROUP)216/GROUP means the program never ran: just before executing it, systemd could not determine or change the service's group. Possible causes are a name in Group= or SupplementaryGroups= that does not exist on that machine, a group list that could not be read, or a group switch that was refused. The wording of the journal line just before the 216 narrows it down, so read that first.
The systemd manual (systemd.exec, Process Exit Codes) describes 216 as "Failed to determine or change group credentials. See Group= / SupplementaryGroups= above." The general routine (reading status, restart limits) is in Find out why a service is failed; this page only narrows down 216.
[1] Read the failure line in the journal.
# journalctl -u myapp -b --no-pager -n 20These are the three messages you meet most often among the places in the systemd 255 source that return 216. Two more cases also return 216 and are not covered here: a failure re-reading groups after PAM setup (Failed to obtain groups after setting up PAM) and a failure merging group lists (Failed to merge group lists). The %m at the end becomes an error description such as No such process.
| Journal message | Meaning | Setting to check |
|---|---|---|
Failed to determine group credentials: … | the name or ID in Group= could not be looked up | [2]–[4] |
Failed to determine supplementary groups: … | an entry in SupplementaryGroups=, or the User= account's group list, could not be read | [2]–[4] |
Changing group credentials failed: … | the group was found but the call to switch to it was refused | [5] |
No such process is the error the source returns when the group is not found (ESRCH). The messages were checked in the source; the actual journal lines were not reproduced because the container has no running systemd.
[2] See which groups the unit names. systemctl cat merges drop-in files, so a value that is not in the main file but comes from a drop-in shows up too.
# systemctl cat myapp | grep -E '^(User|Group|SupplementaryGroups)='Group= takes a single name or numeric ID. SupplementaryGroups= is a space-separated list and may appear more than once.
[3] Check that the machine knows the name. systemd looks names up in the system group database (getgrnam), and getent group reads the same database. A missing name prints nothing and exits with 2.
# getent group appgrp; echo "exit=$?"exit=2Once the group exists, you get one line and exit code 0.
appgrp:x:1001:exit=0A numeric Group=4242 fails too when no group entry has that number (per the source); getent group 4242 also exited 2 in the container. In SupplementaryGroups=, one wrong entry fails the whole list, so check each name for typos.
# getent group appgrpp; echo "exit=$?"exit=2[4] If the unit came from another distribution, suspect the default group names first. The same getent group run in two images:
| Name | Ubuntu 24.04 | Rocky Linux 9 |
|---|---|---|
nogroup | present (65534) | missing |
nobody | missing | present (65534) |
www-data | present (33) | missing |
apache | missing | missing |
("Missing" means getent exited 2.) The table only records what these two images showed; it varies with installed packages. In get_group_creds in the systemd 255 source, nobody or 65534 is accepted as nobody even when the system has no entry, but only when the build's group-name constant and the synthesize_nobody() condition match. No such branch is visible for nogroup. So an Ubuntu unit with Group=nogroup copied as-is to Rocky can fail with this error. Use a name that appears in that machine's getent output.
[5] Fix the name of the setting the journal message pointed to. Add a drop-in with a new file name instead of editing the main unit file. The default override.conf of systemctl edit may already hold other settings, so give the file a name with --drop-in=.
# systemctl edit --drop-in=fix-group myappIf Group= was wrong, add this in the editor and save, using the name you confirmed in [3].
[Service]Group=nobodyIf SupplementaryGroups= was wrong, fixing Group= does not help. That setting is an additive list, so the earlier line holding the bad entry must be cleared first (the manual says assigning an empty string resets earlier assignments). Then list all the groups you need again.
[Service]SupplementaryGroups=SupplementaryGroups=appgrpTo undo, delete only the file you created. Find its path by looking for fix-group.conf in the systemctl cat myapp output (usually /etc/systemd/system/myapp.service.d/fix-group.conf). After deleting it, run systemctl daemon-reload, and if the service was running, systemctl restart myapp to apply. Leave other files in that folder alone. systemctl edit reloads on save by itself, equivalent to daemon-reload.
If the group is really needed and the machine lacks it, create it instead of renaming; file ownership elsewhere may be set to that group name, so check existing file permissions before running groupadd.
[6] If the message is Changing group credentials failed:, the group was found but switching to it was refused. The manual says that for user services of any user other than root, switching user identity is not permitted. If a systemd --user unit contains User= or Group=, removing those lines is the first thing to try. Other causes of this message were not tested.
A user service has a different manager from a system service. systemctl defaults to --system, so without the option it can touch a system unit of the same name. Log in as that user and add --user to every command (systemctl --user cat myapp, systemctl --user edit --drop-in=fix-group myapp, and the commands in [7]). The drop-in then goes in that user's location (usually ~/.config/systemd/user/myapp.service.d/); confirm it with systemctl --user cat myapp.
[7] After the fix, reload the unit, clear the failed state and start it. These are for a system service.
# systemctl daemon-reload# systemctl reset-failed myapp# systemctl start myapp# systemctl status myapp --no-pagerWhen the Main PID: line no longer shows 216/GROUP and instead shows running or the program's own exit code, the group step passed.
Analyze your syslog · journal log in the browser ↗ — nothing is uploaded.