Trouble updating Home Assistant...among a cluster of issues

I have HA installed on a Raspberry Pi 3 using the AIO installer. I tried both update methods here (fabric and manually). Here’s a copy of my manual SSH:

pi@raspberrypi:~ $ sudo su -s /bin/bash hass
hass@raspberrypi:/home/pi$ source /srv/hass/hass_venv/bin/activate
(hass_venv) hass@raspberrypi:/home/pi$ pip3 install --upgrade homeassistant

Both methods gave me connection errors like this:

Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by ‘New ConnectionError(’<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7600b0b0>: Failed to establish a new connection: [Errno -2] Name or service not known’,)': /simple/homeassistant

Furthermore, I’m thinking the cause has also caused other problems in my home assistant configuration. For example, I wasn’t able to get pushbullet to work. It gave me a bootstrap error, so I just removed that from my config for the time being. Now I’m getting a bootstrap error for nmap_tracker. Here are my current errors in HA:

16-09-14 14:44:46 homeassistant.components.updater: Could not contact PyPI to check for updates
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 142, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py", line 75, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.4/socket.py", line 530, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
    chunked=chunked)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
    self._validate_conn(conn)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
    conn.connect()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 254, in connect
    conn = self._new_conn()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 151, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7375dbf0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 640, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py", line 287, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/homeassistant/json (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7375dbf0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/updater.py", line 47, in get_newest_version
    req = requests.get(PYPI_URL)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/api.py", line 70, in get
    return request('get', url, params=params, **kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/homeassistant/json (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7375dbf0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
16-09-14 14:47:16 homeassistant.bootstrap: Not initializing device_tracker.nmap_tracker because could not install dependency python-nmap==0.6.1
16-09-14 14:47:18 homeassistant.components.recorder: Ended unfinished session (id=91 from 2016-09-14 18:41:27.900057)
16-09-14 14:47:18 homeassistant.components.recorder: Found unfinished sessions

Please let me know if you have any ideas! :scream:

Other than released updates, have you installed any libs or made any other modifications to your HASS code, either while logged in as the HASS user or by using sudo?

No I don’t think so. I’m talking to some folks in chat who think maybe my Pi doesn’t have a DNS server set up? I’m investigating that. I did follow a tutorial for setting a static IP:
https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update

SOLVED!

Following the tutorial above. I changed my domain_name_server to 8.8.8.8

interface eth0

static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=8.8.8.8

1 Like

That’s great news man! Thanks for sharing the solution!

1 Like