2016-10-30 2 views
0

내가 라즈베리 파이에 Mosquitto를 설치 붙어있어 - 나는 그것을 설치 :Mosquitto에 라즈베리 파이

pid_file /var/run/mosquitto.pid 

persistence true 
persistence_location /var/lib/mosquitto/ 
log_timestamp true 
password_file /etc/mosquitto/passwd 


listener 1883 127.0.0.1 
listener 8883 


log_dest file /var/log/mosquitto/mosquitto.log 

include_dir /etc/mosquitto/conf.d 

로그 서비스가 &입니다 보여줍니다 :

aptitude install mosquitto mosquitto-clients python-mosquitto libmodule-pluggable-perl 

이 내 구성이다 달리기 :

* mosquitto.service - LSB: mosquitto MQTT v3.1 message broker Loaded: loaded (/etc/init.d/mosquitto) Active: active (exited) since So 2016-10-30 22:20:56 CET; 10s ago 
Process: 2065 ExecStop=/etc/init.d/mosquitto stop (code=exited, status=0/SUCCESS) 
Process: 2071 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCCESS) 

Okt 30 22:20:56 elfriede mosquitto[2071]: Starting network daemon:: mosquitto. 
Okt 30 22:20:56 elfriede systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker. 

netstat -an | grep 1883은 아무 것도 보여주지 않으며 항구는 듣지 않습니다. 어떤 힌트? 무엇이 잘못 되었습니까?

+0

실제로 실행 중인지 확인하려면'ps -efc | grep mosquitto'서비스를 멈추고 수동으로 실행하여'mosquitto -c/etc/mosquitto/mosquitto.conf' 설정 파일을 확인하십시오. – hardillb

+0

고마워요! mosquitto.conf에 문제가있었습니다 (로그 폴더에 액세스 할 수 없음). – tringler

답변

-1

netstat -an| grep 1883에 아무 것도 표시되지 않으면 1883이 모스키토 브로커 구성 파일의 수신기로 구성되어 있으므로 모스키토가 실행되지 않을 수 있습니다. 또한 모기가 실행 중인지 확인할 수 있도록 ps aux|grep mosquitto을 실행하는 모기 프로세스를 확인하십시오. sudo service mosquitto status도 모기 서비스 상태를 확인하십시오.

실행하면 모스키토 프로세스를 죽이는 것이 더 좋습니다 killall -9 mosquitto.

실행할 수없는 경우 모기를 실행하려면 mosquitto -c /etc/mosquitto/mosuitto.conf을 실행할 수 있습니다. 여기서 설정 파일의 경로를 사용할 수 있습니다. 데몬 프로세스로 모스 킷을 실행할 수 있습니다. mosquitto -c /etc/mosquitto/mosuitto.conf -d