thin-edge / thin-edge.io_examples

Apache License 2.0
6 stars 18 forks source link

mqtt_collector management-ui_mqtt_collector can't start process #30

Closed yucelzengin closed 1 year ago

yucelzengin commented 2 years ago

it is an infinitive re-start loop.

LOGS: Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

Connecting Mongo

Running MQTT tedge 8883

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 824, in create_connection

for res in getaddrinfo(host, port, 0, SOCK_STREAM):

File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo

for res in _socket.getaddrinfo(host, port, family, type, proto, flags):

socket.gaierror: [Errno -2] Name or service not known

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Traceback (most recent call last):

File "/app/main.py", line 9, in

mqtt.run()

File "/app/mqtt.py", line 46, in run

self.mqtt_client.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE)

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect

return self.reconnect()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect

sock = self._create_socket_connection()

File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection

return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)

File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection

raise err

File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

Connecting Mongo

Running MQTT tedge 8883

mbay-ODW commented 2 years ago

@sagIoTPower do you see where that comes from?

ck-c8y commented 2 years ago

In the new commit I added code to continue in case that the mqqt broker isn't up and running yet. This way the container isn't constantly rstarted.

@yucelzengin : Couls you test this agian.

Regards Christof

reubenmiller commented 1 year ago

Closing due to lack of response. Please reopen if your problem still persists.