まずsystemctlを使ってraspbianジェシーにmosquittoを開始できませんはこれをしなかった
● mosquitto.service - MQTT v3.1 message broker
Loaded: loaded (/etc/systemd/system/mosquitto.service; enabled)
Active: failed (Result: start-limit) since Sun 2017-01-01 19:44:03 GMT; 3min 23s ago
Process: 683 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=exited, status=1/FAILURE)
Main PID: 683 (code=exited, status=1/FAILURE)
Jan 01 19:44:03 raspberrypi systemd[1]: Unit mosquitto.service entered failed state.
Jan 01 19:44:03 raspberrypi systemd[1]: mosquitto.service holdoff time over, scheduling restart.
Jan 01 19:44:03 raspberrypi systemd[1]: Stopping MQTT v3.1 message broker...
Jan 01 19:44:03 raspberrypi systemd[1]: Starting MQTT v3.1 message broker...
Jan 01 19:44:03 raspberrypi systemd[1]: mosquitto.service start request repeated too quickly, refusing to start.
Jan 01 19:44:03 raspberrypi systemd[1]: Failed to start MQTT v3.1 message broker.
Jan 01 19:44:03 raspberrypi systemd[1]: Unit mosquitto.service entered failed state.
私はたくさんのグーグルを行って、いくつかの同様のユニットファイルを試しましたが、何も動作していないようです。 、.confファイルを指定せずに/usr/sbin/mosquitto
、すなわちを実行している、不思議
Error: Unable to open log file /var/log/mosquitto/mosquitto.log for writing.
Error found at /etc/mosquitto/mosquitto.conf:11.
Error: Unable to open configuration file.
正常に動作します:手動(/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
)コマンド
ランニング与えます。 /etc/mosquitto/mosquitto.confはデフォルトの.confファイルですので、指定しなくても使用する必要があります。
だから、 '/ usr/sbin/mosquitto -c/etc/mosquitto/mosquitto.conf'を使って手動でmosquittoを起動するとどうなりますか? –
@umläuteそれに対する答えはかなり長いので、私はそれを質問に入れました。 – Alex
質問に追加情報を入れてくれてありがとうございます(これは所属しています)。問題は主に権限があるようです(たとえば、間違ったユーザーとしてプロセスを実行しているなど)。 'journalctl -u mosquitto'の出力は何ですか(systemctl経由で起動しようとして失敗した後) –