-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Home Assistant 2022.2 not starting #52
Comments
Oh 💩 I'm in the process of spinning up a TrueNAS CORE instance to have a look |
Thank you very much 😁 |
Same here. Had to roll back to snapshot from before upgrade... |
Exactly, same here. This time around snapshots were a godsend. Thanks for the feedback 😊 |
On the release party on youtube channel they've just confirmed the fix - there is a supported os check included by default which can be overridden by a command line parameter. @tprelog is about to implement a fix :) This is fast support :) |
Yeah, I have it as a habit since a few months to always take a snapshot just before any upgrades... |
I have periodic snapshots everyday for the whole pool, so I can always use those even in the worst case possible (which is me forgetting to do important stuff lol).
Being it a known command line parameter, is it something I can do even before a new release of this integration? I mean, not that I'm so in a hurry, but it would be great. I can't wait to set up local Google Assistant feature, you know ahah |
Ok here's the fix iocage console $jail_name
#Press 0 to exit menu
ee /usr/local/etc/rc.d/homeassistant Edit line HA_ARGS="--ignore-os-check --config ${homeassistant_config_dir}" Press Finally start Home Assistant service homeassistant start |
It's working, thank you so much, amazing support! 😁 |
Yes, HA starts although it took a very long time. Also need to update the zwavejs2mqtt plugin as it requires latest version now (and this one also takes quite a long time). Let's see if anything else is broken... |
@adorobis you must be on an older version of the plugin -- recent version should show the plugin version on the main menu |
Plugin is updated now. Running a Plugin UPDATE will apply required changes. |
Indeed, I don't remember when doing the last update, for sure before November last year. I think I've only tried to update the plugin once in the past and it failed so was rather not doing it later. Is the plugin snapshot also allowing to roll back to before the plugin Update? |
I think you can still see your version in the POST INSTALL NOTES Getting a bit off topic, this is kinda an area I'm torn between just leaving well enough alone or some further development effort. For example I've debated in my head if we should have a way to run an update from the menu, that will only update files contained in the plugin overlay. Aside from changes to the plugin manifest, which are less frequent, that would essentially allow you to keep the "plugin" updated without running a Plugin UPDATE. |
Follow up on the original issue: basically it seems to happen still, when I restart home assistant server from home assistant GUI. It's not a big issue, since it doesn't happen when restarting the whole jail (and of course it doesn't happen when launching from shell, either), but I think it made sense to report it anyways. |
Yeah, pretty old here: |
I'm always restarting entire jail as some integrations don't reload properly when just restarting the service or from GUI (e.g. yamaha integration seems to keep some tcp connections open) |
Unfortunately, I don't think I can affect how the GUI works. It is possible, (already a good case for the new button entity helper) to trigger the You could probably restart the entire jail as well but that will be a little more involved, getting into using the TrueNAS API |
No but you can it manually for now... If you'd like, let's open a separate discussion about it |
@piereligio - think we have a workaround for the restart issue. I've already updated the plugin https://github.com/tprelog/iocage-homeassistant/releases/tag/v7-2022.2.3 If you'd rather update your rc script manually instead, just apply these changes like we did above |
Thank you very much 😁 |
It took longer than usual to start after upgrading to 2022.2.0 In the mean time check if the service is running (option 2 on that menu screen) and if there are any messages in the log file ( |
Thanks for the reply! How much longer - like half an hour or more? If so, I will let it sit all afternoon. Option 2:
Nothing exciting in the logfile. It appears to have started up successfully at least once after upgrading because it was griping about a Volumio device loading slowly. Every subsequent restart of the service or reboot of the jail, nothing happens. The log file was >300 MB so I renamed it and created a new logfile "home-assistant.log" and ensured it had the right permissions and owner. When I restart the home assistant service, the logfile stays at filesize zero. As a sanity-check I searched the jail for other instances of "home-assistant.log" (found none) and double-checked the mount point mapping (appears unchanged). I tried running the upgrader again from the console, all requirements are already satisfied, and it signs off with these lines again:
... and logfile remains empty. Running service -e in the console, I also see "/usr/local/etc/rc.d/homeassistant" running. Any thoughts are appreciated. The empty logfile is strange. And sorry if this is not the right place to troubleshoot (please advise if not), but it seemed relevant. EDIT: Before anyone wastes any time on my reply... I think I have found a workaround. I shut down the old jail, built a new jail from scratch, and pointed it at my config directory (which I'd externalized per the documentation). Everything has been booting up for 20 minutes - verrrry slowly as adorobis said - but at least it all seems to be working. Glad I read the original instructions and set that up!! I have to run a cat to the vet right now but you can assume that if I don't update this post again, it's all working. Not sure where I went wrong. Thanks again all. Love this integration. FINAL UPDATE: All appears to be well. HA is back and my cat's shots are up to date. Not sure what the issue was, but as a colleague used to say I'm going to "back away slowly". Thanks to all the contributors! |
Hi @b-neufeld sorry for the trouble, but glad to hear you got it sorted... and thank you @adorobis for jumping in Just a quick follow up here
There is at least one report of someone waiting around 45 minutes for Home Assistant to come back after an update... But that was after a Plugin UPDATE which reinstalled Home Assistant during the process. (That's when I decided I would not reinstall home assistant automagically anymore on future updates, even when I know it needs to be.)
That could be normal - The default log level in HA is set to warning so we typically don't see anything until it breaks. I was just sharing with @adorobis in this discussion, some ideas to change the log levels |
I'm afraid it isn't. Neither officially nor actively supported. Point me to the place where it states otherwise. |
Sorry @UraniumDonut but FreeBSD has never been supported by Home Assistant. We are lucky that for the most part it just works. Please see this Home Assistant ADR for details |
I'm having the same issue after upgrading to 2022.2.3 - I previously had 2021.3.4 which stopped successfully restarting with the WebUI in HA, only when restarting the jail would it come back up. I thought updating the plugin / upgrading with the shell would help (I've tried both) but I've not been able to get the UI working for several hours. |
Hi @aliekiddo - What you are facing is likely more than this issue alone, which is caused by a new OS check implemented by Home Assistant.
That's a really big jump for Home Assistant and this plugin. I imagine there are a few breaking changes you'll need to address with Home Assistant, including the required (yearly) python upgrade. If you are using an external dataset for your configuration, I would suggest just doing a clean install of the plugin and remount your configuration there. Otherwise you'll first need to run a Plugin UPDATE from the TrueNAS UI. This should ensure you have the new python version installed as well as other files that have since been updated in this plugin, including the fix for the OS check. Next you'll need to manually switch python versions and rebuild the virtualenv for Home Assistant iocage console $JAIL_NAME
# press 0 to exit menu
sysrc homeassistant_python=/usr/local/bin/python3.9
service homeassistant reinstall homeassistant Also it will take some time for Home Assistant to reinstall itself. It will still be downloading and compiling additional python packages in the virtualenv, depending on the number of integrations and your NAS hardware, this could take awhile. There's a way, mentioned in this discussion comment to gain some feedback about what's happening by setting the Home Assistant logger integration to |
I didn't realise until recently that updating the plugin wasn't updating the Home Assistant version. I thought I had ran an upgrade in the Home Assistant console last week before this, but I know from another github thread I was running 2021.3.4 8 days ago - I just thought the TrueNAS version ran behind the current version.
I am not using an external dataset unfortunately for a quick fix. I started a plugin update at 08:50, I was getting a lot of 'lua script failed' After a while TrueNAS kicked me out of the WebUI and I lost the ability to see what stage it was at. As far as I can see it's still sitting at 0% at 11:30, is it normal to take this long? Edit: It's now saying it's failed with error: list index out of range |
Ugh, sorry for the trouble @aliekiddo First and most important, Do not delete this jail. In any case we can still recover your configuration. While it is possible to further troubleshoot and repair this installation, I'm afraid it could be rather time intensive since the process can be some trial and error. Can I instead offer to help you get setup with a new installation? I can help you either move configuration to an external dataset now or transfer it directly to a new installation. I was reading through the Home Assistant beta release notes for version EDIT: Just tested a clean install of the plugin does complete without issue. I updated to the beta release to have a look at the backup integration. So far it just creates a backup and allows you to easily download it from the Home Assistant UI - Maybe an upload function will come in a future release but nothing there now. It's still possible to upload files using the file editor though. Is it worth starting a discussion about trying to add some sort of restore function ourselves. Or do we just have some commands to copy and paste in the terminal to manually restore? |
Thank you @tprelog and yes please. I tried updating Python and reinstalling Home Assistant with the lines above but It kept saying it didn't recognise the command 'homeassistant' after the failed plugin update. I tried to restore from several different snapshots but it that didn't seem to do anything, after it was done it didn't roll back to 2021.3.4. I tried following this installation guide to reinstall but I kept coming up against errors. I've tried a couple of times to install a new HA plugin but it's got stuck at 50% and said the jail was corrupt. |
I don't really know where to ask, I'm not sure if this issue is because of the integration or of Home Assistant Core itself.
Basically what happens is that if I try to upgrade homeassistant service from the shell of this integration, what happens is that homeassistant service won't start. It prints "Home assistant only supports Linux, OSX and Windows using WSL", then it says it is launched with the local URL where I should be able to open the GUI, but it will never be accessible. If I check the status of the service giving input 2, it will say that homeassistant isn't running, and if I restart, it tells me something like "home assistant not running check homeassistant_daemon.pid" .
Basically the question if it is only matter of time before 2022.2 will get supported, or if it's my installation that got bugged up somehow, or if I have something to edit in the configuration files.
Thanks in advance.
The text was updated successfully, but these errors were encountered: