Cannot use 'restart' from UI

For whatever reason my HA fails to start when I use the restart function through the web interface. Same goes for updates - HA simply will not start correctly. My log shows the first few seconds after a restart, but then simply ‘stops’

2018-09-30 19:13:16 WARNING (MainThread) [homeassistant.components.http] legacy_api_password support has been enabled. If you don't require it, remove the 'api_password' from your http config.
2018-09-30 19:13:20 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=82 from 2018-09-30 16:59:41.976560)
2018-09-30 19:13:26 ERROR (SyncWorker_11) [miio.device] Unable to discover a device at address 192.168.0.65
2018-09-30 19:13:26 ERROR (MainThread) [homeassistant.components.light.xiaomi_miio] Got exception while fetching the state: Unable to discover the device 192.168.0.65
2018-09-30 19:13:27 WARNING (MainThread) [homeassistant.loader] You are using a custom component for variable which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-09-30 19:13:27 WARNING (MainThread) [homeassistant.loader] You are using a custom component for media_player.xboxone which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-09-30 19:13:31 WARNING (MainThread) [homeassistant.components.climate.generic_thermostat] No previously saved temperature, setting to 21.0

Once I actually tried to restart from the UI, there is no way of getting it back up except for rebooting the whole thing. What is really odd though if I SSH into my device and use ‘hassio ha stop’ and ‘hassio ha start’ it wokrs without any problems. But if it try that method after it failed to start when using the restart from the webinterface, ‘hassio ha start’ won’t work. Any ideas?

Does your config validate OK ?
I believe a mechanism is in place to block restarts with a bad config.

it validates ok, and logs don’t report anything unusual either…

I don’t use hassio but I’ve never been able to restart the HA server thru the GUI. I get the “restart server service called” message but it never does anything.

I have set up a command line switch that sends a shell command to restart HA and that works perfectly fine.

Haven’t actually tried the ‘restart’ command from shell yet, gonna try that :+1:

Are you validating from the UI or from CLI? I have found a couple times where the UI didn’t detect a syntax error, so I always validate from CLI.

Tried that already, validates ‘ok’ too

Try commenting out everything in you yaml firs and restarting. If you can restart, uncommnent bit by bit to see what is hanging it up

Yeah, that’s what I probalby should do… sounds like a pain in the butt though :stuck_out_tongue:

Wouldn’t the syntax checker also fail to find an error when trying to restart so that HA wouldn’t block a restart at that point either? Unless the syntax checker used for the config check and the restart blocker use a different checker. Which I really doubt because that would be a big waste of resources.

The config check will only find errors in formatting and syntax. It won’t find errors in invalid values. For example, if you have brightness for lights set for 300, when it only support up to 255, the config checker will happily accept that as proper syntax, but the component may be actually erroring out and refusing to restart. That’s why I’d suggest commenting out everything and uncommenting block by block until the error occurs.