hi all,
i have a problem with the start of mosquitto…in the log file i have:
2018-11-25 18:59:04.427 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2018-11-25 18:59:04.433 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘broker’
2018-11-25 18:59:04.637 [ERROR] [penhab.io.transport.mqtt.MqttService] - Error starting broker connection
org.eclipse.paho.client.mqttv3.MqttException: Unable to connect to server
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:79) [205:org.openhab.io.transport.mqtt:1.12.0]
at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:650) [205:org.openhab.io.transport.mqtt:1.12.0]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:589) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:70) ~[?:?]
... 2 more
but i have:
[19:13:46] openhabian@casa:~$ mosquitto -v
1543169704: mosquitto version 1.4.10 (build date Wed, 17 Oct 2018 19:03:03 +0200) starting
1543169704: Using default config.
1543169704: Opening ipv4 listen socket on port 1883.
1543169704: Error: Address already in use
if i reboot the sysyem and do mosquitto -v the connection works for some seconds (with a nodemcu with espeasy log i can see the connection)
and after that i have the status of connection to exited:
[19:06:02] openhabian@casa:~$ systemctl status mosquitto
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
Loaded: loaded (/etc/init.d/mosquitto; generated; vendor preset: enabled)
Active: active (exited) since Sun 2018-11-25 18:58:10 CET; 8min ago
Docs: man:systemd-sysv-generator(8)
Process: 336 ExecStart=/etc/init.d/mosquitto start (code=exited, status=0/SUCC
CGroup: /system.slice/mosquitto.service
Nov 25 18:58:10 casa systemd[1]: Starting LSB: mosquitto MQTT v3.1 message broke
Nov 25 18:58:10 casa mosquitto[336]: Starting network daemon:: mosquitto.
Nov 25 18:58:10 casa systemd[1]: Started LSB: mosquitto MQTT v3.1 message broker
lines 1-10/10 (END)
[19:13:38] openhabian@casa:~$ netstat -a | grep 1883
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN
tcp 0 0 casa.station:1883 computer-5.station:6609 ESTABLISHED
tcp6 0 0 [::]:1883 [::]:* LISTEN
how can i do for fix this problem? thanks to all