

Systemd Service Not Starting (status=217/USER)
source link: https://www.shellhacks.com/systemd-service-not-starting-status217-user/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Systemd Service Not Starting (status=217/USER)
A systemd service may fail to start with the error:
Main process exited, code=exited, status=217/USER
The status=217/USER
indicates that the user that is configured to run the service could not be found.
This could happen if there is a typo in a username or you have copied a service file from another machine and it contains the user that doesn’t exists on your system.
This also could happen if the user that should run the service is not the local one but comes from some external authentication provider, like LDAP or Active Directory.
This short note shows how to fix the “Main process exited, code=exited, status=217/USER” error for such external user.
Cool Tip: Display systemd service logs using the journalctl
command! Read More →
Main process exited, code=exited, status=217/USER
If the systemd service should be run as the user from external authentication provider, it could happen that it is started before the connection to LDAP or Active Directory server is established.
In this case you will get the “Main process exited, code=exited, status=217/USER” error.
To solve this issue you can delay the service startup by configuring it to start after the multi-user.target
:
# /etc/systemd/system/foo-daemon.service [Unit] After=network.target multi-user.target ...
The multi-user.target
means that the systemd service will start after everything that is needed for full system functionality is started (including the connection to external authentication providers).
Cool Tip: Systemd service file examples! Read More →
The update of the systemd service file as shown above followed by system reboot should fix the “Main process exited, code=exited, status=217/USER” error.
Recommend
-
15
来源:https://leetcode.com/problems/contains-duplicate/ 题目:包含重复数字的数组 给定一个字符串数组,看是否包含重复的数字。 如果包含重复你应该...
-
6
Searching Text in SQL Server (#217)95 viewsJul 20, 2021 ...
-
8
About ChrisChris Hass is an extremely driven and proven information security professional with extensive experience in Malware Reverse Engineering, Threat Intelligence, and Offensive Security Operations. In his cur...
-
9
LeetCode-217-存在重复元素发布于 今天 02:00 存在重复元素题目描述:给定一个整数数组,判断是否存在重复元素。如果存在一值在数组中...
-
6
How To Start Tmux as Systemd User Service 2021-03-30 :: 荒野無燈 :: Mod 2021-03-31(a7d6a6f) #tmux #systemd ...
-
10
LeetCodeLeetCode 第 217 题:存在重复元素DY发布于 十一月 21, 20211 mins.656 题目来源于 LeetCode 上第 217 题:存在重复元素。题目难度为 Easy,目...
-
7
这里记录每周值得分享的科技内容,周五发布。 本杂志开源(GitHub: r...
-
3
What’s it all Mean? on Web Rush #217 Ward and John - or is it an AI generated episode? - talk about the weird and wonderful world of AI, what it's capable of...
-
4
Hackaday Podcast 217: The Unintentional Space And 3D Printing Episode
-
8
英国黑五:PS5主机销量比去年同期暴增217% 搜狐 责任编辑:niuchuncheng 发布于:2023-12-11 09:04 由于游戏主...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK