Can't upgrade from 0.90.2 to 0.91.2

I’m having some troubles upgrading hass.io from 0.90.2 to 0.91.2 running on a virtual machine using the official VDI.

In the Hass.io panel, I clicked Upgrade, and the update button showed the spinning circle for about 3-4 minutes before stopping. I then opened the VM and from the command line ran ha update. After 3-4 minutes or so, I get “Unknown error”.

I then went and set logging level to debug in my configuration.yaml and tried again. This time I got this message:

2019-04-11 00:40:24 DEBUG (SyncWorker_0) [botocore.utils] Caught exception while trying to retrieve credentials: HTTPConnectionPool(host=‘169.254.169.254’, port=80): Max retries exceeded with url: /latest/meta-data/iam/security-credentials/ (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPConnection object at 0x7f562df89c18>, ‘Connection to 169.254.169.254 timed out. (connect timeout=1)’))
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/connection.py”, line 134, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/util/connection.py”, line 88, in create_connection
raise err
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/util/connection.py”, line 78, in create_connection
sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py”, line 544, in urlopen
body=body, headers=headers)
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py”, line 349, in _make_request
conn.request(method, url, **httplib_request_kw)
File “/usr/local/lib/python3.7/http/client.py”, line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py”, line 130, in _send_request
self, method, url, body, headers, *args, **kwargs)
File “/usr/local/lib/python3.7/http/client.py”, line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.7/http/client.py”, line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py”, line 157, in _send_output
self.send(msg)
File “/usr/local/lib/python3.7/site-packages/botocore/awsrequest.py”, line 242, in send
return HTTPConnection.send(self, str)
File “/usr/local/lib/python3.7/http/client.py”, line 956, in send
self.connect()
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/connection.py”, line 155, in connect
conn = self._new_conn()
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/connection.py”, line 139, in _new_conn
(self.host, self.timeout))
botocore.vendored.requests.packages.urllib3.exceptions.ConnectTimeoutError: (<botocore.awsrequest.AWSHTTPConnection object at 0x7f562df89c18>, ‘Connection to 169.254.169.254 timed out. (connect timeout=1)’)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/adapters.py”, line 370, in send
timeout=timeout
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/connectionpool.py”, line 597, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/util/retry.py”, line 271, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
botocore.vendored.requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘169.254.169.254’, port=80): Max retries exceeded with url: /latest/meta-data/iam/security-credentials/ (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPConnection object at 0x7f562df89c18>, ‘Connection to 169.254.169.254 timed out. (connect timeout=1)’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/botocore/utils.py”, line 174, in _get_request
response = requests.get(url, timeout=timeout)
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/api.py”, line 69, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/api.py”, line 50, in request
response = session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/sessions.py”, line 465, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/sessions.py”, line 573, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/site-packages/botocore/vendored/requests/adapters.py”, line 419, in send
raise ConnectTimeout(e, request=request)
botocore.vendored.requests.exceptions.ConnectTimeout: HTTPConnectionPool(host=‘169.254.169.254’, port=80): Max retries exceeded with url: /latest/meta-data/iam/security-credentials/ (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPConnection object at 0x7f562df89c18>, ‘Connection to 169.254.169.254 timed out. (connect timeout=1)’))
2019-04-11 00:40:24 DEBUG (SyncWorker_0) [botocore.utils] Max number of attempts exceeded (1) when attempting to retrieve data from metadata service.

So that tells me that it’s server-side, not client-side, but I’m not sure, as I haven’t seen anyone else mention this. I’ve been able to update reliably, and I’m able to access my HA instance from the internet (using DuckDNS), plus it can connect to the internet just fine (pinging Google from the command line assures me google.com is alive).

Any clues?

I got this sorted in the end. Turns out the disk was full, and strangely Home Assistant was throwing a 404 error saying the image couldn’t be found.

So I followed these steps to resize the virtual disk image to 50gb and now Home Assistant updates just fine.

I didn’t think of disk space because

  1. I assumed it’d have more than 6gb total disk space, being designed for PCs, servers etc. where space isn’t as tight
  2. There was no indication in HA that the disk was full – I had to open Virtualbox, login to the shell, run bash in the docker container, then run df -h

If you’re on a Raspberry Pi, migrating to a bigger SD card is the solution, as the Pi images are bound by the actual disk size, not 6gb.

1 Like

Splendid explanation, saved my day! Really strange there isn’t a better error message, but the steps you linked to helped me solve my case! Thanks for posting.