Page 1 of 1

Question about MQTT -problem

Posted: Thursday 19 January 2023 23:12
by BartSr
Hi,
My logfile shows:

2023-01-19 19:04:13.175 Error: MQTT: disconnected, restarting (rc=19/Unknown error.)
2023-01-19 19:04:28.253 Error: MQTT: Failed to start, return code: 14/Network is unreachable (Check IP/Port)
2023-01-19 19:05:01.377 Error: MQTT: Failed to start, return code: 14/No route to host (Check IP/Port)
2023-01-19 19:05:34.567 Error: MQTT: Failed to start, return code: 14/No route to host (Check IP/Port)
2023-01-19 19:22:36.973 Error: Otgw: Can not connect to: 192.168.2.108:6638

I don't know exact the meaning nor the meaning of the returncodes.
192.168.2.108:6638 is the IP#/port of the OTGW.
Is there anything I can do to prevent from these errors?
Before I met kind of same errors but could solve by disabling auto back-up of database.

Bart

Re: Question about MQTT -problem

Posted: Thursday 19 January 2023 23:48
by waltervl
If you use mqtt to communicate you should use the IP of the system running the mqtt broker (mostly mosquito) in Domoticz.

So otgw talks to broker, Domoticz talks to same broker. Domoticz is not talking directly with otgw.

So check your settings.

Re: Question about MQTT -problem

Posted: Friday 20 January 2023 8:44
by waltervl
Looking again it seems both MQTT and OTGW (not using MQTT) cannot connect to the systems in your network so it also can be a network issue.

Re: Question about MQTT -problem

Posted: Friday 20 January 2023 9:15
by BartSr
Thanks for your suggestion Waltervl.
But the strange thing is :
There are over 40 devices using MQTT.
Wifi is a mesh network with satellites (6 off) well spread over the house. So why only the OTGW cannot connect to the network.
But I realise this should be discussed in other forum.
-Bart

Re: Question about MQTT -problem

Posted: Friday 20 January 2023 22:15
by BartSr
I somewhere read in the forum to change the ip# of mosquitto into localhost. So let's see if this makes sense to this case. Meanwhile I changed update of CO2 sensor to 60 sec. Iso 5 sec.

Re: Question about MQTT -problem

Posted: Saturday 21 January 2023 22:05
by FlyingDomotic
As messages "Network is unreachable" and "No route tohost", this can be (roughly):
1) local host not connected to Wifi. Check with ifconfig if interfaces are connected (have IP @). Try to ping some remote nodes. If you have access to Wifi router, try to see if node is connected.
2) destination server is not on the same network and router is not available, or route not properly propagated to local host. Depending on your os, try "route print" or "ip route" to see if you can find some route to destination. Try to ping router to see if it respond.