status=217/USER
このD001615(ADユーザー)に従って存在しないことを意味するエラーコード(以下を参照)で、システムの起動時に開始されないsystemdサービスがあります。回答。
ただし、root を使用してサービスを手動で再起動すると、D001615 のように正常に実行されます。
[[email protected] SYST:~]# ps -Af --forest | grep runsvc
root 1439 1293 0 09:52 pts/0 00:00:00 \_ grep --color=auto runsvc
d001615 1340 1 0 09:51 ? 00:00:00 /bin/bash /opt/azagent/runsvc.sh
私はシステム管理者ではなく、LinuxサーバーがActive Directoryを使用するように構成されていることに注意してください。
起動時にサービスを実行するためにsystemdで使用できるユーザーアカウントをどのように確認できますか??試してみましたgetent passwd
が、にあるアカウント以外のアカウントは表示されません。/etc/passwd
特に、LDAPサーバーのPOSIXエントリは表示されません。
D001615でシステム起動時にサービスを実行するようにsystemdを構成する方法?
注:ルートからD001615に変更できたsu d001615
ため、D001615はホストのユーザーとして存在します。
systemctl status -l 'vsts.agent.azuredevops.Application\x20Security\x2dsds.host.example.net.service'
● vsts.agent.azuredevops.Application\x20Security\x2dsds.host.example.net.service - Azure Pipelines Agent (azuredevops.Application Security-sds.host.example.net)
Loaded: loaded (/etc/systemd/system/vsts.agent.azuredevops.Application\x20Security\x2dsds.host.example.net.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-11-24 06:17:35 CET; 3h 13min ago
Process: 2071 ExecStart=/opt/azagent/runsvc.sh (code=exited, status=217/USER)
Main PID: 2071 (code=exited, status=217/USER)
cat /etc/systemd/system/vsts.agent.azuredevops.Application\x20Security\x2dsds.host.example.net.service
[Unit]
Description=Azure Pipelines Agent (azuredevops.Application Security-sds.host.example.net)
After=network.target
[Service]
ExecStart=/opt/azagent/runsvc.sh
User=d001615
WorkingDirectory=/opt/azagent
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target