home-assistant / supervised-installer

Installer for a generic Linux system
Apache License 2.0
1.73k stars 585 forks source link

Bug Report: Can't install homeassistant-supervised.deb - Without explaning the reason #288

Closed Bagunda closed 1 year ago

Bagunda commented 1 year ago

OS Version

Debian GNU/Linux 11 (bullseye)

System Information

Linux shururik.example.com 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux

What happened?

I encourented an issue installing homeassistant-supervised.deb on my Debian machine on VPS/VDS in internet. Steps to reproduce:

Turn-off ipv6: nano /etc/sysctl.conf:

net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1

sysctl -p ip addr | grep inet6: there is no ipv6

  1. apt update
  2. apt upgrade
  3. curl -fsSL get.docker.com | sh
  4. gpasswd -a $USER docker
  5. newgrp docker
  6. wget https://github.com/home-assistant/os-agent/releases/download/1.4.1/os-agent_1.4.1_linux_x86_64.deb
  7. dpkg -i os-agent_1.4.1_linux_x86_64.deb
  8. wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
  9. dpkg -i homeassistant-supervised.deb

Installer will fail without explaning the reason.

Try reinstall:

  1. dpkg -r homeassistant-supervised
  2. dpkg -r os-agent
  3. apt-get purge -y docker*
  4. apt autoremove
  5. In nmtui delete interfaces "hassio" and "docker0"
  6. reboot
  7. Try install again maty times
  8. Try os-agent_1.5.1

Installer will fail without explaning the reason.

Before installing the home assistant, it stood and worked for me, but the addons did not let me through the web interface. And I decided to remove everything related to the home assistant along with the docker. And reinstall

Machine Type

generic-x86-64

Installer output

root@shururik:~# dpkg -i homeassistant-supervised.deb
(Reading database ... 70150 files and directories currently installed.)
Preparing to unpack homeassistant-supervised.deb ...
[warn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
Leaving 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
Leaving 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Leaving 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Leaving 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'
Unpacking homeassistant-supervised (1.4.2) over (1.4.2) ...
Setting up homeassistant-supervised (1.4.2) ...
[info] Restarting NetworkManager
[info] Set up systemd-journal-gatewayd socket file
[info] Enable systemd-journal-gatewayd
dpkg: error processing package homeassistant-supervised (--install):
 installed homeassistant-supervised package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 homeassistant-supervised

Relevant log output

Apr 20 21:02:05 shururik.example.com systemd[1]: NetworkManager-wait-online.service: Succeeded.
Apr 20 21:02:05 shururik.example.com systemd[1]: Stopped Network Manager Wait Online.
Apr 20 21:02:05 shururik.example.com systemd[1]: Stopping Network Manager Wait Online...
Apr 20 21:02:05 shururik.example.com NetworkManager[3640]: <info>  [1682013725.5879] caught SIGTERM, shutting down normally.
Apr 20 21:02:05 shururik.example.com systemd[1]: Stopping Network Manager...
Apr 20 21:02:05 shururik.example.com NetworkManager[3640]: <info>  [1682013725.5918] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 20 21:02:05 shururik.example.com dbus-daemon[259]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.39' (uid=0 pid=3640 comm="/usr/sbin/NetworkManager --no-daemon ")
Apr 20 21:02:05 shururik.example.com systemd[1]: Starting Network Manager Script Dispatcher Service...
Apr 20 21:02:05 shururik.example.com NetworkManager[3640]: <info>  [1682013725.6022] exiting (success)
Apr 20 21:02:05 shururik.example.com dbus-daemon[259]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 20 21:02:05 shururik.example.com systemd[1]: Started Network Manager Script Dispatcher Service.
Apr 20 21:02:05 shururik.example.com systemd[1]: NetworkManager.service: Succeeded.
Apr 20 21:02:05 shururik.example.com systemd[1]: Stopped Network Manager.
Apr 20 21:02:05 shururik.example.com systemd[1]: Starting Network Manager...
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.6362] NetworkManager (version 1.30.6) is starting... (after a restart)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.6368] Read config: /etc/NetworkManager/NetworkManager.conf (lib: no-mac-addr-change.conf)
Apr 20 21:02:05 shururik.example.com systemd[1]: Started Network Manager.
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.6408] bus-manager: acquired D-Bus service "org.freedesktop.NetworkManager"
Apr 20 21:02:05 shururik.example.com systemd[1]: Starting Network Manager Wait Online...
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.6458] manager[0x5647860c1000]: monitoring kernel firmware directory '/lib/firmware'.
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.6460] monitoring ifupdown state file '/run/network/ifstate'.
Apr 20 21:02:05 shururik.example.com dbus-daemon[259]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.45' (uid=0 pid=3955 comm="/usr/sbin/NetworkManager --no-daemon ")
Apr 20 21:02:05 shururik.example.com systemd[1]: Starting Hostname Service...
Apr 20 21:02:05 shururik.example.com dbus-daemon[259]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 20 21:02:05 shururik.example.com systemd[1]: Started Hostname Service.
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7270] hostname: hostname: using hostnamed
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7270] hostname: hostname changed from (none) to "shururik.example.com"
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7273] dns-mgr[0x5647860ad170]: init: dns=default,systemd-resolved rc-manager=file
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7276] manager[0x5647860c1000]: rfkill: Wi-Fi hardware radio set enabled
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7276] manager[0x5647860c1000]: rfkill: WWAN hardware radio set enabled
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7286] Loaded device plugin: NMAtmManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.30.6/libnm-device-plugin-adsl.so)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7308] Loaded device plugin: NMWwanFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.30.6/libnm-device-plugin-wwan.so)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7311] Loaded device plugin: NMWifiFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.30.6/libnm-device-plugin-wifi.so)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7316] Loaded device plugin: NMBluezManager (/usr/lib/x86_64-linux-gnu/NetworkManager/1.30.6/libnm-device-plugin-bluetooth.so)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7325] Loaded device plugin: NMTeamFactory (/usr/lib/x86_64-linux-gnu/NetworkManager/1.30.6/libnm-device-plugin-team.so)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7327] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7328] manager: rfkill: WWAN enabled by radio killswitch; enabled by state file
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7328] manager: Networking is enabled by state file
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7329] dhcp-init: Using DHCP client 'internal'
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7330] settings: Loaded settings plugin: keyfile (internal)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7393] device (lo): carrier: link connected
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7396] manager: (lo): new Generic device (/org/freedesktop/NetworkManager/Devices/1)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7416] manager: (docker0): new Bridge device (/org/freedesktop/NetworkManager/Devices/2)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7432] device (ens3): carrier: link connected
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7436] manager: (ens3): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7458] device (ens3): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7484] device (ens3): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7505] device (ens3): Activation: starting connection 'ens3' (78674b29-5064-4c99-a44b-ffce2ff6006f)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7513] manager: (hassio): new Bridge device (/org/freedesktop/NetworkManager/Devices/4)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7528] manager: (tun0): new Tun device (/org/freedesktop/NetworkManager/Devices/5)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7545] manager: (tun1196): new Tun device (/org/freedesktop/NetworkManager/Devices/6)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7558] manager: (tun1198): new Tun device (/org/freedesktop/NetworkManager/Devices/7)
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7666] device (ens3): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7686] device (ens3): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7745] modem-manager: ModemManager available
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7750] device (ens3): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7759] device (ens3): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7796] device (ens3): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7801] device (ens3): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7809] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7832] device (ens3): Activation: successful, device activated.
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7874] manager: startup complete
Apr 20 21:02:05 shururik.example.com systemd[1]: Finished Network Manager Wait Online.
Apr 20 21:02:05 shururik.example.com NetworkManager[3955]: <info>  [1682013725.7973] manager: NetworkManager state is now CONNECTED_GLOBAL

