foreign-sub / ha_fbx

Home assistant VM image for Freebox Delta (arm64)
GNU General Public License v3.0
23 stars 7 forks source link

message Unit hassio-supervisor.service has a bad unit file setting - Debian HA 0.116.4 VM image for arm64 #2

Closed rParslow closed 3 years ago

rParslow commented 3 years ago

Hi

Installing Debian HA 0.116.4 VM image for arm64 At the end of the init_ha.sh script I get Unit hassio-supervisor.service has a bad unit file setting

Any Idea to solve this ? Regards

[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
[Info] Install AppArmor scripts
[Info] Run Hass.io
Failed to start hassio-supervisor.service: Unit hassio-supervisor.service has a bad unit file setting.
See system logs and 'systemctl status hassio-supervisor.service' for details.

In syslog

Oct 24 21:55:37 hafbx cloud-init[539]: Cloud-init v. 18.3 running 'modules:final' at Sat, 24 Oct 2020 21:51:37 +0000. Up 14.19 seconds.
Oct 24 21:55:37 hafbx cloud-init[539]: 2020-10-24 21:55:37,272 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/runcmd [1]
Oct 24 21:55:37 hafbx cloud-init[539]: 2020-10-24 21:55:37,275 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
Oct 24 21:55:37 hafbx cloud-init[539]: 2020-10-24 21:55:37,276 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
rParslow commented 3 years ago

More details Tested on 0.115.6

Oct 25 12:36:47 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:3: Failed to add dependency on %SERVICE_DOCKER%, ignoring: Unknown error -22
Oct 25 12:36:47 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:4: Failed to add dependency on %SERVICE_DOCKER%, ignoring: Unknown error -22
Oct 25 12:36:47 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:9: Executable "%BINARY_DOCKER%" not found in path "/usr/local/sbin:/usr/local/bin:/u
Oct 25 12:36:47 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:10: Executable "%BINARY_HASSIO%" not found in path "/usr/local/sbin:/usr/local/bin:/
Oct 25 12:36:48 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:3: Failed to add dependency on %SERVICE_DOCKER%, ignoring: Unknown error -22
Oct 25 12:36:48 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:4: Failed to add dependency on %SERVICE_DOCKER%, ignoring: Unknown error -22
Oct 25 12:36:48 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:9: Executable "%BINARY_DOCKER%" not found in path "/usr/local/sbin:/usr/local/bin:/u
Oct 25 12:36:48 hafbx systemd[1]: /etc/systemd/system/hassio-supervisor.service:10: Executable "%BINARY_HASSIO%" not found in path "/usr/local/sbin:/usr/local/bin:/
Oct 25 12:36:48 hafbx systemd[1]: hassio-supervisor.service: Cannot add dependency job, ignoring: Unit hassio-supervisor.service has a bad unit file setting.
dakelander commented 3 years ago

Hello, I have the same problem. An issue was find?

dathosim commented 3 years ago

I found the issue ! The install script get the file : https://raw.githubusercontent.com/home-assistant/hassio-installer/master/files/hassio-supervisor.service This file have 3 variables named :

But the script init_ha.sh, line 82-85 with sed command, attempt to replace variable named

(inversion before and after "_")

Extract :

sed -i "s,%%HASSIO_CONFIG%%,${CONFIG},g" "${PREFIX}"/sbin/hassio-supervisor
sed -i -e "s,%%DOCKER_BINARY%%,${DOCKER_BINARY},g" \
       -e "s,%%DOCKER_SERVICE%%,${DOCKER_SERVICE},g" \
       -e "s,%%HASSIO_BINARY%%,${PREFIX}/sbin/hassio-supervisor,g" \
       "${SYSCONFDIR}"/systemd/system/hassio-supervisor.service

So, the file etc/systemd/system/hassio-supervisor.service is corrupt ! And the service can't start

I try to resolve by script's correction (replace by good variables) Service Hassio-Supervisor start ! But...Hassio is not started when i test with the url : http://hafbx.local:8123

@foreign-sub help please

dathosim commented 3 years ago

...to continue...

same error with Apparmor The installer get the file :
https://raw.githubusercontent.com/home-assistant/hassio-installer/master/files/hassio-apparmor.service

This file contains variable named : %%SERVICE_DOCKER%% But the script attempt to replace variable named : %%DOCKER_SERVICE%% https://github.com/foreign-sub/ha_fbx/blob/master/init_ha.sh#L101

Note : the script attempt to replace others variables not include in the hassio-apparmor.service file

I try to resolve by script's correction (replace by good variables) Service Hassio-AppArmor start again !

But...nothing append 👎

foreign-sub commented 3 years ago

Hi,

This should be fixed in the latest version.

Thank you.

clarkkent435 commented 3 years ago

Still happening today - variables in https://raw.githubusercontent.com/home-assistant/hassio-installer/master/files/hassio-supervisor.service don't match https://raw.githubusercontent.com/home-assistant/supervised-installer/c674830d8ddc6af9d618755a7995af939dd73fde/installer.sh.

Substituting the right variable names seems to give a clean install, but the application isn't starting.

root@KLM-Ubuntu:~# ./installer.sh ModemManager.service masked-runtime enabled
[Warning] ModemManager service is enabled. This might cause issue when using serial devices. [Info] Install supervisor Docker container [Info] Install supervisor startup scripts [Info] Install AppArmor scripts [Info] Run Hass.io [Info] Install cli 'ha' root@KLM-Ubuntu:

Unable to connect

Firefox can’t establish a connection to the server at 10.0.0.47:8123.

Maffiow commented 3 years ago

Hi

Installing Debian HA 0.116.4 VM image for arm64 At the end of the init_ha.sh script I get Unit hassio-supervisor.service has a bad unit file setting

Any Idea to solve this ? Regards

[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
[Info] Install AppArmor scripts
[Info] Run Hass.io
Failed to start hassio-supervisor.service: Unit hassio-supervisor.service has a bad unit file setting.
See system logs and 'systemctl status hassio-supervisor.service' for details.

In syslog

Oct 24 21:55:37 hafbx cloud-init[539]: Cloud-init v. 18.3 running 'modules:final' at Sat, 24 Oct 2020 21:51:37 +0000. Up 14.19 seconds.
Oct 24 21:55:37 hafbx cloud-init[539]: 2020-10-24 21:55:37,272 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/runcmd [1]
Oct 24 21:55:37 hafbx cloud-init[539]: 2020-10-24 21:55:37,275 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
Oct 24 21:55:37 hafbx cloud-init[539]: 2020-10-24 21:55:37,276 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed

some issue over here :(

foreign-sub commented 3 years ago

Hi, I just tried a fresh install of the latest version (2021.3.4), but i'm sorry to say that i can not reproduce this issue.

I'll leave it open for a while to see if someone can provide additional details.

Thank you.

pancodia commented 1 year ago

I had this issue when install supervised on rpi4, rebooting solved the issue.