ChristianKuehnel/plantgateway

Pi Zero W | [Errno -3] Temporary failure in name resolution

xbmcnut opened this issue · 1 comments

Thanks for making this. Just tried this tonight but application won't start.

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install python3-pip build-essential libglib2.0-dev libyaml-dev (All OK)
  • sudo pip3 install --upgrade plantgateway
pi@pi-presencedown:~ $ plantgateway
Traceback (most recent call last):
  File "/usr/local/bin/plantgateway", line 37, in <module>
    main()
  File "/usr/local/bin/plantgateway", line 24, in main
    pg = PlantGateway()
  File "/usr/local/lib/python3.5/dist-packages/plantgw/__init__.py", line 130, in __init__
    self._start_client()
  File "/usr/local/lib/python3.5/dist-packages/plantgw/__init__.py", line 157, in _start_client
    self.mqtt_client.connect(self.config.mqtt_server, self.config.mqtt_port, 60)
  File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 839, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 962, in reconnect
    sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
  File "/usr/lib/python3.5/socket.py", line 694, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

What does that error mean?
Do you need http:// for MQTT address or just IP?

Seems the port is not optional as stated in the yaml file instructions?
#port of the mqtt server, optional if using 8883

Removed the # and put port 1883 and it works.