Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Connections refused in mosquitto 1.4.2 on raspian

Hi group,

i put mosquitto 1.4.2 (from mosquitto.org) onto a fresh raspian on my Raspberry Pi A+.

For a local GPIO client on my Pi i used mqtt-gpio-monitor from sumnerboy on github.

Whatever i try, it always says “Connection refused” be it on the localhost or on another pi (named fhem):

On fhem:
2015-06-07 12:02:52,871 INFO  Starting mqtt-gpio-monitor
2015-06-07 12:02:52,874 INFO  INFO MODE
2015-06-07 12:02:52,876 DEBUG DEBUG MODE
2015-06-07 12:02:52,878 DEBUG INIFILE = mqtt-gpio-monitor.ini
2015-06-07 12:02:52,880 DEBUG LOGFILE = mqtt-gpio-monitor.log
2015-06-07 12:02:52,887 INFO  RPi.GPIO module detected...
2015-06-07 12:02:52,890 DEBUG Monitoring pins [21, 22, 23, 24]
2015-06-07 12:02:52,901 DEBUG Initialising GPIO input pin 21...
2015-06-07 12:02:52,904 DEBUG Initialising GPIO input pin 22...
2015-06-07 12:02:52,906 DEBUG Initialising GPIO input pin 23...
2015-06-07 12:02:52,908 DEBUG Initialising GPIO input pin 24...
2015-06-07 12:02:52,911 DEBUG Connecting to fhem.fritz.box:1833...
2015-06-07 12:05:00,399 ERROR Error connecting to fhem.fritz.box:1833: [Errno 111] Connection refused

on localhost:
2015-06-07 12:20:28,412 INFO  Starting mqtt-gpio-monitor
2015-06-07 12:20:28,415 INFO  INFO MODE
2015-06-07 12:20:28,417 DEBUG DEBUG MODE
2015-06-07 12:20:28,418 DEBUG INIFILE = mqtt-gpio-monitor.ini
2015-06-07 12:20:28,420 DEBUG LOGFILE = mqtt-gpio-monitor.log
2015-06-07 12:20:28,428 INFO  RPi.GPIO module detected...
2015-06-07 12:20:28,430 DEBUG Monitoring pins [21, 22, 23, 24]
2015-06-07 12:20:28,441 DEBUG Initialising GPIO input pin 21...
2015-06-07 12:20:28,445 DEBUG Initialising GPIO input pin 22...
2015-06-07 12:20:28,447 DEBUG Initialising GPIO input pin 23...
2015-06-07 12:20:28,449 DEBUG Initialising GPIO input pin 24...
2015-06-07 12:20:28,451 DEBUG Connecting to localhost:1833...
2015-06-07 12:20:28,460 ERROR Error connecting to localhost:1833: [Errno 111] Connection refused

Another issue is the mosquitto log where i find some errors besides successes:

Jun  7 12:12:20 fhem mosquitto[8705]: Socket read error on client mosq_sub_7220_raspberr, disconnecting.

This error reports a malfunction of mosquitto_sub which ran on another terminal session.

Now what is the right approach to a clean and working setup?

Here my msquitto.conf for details:

pi@raspberrypi $ cat /etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /var/run/mosquitto.pid

allow_anonymous true
autosave_interval 1800

connection_messages true

log_dest file /var/log/mosquitto/mosquitto.log
log_dest stderr
log_dest topic
log_type error
log_type warning
log_type notice
log_type information
log_type all
log_type debug
log_timestamp true

#message_size_limit 10240

#password_file jp.pw
#acl_file jp.acl

persistence true
persistence_location /tmp/
persistence_file mosquitto.db
persistent_client_expiration 1m

#pid_file xxxx

retained_persistence true

listener 1883
listener 8883

tls_version tlsv1
cafile /etc/mosquitto/ca_certificates/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key
require_certificate false


#include_dir /etc/mosquitto/conf.d

Thank you very much for your help!

Regards
Bernd

Back to the top