HA Won't Start After Upgrade to 50.2

Updated HA to 50.2 and now it won’t start (let it sit 8+ hours after first reboot). Running Hassbian on an RPi2 for the last 6 months, no problem. I have uninstalled/reinstalled HA in the virtualenv to no avail. Here’s the log:

[email protected] - Home Assistant for homeassistant
   Loaded: loaded (/etc/systemd/system/[email protected]; enabled)
   Active: failed (Result: exit-code) since Wed 2017-08-02 07:36:34 UTC; 11min ago
  Process: 1615 ExecStart=/srv/homeassistant/bin/hass (code=exited, status=1/FAILURE)
 Main PID: 1615 (code=exited, status=1/FAILURE)

Aug 02 07:36:34 hassbian hass[1615]: import concurrent.futures._base
Aug 02 07:36:34 hassbian hass[1615]: File "/usr/lib/python3.4/concurrent/futures/__init__.py", line 17, in <module>
Aug 02 07:36:34 hassbian hass[1615]: from concurrent.futures.process import ProcessPoolExecutor
Aug 02 07:36:34 hassbian hass[1615]: File "/usr/lib/python3.4/concurrent/futures/process.py", line 55, in <module>
Aug 02 07:36:34 hassbian hass[1615]: from multiprocessing.connection import wait
Aug 02 07:36:34 hassbian hass[1615]: File "/usr/lib/python3.4/multiprocessing/connection.py", line 23, in <module>
Aug 02 07:36:34 hassbian hass[1615]: from . import reduction
Aug 02 07:36:34 hassbian hass[1615]: TypeError: source code string cannot contain null bytes
Aug 02 07:36:34 hassbian systemd[1]: [email protected]: main process exited, code=exited, status=1/FAILURE
Aug 02 07:36:34 hassbian systemd[1]: Unit [email protected] entered failed state.

Any ideas?

I had a similar problem.

Never had an issue upgrading before, and then on this upgrade the service failed to start after a reboot. I couldn’t tell you if my errors were the same as yours, but manually starting home assistant didn’t work either.

I decided that reinstalling was quicker than fault finding, and like yourself found that that made no difference initially. So I backed up all of my config, deleted the whole virtual environment, deleted the whole .homeassistant folder, and reinstalled from scratch (copying all my old config files back before running homeassistant for the first time).

It worked. My guess being that something went a knacker with the venv during upgrade. I don’t really understand that part of the system much, but I know there have been some changes to the upgrade process recently (something to do with saving dependencies differently, checking if you’re in a venv first, etc) and I figure something went wrong there. Maybe somebody with more technical knowledge can have a more educated guess, but I’m now back up and running on my old config, took about 40 minutes all in.

Like I say, I don’t know if this is the same issue that you’re having because I didn’t take much note of the error messages at the time. Hope this helps.

Some things are updated after the update script has finished. I would wait for 30 minutes and then reboot.

They said they’d waited for 8+ hours, so I suspect that’s enough :stuck_out_tongue_winking_eye:

Looks like.
I got tired of rebuilding every 3 or 4 updates and went to a straight unscripted install without the virtual environment. Simple and easy to fix if something goes wrong.

I had the same problem after the latest upgrade, even letting the system run over night didn’t help. Watching the logs didn’t help either, as there was no indication of where it was hanging. A complete hassbian install plus backed up configuration files solved the problem for me.

I guess I’ll go the reinstall route then - thanks for your input everyone!