ADR

Code of Conduct

rmsmirnov commented 1 year ago

I have the exact issue on Debian GNU/Linux 11 (bullseye). It seems that installer couldn't enable systemd-journal-gatewayd

fcastilloec commented 1 year ago

I experienced the same thing, I had to uninstall the supervisor package (specially if you had the above error displayed), remove the containers, and reinstall systemd-journal-gatewayd, then reboot, make sure that systemd-journal-gatewayd.service and systemd-journal-gatewayd.socket are started without errors, install supervisor and then everything worked without issues.

mwhiemstra commented 1 year ago

I experienced the same issue and followed fcastilloec's solution with success.

DavidFW1960 commented 1 year ago
Setting up homeassistant-supervised (1.4.2) ...
[info] Restarting NetworkManager
[info] Set up systemd-journal-gatewayd socket file
[info] Enable systemd-journal-gatewayd
dpkg: error processing package homeassistant-supervised (--configure):
 installed homeassistant-supervised package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 homeassistant-supervised
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@debian:/home/david#

Slightly different error

titiviking commented 1 year ago
Setting up homeassistant-supervised (1.4.2) ...
[info] Restarting NetworkManager
[info] Set up systemd-journal-gatewayd socket file
[info] Enable systemd-journal-gatewayd
dpkg: error processing package homeassistant-supervised (--configure):
 installed homeassistant-supervised package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 homeassistant-supervised
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@debian:/home/david#

Slightly different error

I'm facing this error as well.... Not able to get the new supervised config (required to change de bind propagation and make use of network folders for backups)

Julusian commented 1 year ago

I just encountered this when updating my installation. For me it was a problem of systemd-journal-gatewayd being misconfigured. By running sudo apt install systemd-journal-remote --reinstall it fixed itself and homeassistant-supervised set itself up successfully.

This was a lucky guess to figure out my problem based on the lack of any erorr reason being logged.

elyara commented 1 year ago

I just encountered this when updating my installation. For me it was a problem of systemd-journal-gatewayd being misconfigured. By running sudo apt install systemd-journal-remote --reinstall it fixed itself and homeassistant-supervised set itself up successfully.

This was a lucky guess to figure out my problem based on the lack of any erorr reason being logged.

This fixed the issues for me when upgrading to homeassistant-supervised (1.4.3).

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Sisylam commented 1 month ago

I had the same issue running os-agent-1.6.0 and homeassistant-supervised-1.8.0 For others still having the same issue, check if you have all dependencies installed apt install jq apparmor wget curl udisks2 libglib2.0-bin network-manager dbus lsb-release systemd-journal-remote systemd-resolved which solved the issue for me

lndevnull commented 1 week ago

I had the same issue running os-agent-1.6.0 and homeassistant-supervised-1.8.0 For others still having the same issue, check if you have all dependencies installed apt install jq apparmor wget curl udisks2 libglib2.0-bin network-manager dbus lsb-release systemd-journal-remote systemd-resolved which solved the issue for me

This resolved it for me as well when attempting to upgrade from Debian 11 to 12 (Bookworm). Guessing that my "apt dist-upgrade" was hung up too early and didn't catch these other dependencies first.