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
NetBird systemd service fails after package update due to missing log directory
Description
After updating NetBird through the package manager, the systemd service fails to start with exit code 209/STDOUT. The root cause is that the uninstaller removes the /var/log/netbird/ directory during package updates, but the installer/updater does not recreate it.
Check service status: sudo systemctl status netbird
Service fails with exit code 209/STDOUT
Expected Behavior
The NetBird service should start successfully after package updates without manual intervention.
Actual Behavior
The service fails to start because the log directory /var/log/netbird/ is missing.
Error Logs
May 23 09:16:50 Kim-UB25-TP systemd[1]: Started netbird.service - A WireGuard-based mesh network that connects your devices into a single private network..
May 23 09:16:50 Kim-UB25-TP (netbird)[28159]: netbird.service: Failed to set up standard output: No such file or directory
May 23 09:16:50 Kim-UB25-TP (netbird)[28159]: netbird.service: Failed at step STDOUT spawning /usr/bin/netbird: No such file or directory
May 23 09:16:50 Kim-UB25-TP systemd[1]: netbird.service: Main process exited, code=exited, status=209/STDOUT
May 23 09:16:50 Kim-UB25-TP systemd[1]: netbird.service: Failed with result 'exit-code'.
The package post-install script should ensure the log directory exists:
Check if /var/log/netbird/ exists
If not, create it with appropriate permissions
This should be done in both the installer and updater scripts
Additional Context
The systemd service configuration expects to write logs to /var/log/netbird/client.log as specified in the ExecStart command:
ExecStart=/usr/bin/netbird service run --config /etc/netbird/config.json --log-level info --daemon-addr unix:///var/run/netbird.sock --log-file /var/log/netbird/client.log
This appears to be a packaging issue where the uninstall process (during updates) removes the log directory but the install process doesn't recreate it.
The text was updated successfully, but these errors were encountered:
Resolvesnetbirdio#3866 where NetBird service fails to start after package updates
due to missing /var/log/netbird directory.
Changes:
- Add ensure_required_directories() function to post_install.sh that creates
all required directories (/var/log, /var/run, /var/lib, /var/cache)
- Create systemd tmpfiles.d configuration for proper directory management
- Update goreleaser config to include tmpfiles in deb/rpm packages
- Ensure directories are created during both fresh installs and upgrades
This fix ensures NetBird can start successfully after package updates by
guaranteeing all required directories exist with proper permissions.
NetBird systemd service fails after package update due to missing log directory
Description
After updating NetBird through the package manager, the systemd service fails to start with exit code 209/STDOUT. The root cause is that the uninstaller removes the
/var/log/netbird/
directory during package updates, but the installer/updater does not recreate it.Environment
Steps to Reproduce
sudo systemctl status netbird
Expected Behavior
The NetBird service should start successfully after package updates without manual intervention.
Actual Behavior
The service fails to start because the log directory
/var/log/netbird/
is missing.Error Logs
Workaround
Manually create the log directory after updates:
Proposed Solution
The package post-install script should ensure the log directory exists:
/var/log/netbird/
existsAdditional Context
The systemd service configuration expects to write logs to
/var/log/netbird/client.log
as specified in the ExecStart command:This appears to be a packaging issue where the uninstall process (during updates) removes the log directory but the install process doesn't recreate it.
The text was updated successfully, but these errors were encountered: