azure-iot-sdk-python: ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')

Hi i am having this problem, this is for azure-iot-device 2.1.0

Any ideas? thanks in advance

ERROR:azure.iot.device.common.pipeline.pipeline_stages_mqtt:transport.connect raised error
02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_stages_mqtt:Traceback (most recent call last):
02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/common/mqtt_transport.py", line 367, in connect
02.03.20 14:34:40 (-0700)  core      host=self._hostname, port=8883, keepalive=DEFAULT_KEEPALIVE
02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect
02.03.20 14:34:40 (-0700)  core      return self.reconnect()
02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect
02.03.20 14:34:40 (-0700)  core      sock = self._create_socket_connection()
02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
02.03.20 14:34:40 (-0700)  core      return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
02.03.20 14:34:40 (-0700)  core    File "/usr/lib/python3.7/socket.py", line 707, in create_connection
02.03.20 14:34:40 (-0700)  core      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
02.03.20 14:34:40 (-0700)  core    File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
02.03.20 14:34:40 (-0700)  core      for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
02.03.20 14:34:40 (-0700)  core  socket.gaierror: [Errno -3] Temporary failure in name resolution
02.03.20 14:34:40 (-0700)  core  
02.03.20 14:34:40 (-0700)  core  The above exception was the direct cause of the following exception:
02.03.20 14:34:40 (-0700)  core  
02.03.20 14:34:40 (-0700)  core  Traceback (most recent call last):
02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/common/pipeline/pipeline_stages_mqtt.py", line 117, in _run_op
02.03.20 14:34:40 (-0700)  core      self.transport.connect(password=self.sas_token)
02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/common/mqtt_transport.py", line 387, in connect
02.03.20 14:34:40 (-0700)  core      raise exceptions.ConnectionFailedError(cause=e)
02.03.20 14:34:40 (-0700)  core  azure.iot.device.common.transport_exceptions.ConnectionFailedError: ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
02.03.20 14:34:40 (-0700)  core  
02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_ops_base:ConnectOperation: completing with error ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_stages_base:ConnectionLockStage(ConnectOperation): op failed.  Unblocking queue with error: ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_ops_base:ConnectOperation: completing with error ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.async_adapter:Callback completed with error ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.async_adapter:["azure.iot.device.common.transport_exceptions.ConnectionFailedError: ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')\n"]

AB#7366699

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 34 (12 by maintainers)

Most upvoted comments

@MiguelCHR - you can remove almost all of the logging by calling logging.getLogger("azure.iot.device").setLevel(level=logging.ERROR). If that is still too much, you can pass level=logging.CRITICAL.