Systemd サービス: メソッド呼び出しを実行できません。ユニットサービスが失敗しました。

Systemd サービス: メソッド呼び出しを実行できません。ユニットサービスが失敗しました。

VPSでカスタムサービスを提供しようとしています。ただし、実行は許可されません。次のように言います。何が起きているのか分かりませんが、Ubuntuノートブックで実行すると正常に動作します。何が問題なのでしょうか?

sudo systemctl は websocket.service を起動します。

Failed to issue method call: Unit websocket.service failed to load: No such file or directory. See system logs and 'systemctl status websocket.service' for details.

Cat/lib/systemd/system/websocket.service

[Unit]
Description=php webSocket
After=syslog.target network.target

[Service]
User=root

Type=simple
ExecStart=/webs.sh
TimeoutStopSec=20
KillMode=process
Restart=always
RestartSec=2

[Install]
WantedBy=multi-user.target
Alias=websocket.service

猫/webs.sh

#!/usr/bin/php /server.php
### BEGIN INIT INFO
# Provides:          webSocket
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: php webSocket
# Description:       php webSocket
### END INIT INFO

これを試しましたが、systemctl daemon-reload次のメッセージが表示されます。:

Attempted to remove disk file system, and we can't allow that.
Ignoring /etc/systemd/system/multi-user.target.wants/ssh.service -> /lib/systemd/system/ssh.service for systemd deputy init
Ignoring /etc/systemd/system/multi-user.target.wants/rsyslog.service -> /lib/systemd/system/rsyslog.service for systemd deputy init
Ignoring /etc/systemd/system/multi-user.target.wants/bind9.service -> /lib/systemd/system/bind9.service for systemd deputy init
Ignoring /etc/systemd/system/timers.target.wants/phpsessionclean.timer -> /lib/systemd/system/phpsessionclean.timer for systemd deputy init

サーバーも再起動しましたが、何もありませんでした。何が起こっているのかヒントを与えることができる人がいますか?

ベストアンサー1

おすすめ記事