Is anyone else experiencing issues running shell commands?
I’m running .92 in Docker (not HASS.io) and am also running Dockermon. I have a number of scripts that I ocassionally use to restart other containers from within Home Assistant front-end. The script invokes a shell command which uses Dockermon’s call to restart a container. This was working fine for many months.
A few days ago (back on .91.4), I noticed that these scripts no longer work. When I execute the script, I see the following error in Home Assistants logs:
2019-04-25 17:49:27 INFO (MainThread) [homeassistant.helpers.script] Script Restart Home Assistant: Running script
2019-04-25 17:49:27 INFO (MainThread) [homeassistant.helpers.script] Script Restart Home Assistant: Executing step call service
2019-04-25 17:49:28 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `curl http://127.0.0.1:8126/container/home-assistant/restart`, return code: -11
From my machine, I can run the same command and verify in Dockermon’s logs that everything is working as expected - the container is restarted successfully.
Any ideas on what could be causing this or why it’s not working within Home Assistant?
inside Home Assistant’s container as root, it does work… is this a permission related issue? I haven’t made any recent changes to anything that would impact permissions that I’m aware of…
0.92.0 IS a major change. This time I plan on waiting for the .2 release or 1 week, whichever comes first.
From my short time here I have seen all .0 releases as buggy.
Yeah, it is strange. I did roll the container back to the latest version of .89 and .88 with the same results. To be fair, I don’t often restart other containers from within Home Assistant so it’s possible it broke some time back and I just didn’t catch it, but it would be nice to have.
I’m running on 0.92.1 and ran into the same problem today. I’m running a shell script that ssh’s to another box. I’m not sure if it’s directly connected to 0.92 but yesterday evening I didn’t have the issue.
I’ve also noticed that sometimes it works, sometimes I get return code -11 - I haven’t found any logic in this.
Thanks for the comment. That’s strange that sometimes it works for you. In my setup, it returns the error I originally posted 100% of the time but as noted above, the command is successful when executed from the container’s console.
I tried replacing my shell_commands with command-line switches. So far I’ve not seen the same error. This of course doesn’t help if you have scripts that don’t have on/off but do some “one way” stuff.