HASS Image just randomly died

Been running HA for several months now first with the all-in-one, now with the image. Have ha-bridge installed which is the only other non-hass program I load. Boxing day, ha-bridge stopped working and when I cheked HA, that had died too. Samba not working, no webpage and the following error when I check the service status.

pi@raspberrypi:~ $ sudo systemctl status [email protected] -l
● [email protected] - Home Assistant for homeassistant
   Loaded: loaded (/etc/systemd/system/[email protected]; enabled)
   Active: failed (Result: exit-code) since Thu 2017-01-05 22:42:08 NZDT; 2min 57s ago
  Process: 451 ExecStart=/srv/homeassistant/bin/hass (code=exited, status=203/EXEC)
 Main PID: 451 (code=exited, status=203/EXEC)

Jan 05 22:42:08 raspberrypi systemd[1]: Started Home Assistant for homeassistant.
Jan 05 22:42:08 raspberrypi systemd[1]: [email protected]: main process exited, code=exited, status=203/EXEC
Jan 05 22:42:08 raspberrypi systemd[1]: Unit [email protected] entered failed state.

This is the 3rd time this has happened to me, twice using the all-in-one and now with HASSBian. Although it is much easier just to rebuild the whole system than to try and debug, I thought I’d see if anyone can point me in the right direction to at least try and see what went wrong so I can take steps to prevent it from happening again.

It was working with 0.34.5 on Xmas day on a Raspberry Pi2 then Boxing day, dead with no user interaction in between other than an automated Samba backup of the config files.

Is it worth trying to get it going again in an effort to understanding what broke?

For interest, this is what the ‘breakage’ whatever it was did to my ha-bridge folder.

And if I try and update HASS using source /srv/homeassistant/bin/activate, I get “no such file or directory”.

See this thread:

Sebastian

2 Likes

Thanks. Would I be better off then moving my HASS installation to my Synology?

It looks like you may have a microSD card on it’s way out. Might want to swap it out and rebuild.

Thanks. That can be the only explanation for folders that are completely missing! Shame, this is the 2nd card I’m on and I only use >8GB Class10 cards so it seems that Jessie is not reliable on Pi, or at least with HASS on it? I’ve been using Kodi on Pi ever since the first version and only ever encountered one corrupt card and that is a lot more demanding on the SD Card that HASS should ever be. I’ll move away from Pi based home automation I think and look to installing HASS directly on my NAS.

The constant 24/7 writes to the DB for polling state changes is part of the issue. Hass may not be extremely demanding, but it is constant.

I’ve heard about people running from usb drives rather than SD cards for increased longetivity.

I would think of thought it the other way around, I’m fairly sure Kodi does a lot less reading and writing to the card than Hass. Just a guess but I’m curious now.

If I look at the number of DNS queries etc originating from the Hass IP on my network it is more than anything else by a huge margin. Dark Sky and all my own local sensors, are all being updated regularly and the status recorded.

I’ve been looking to move away from SD cards because of the semi regular corruptions I experience.

Ah, of course. I’m installing HASS on my Synology NAS as we speak as I simply can’t afford to have my HA system go down, even if the rebuild is fairly easy. I have sprinklers and Google Home/Alexa integration that the family rely on and Dad looks like a dufus when this keeps happening. Unfortunately, my 7yr old Vera 2 is way more reliable at the moment.

I’m using hassbian as an image for my RPI. It killed two of my SD cards, and three of my friend’s cards (my cards worked ~1 week each, way too short!). So it looks like it’s a big issue of Hass on RPI which needs to be quickly investigated. Any workaround suggestion will be appreciated.

Agreed. Simply not a viable option at the moment as it is not reliable. Luckily, I have all of my config files backed up so the rebuild is easy but a pain nonetheless.

If the rebuilding image from backups were the only issue… But my cards are just dying, buying new cards constantly is not a solution

The issue is using cheap SD cards with Hass. I’ve been running hass non-stop on my RPI3 using a Samsung evo microSD card since September with absolutely no issues. I have rpi-clone running every week to keep a perfect mirror image of my boot card just in case, but I haven’t yet needed it. If you’re killing a card in a week, your issue isn’t the Hass as much as it’s the card.

Just checked brands of mines (the broken ones). One is Nokia and second Kingston, both 16GB. Both were used, but not too much, before I installed hassbian on them. I don’t think those are bad/cheap brands. Maybe it’s that they are just microSD and I suppose that your Samsung is microSDHC? I also try to avoid cheap Chinese no-names which I saw few times in my friend.

Mine are Samsung Evo too - I should point out it’s not my card that’s dying - I’m reusing the same one and have never needed to change cards. My issue is writing to the card during a poweroutage causing corruption.

I guess that’s a vote for Samsung Evo.

Be interested to hear how you go with the Synology @xbmcnut - I have an Xpenology NAS I could use but I’m thinking of going to a Celeron NUC with SSD. Or an Odroid as mentioned in the backup thread linked.

I’ve shied away from installing on my Synology as I did not want to mess up my beloved machine but I think I’m left with no choice. I played around with Docker but that got a bit too cumbersome for my liking. I’ve tried installing on my older DSM5x based machine but sadly it only has Python 3.4.1 and HA needs at least 3.4.2 that is present in DSM6x so looks like I’m messing with my main machine tonight!

Kingston can be a bit shite from my experience, and there’s no telling who actually made the Nokia.

My Samsung’s 64gb main and 32gb mirror) are both SDHC class 10 UHS 1.

I also have a Synology :slight_smile: Veeery old one (ds110j with DSM 5x on it), also with Python 3.4.1 installed from package manager. But I managed to install 3.4.2 by ssh and install HASS on it. But it is a little bit wired, I’m missing the option where I can find my all entities. Maybe I have something misconfigured?

Oooh :stuck_out_tongue: Can you advise how you got Python updated using the command line and I’ll try? Was it sudo apt-cache show python3 sudo apt-get install python3=3.5.1*

Unfortunately I haven’t made any notes from that process :frowning: I just remember that I was struggling with that for a half of a night and ended up with manual download and execution of Hass. BTW. I’m from Poland and it is middle of night right now here :slight_smile: I have to go to sleep! :slight_smile: Nice to be on board of this community, hope to learn and contribute

Sorry, it even looks I just lied to you by mistkae. Looks like I managed to run home assistant under Python 3.4.1?! Really…Don’t remember right now how I got it. Maybe this is the reason why I do not have option for entities :slight_smile:

DiskStation> ps | grep home
12060 homeassi 202m S /usr/local/homeassistant/env/bin/python3 -m homeassistant -c /usr/local/homeassistant/var --open-ui
19987 admin 4192 S grep home
DiskStation> /usr/local/homeassistant/env/bin/python3 --version
Python 3.4.1
DiskStation>