問題
次のような systemd サービスがあるとします
service_unit.ini
[Unit]
Description=My Service
[Service]
ExecStart=/usr/bin/my-service
User=myuser
[Install]
WantedBy=multi-user.targetしかし、ログ(systemctl status my-service)に次のエラーが表示されます:
journalctl-log.txt
Jun 19 18:41:36 mycomputer (nice)[1349797]: my-service.service: Failed to determine user credentials: No such process
Jun 19 18:41:36 mycomputer systemd[1]: my-service.service: Main process exited, code=exited, status=217/USER解決策
理由は非常に単純です: User= ディレクティブで指定したユーザーがシステムに存在しません。
ユーザーのスペルミスを確認し、サービスを実行しているコンピュータ上に実際に存在することを検証してください。
同じカテゴリの類似記事をチェック:
Systemd
この記事が役に立った場合は、TechOverflow での新しい記事の調査と公開を支援するため、「Buy Me a Coffee」でのご支援、または PayPal 経由でのご寄付をご検討ください