Seeing some error messages after installing incus followed by apt-get update ; apt-get -y upgrade

I already installed incus on my Orangi Pi5 running armbian. Now when I do apt-get update ; apt-get -y upgrade, I am seeing some errors. Just wanted to share.


# uname -a
Linux core 5.10.160-legacy-rk35xx #1 SMP Mon Aug 28 01:21:24 UTC 2023 aarch64 GNU/Linux

# apt-get update ; apt-get -y upgrade
-----
After this operation, 17.3 MB disk space will be freed.
Get:1 http://security.debian.org bookworm-security/main arm64 libwebp7 arm64 1.2.4-0.2+deb12u1 [260 kB]
Get:2 https://download.docker.com/linux/debian bookworm/stable arm64 containerd.io arm64 1.6.24-1 [20.5 MB]
Get:3 https://pkgs.zabbly.com/incus/daily bookworm/main arm64 incus arm64 0~202309201124-debian12 [63.6 MB]
Fetched 84.3 MB in 4s (19.0 MB/s)
(Reading database ... 65966 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.6.24-1_arm64.deb ...
Unpacking containerd.io (1.6.24-1) over (1.6.22-1) ...
Preparing to unpack .../incus_0~202309201124-debian12_arm64.deb ...
Adding group `incus' (GID 119) ...
Done.
Adding group `incus-admin' (GID 120) ...
Done.
Unpacking incus (0~202309201124-debian12) over (0~202309131958-debian12) ...
Preparing to unpack .../libwebp7_1.2.4-0.2+deb12u1_arm64.deb ...
Unpacking libwebp7:arm64 (1.2.4-0.2+deb12u1) over (1.2.4-0.2) ...
Setting up containerd.io (1.6.24-1) ...
Setting up incus (0~202309201124-debian12) ...
Created symlink /etc/systemd/system/incus.socket → /opt/incus/lib/systemd/system/incus.socket.
Created symlink /etc/systemd/system/sockets.target.wants/incus.socket → /opt/incus/lib/systemd/system/incus.socket.
Job failed. See "journalctl -xe" for details.
dpkg: error processing package incus (--configure):
 installed incus package post-installation script subprocess returned error exit status 1
Setting up libwebp7:arm64 (1.2.4-0.2+deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u1) ...
Errors were encountered while processing:
 incus
E: Sub-process /usr/bin/dpkg returned an error code (1)

# journalctl -xe

-----A start job for unit systemd-sysctl.service has finished successfully.

The job identifier is 287723.
Sep 20 08:04:48 core systemd[1]: Reloading.
Sep 20 08:04:49 core (sd-execut[2743983]: /usr/lib/systemd/system-generators/netplan failed with exit status 1.
Sep 20 08:04:49 core systemd[1]: Reloading.
Sep 20 08:04:49 core (sd-execut[2743999]: /usr/lib/systemd/system-generators/netplan failed with exit status 1.
Sep 20 08:04:49 core systemd[1]: incus.socket: Socket service incus.service already active, refusing.
Sep 20 08:04:49 core systemd[1]: Failed to listen on incus.socket - Incus - Daemon (unix socket).
Subject: A start job for unit incus.socket has failed
Defined-By: systemd
Support: Debian -- User Support


Hey there, that’s pretty odd that it would be incus.socket failing to start.
Can you show systemctl status incus.socket as well as journalctl -n300?

Off the top of my head the most likely thing to fail with that unit would be the group ownership.
Can you also show getent group | grep incus?

The fact that it happens in the middle of an upgrade rather than at initial installation is a bit odd too but hopefully the info above will explain what’s going on.

This is what I see:

root@core:~# systemctl status incus.socket
â—‹ incus.socket - Incus - Daemon (unix socket)
     Loaded: loaded (/etc/systemd/system/incus.socket; enabled; preset: enabled)
     Active: inactive (dead)
   Triggers: â—Ź incus.service
     Listen: /var/lib/incus/unix.socket (Stream)

Sep 20 08:04:49 core systemd[1]: incus.socket: Socket service incus.service already active, refusing.
Sep 20 08:04:49 core systemd[1]: Failed to listen on incus.socket - Incus - Daemon (unix socket).
root@core:~#
root@core:~# getent group | grep incus
incus:x:119:
incus-admin:x:120:
root@core:~#

Ah, interesting, so that’s an issue for the very few who installed incus prior to the socket unit existing I think.

You should be able to sort it out with systemctl stop incus.service followed by apt-get -f install, that way when incus.socket gets enabled, it doesn’t hit that weird issue of incus.service already existing and being started.

1 Like

I’m not sure why systemd cares to be fair, you’d expect that the service already existing and being running would just make it have incus.socket go straight to active, but apparently not.

root@core:~# journalctl -n300

Sep 20 08:04:48 core systemd[1]: Finished systemd-sysctl.service - Apply Kernel Variables.
Sep 20 08:04:48 core systemd[1]: Reloading.
Sep 20 08:04:49 core (sd-execut[2743983]: /usr/lib/systemd/system-generators/netplan failed with exit status 1.
Sep 20 08:04:49 core systemd[1]: Reloading.
Sep 20 08:04:49 core (sd-execut[2743999]: /usr/lib/systemd/system-generators/netplan failed with exit status 1.
Sep 20 08:04:49 core systemd[1]: incus.socket: Socket service incus.service already active, refusing.
Sep 20 08:04:49 core systemd[1]: Failed to listen on incus.socket - Incus - Daemon (unix socket).
Sep 20 08:05:01 core CRON[2744091]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Sep 20 08:05:01 core CRON[2744092]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Sep 20 08:05:01 core CRON[2744091]: pam_unix(cron:session): session closed for user root

I rebooted the board and now I see both the services are up and running !

root@core:~# systemctl status -l incus-lxcfs.service

â—Ź incus-lxcfs.service - Incus - LXCFS daemon
     Loaded: loaded (/etc/systemd/system/incus-lxcfs.service; enabled; preset: enabled)
     Active: active (running) since Wed 2023-09-20 10:50:02 PDT; 3min 57s ago
    Process: 691 ExecStartPre=/usr/bin/mkdir -p /var/lib/incus-lxcfs (code=exited, status=0/SUCCESS)
   Main PID: 713 (lxcfs)
      Tasks: 3 (limit: 18537)
     Memory: 1.3M
        CPU: 19ms
     CGroup: /system.slice/incus-lxcfs.service
             └─713 /opt/incus/bin/lxcfs /var/lib/incus-lxcfs

Sep 20 10:50:02 core lxcfs[713]: - proc_meminfo
Sep 20 10:50:02 core lxcfs[713]: - proc_stat
Sep 20 10:50:02 core lxcfs[713]: - proc_swaps
Sep 20 10:50:02 core lxcfs[713]: - proc_uptime
Sep 20 10:50:02 core lxcfs[713]: - proc_slabinfo
Sep 20 10:50:02 core lxcfs[713]: - shared_pidns
Sep 20 10:50:02 core lxcfs[713]: - cpuview_daemon
Sep 20 10:50:02 core lxcfs[713]: - loadavg_daemon
Sep 20 10:50:02 core lxcfs[713]: - pidfds
Sep 20 10:50:02 core lxcfs[713]: Ignoring invalid max threads value 4294967295 > max (100000).
root@core:~#
root@core:~# systemctl status -l incus.service
â—Ź incus.service - Incus - Daemon
     Loaded: loaded (/etc/systemd/system/incus.service; enabled; preset: enabled)
     Active: active (running) since Wed 2023-09-20 10:50:14 PDT; 3min 49s ago
TriggeredBy: â—Ź incus.socket
    Process: 1150 ExecStartPost=/opt/incus/lib/systemd/incusd waitready --timeout=600 (code=exited, status=0/SUCCESS)
   Main PID: 1149 (incusd)
      Tasks: 19
     Memory: 182.9M
        CPU: 2.394s
     CGroup: /system.slice/incus.service
             └─1149 incusd --group incus --logfile /var/log/incus/incusd.log

Sep 20 10:50:04 core systemd[1]: Starting incus.service - Incus - Daemon...
Sep 20 10:50:08 core incusd[1149]: time="2023-09-20T10:50:08-07:00" level=warning msg="AppArmor support has been disabled because of lack of kernel support"
Sep 20 10:50:08 core incusd[1149]: time="2023-09-20T10:50:08-07:00" level=warning msg=" - AppArmor support has been disabled, Disabled because of lack of kernel support"
Sep 20 10:50:08 core incusd[1149]: time="2023-09-20T10:50:08-07:00" level=warning msg=" - Couldn't find the CGroup hugetlb controller, hugepage limits will be ignored"
Sep 20 10:50:08 core incusd[1149]: time="2023-09-20T10:50:08-07:00" level=warning msg=" - Couldn't find the CGroup network priority controller, network priority will be ignore>
Sep 20 10:50:13 core incusd[1149]: time="2023-09-20T10:50:13-07:00" level=warning msg="Firewall failed to detect any compatible driver, falling back to \"xtables\" (but some f>
Sep 20 10:50:13 core incusd[1149]: time="2023-09-20T10:50:13-07:00" level=warning msg="Failed to initialize fanotify, falling back on inotify" err="Failed to watch directory \>
Sep 20 10:50:14 core systemd[1]: Started incus.service - Incus - Daemon.
root@core:~#

Right, that’s another way to get systemd to behave I guess :slight_smile:

Is apt happy too now? Can you run your dist-upgrade without errors?

1 Like

Sorry. I rebooted before reading this message

Cool. No issues with dist-upgrade

root@core:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up incus (0~202309201124-debian12) ...
Created symlink /etc/systemd/system/incus-startup.service → /opt/incus/lib/systemd/system/incus-startup.service.
Created symlink /etc/systemd/system/multi-user.target.wants/incus-startup.service → /opt/incus/lib/systemd/system/incus-startup.service.
Processing triggers for libc-bin (2.36-9+deb12u1) ...
root@core:~#

oh wow !! now we are talking :slight_smile:

root@core:~# lxc-to-incus --help
Command line client for container migration

Usage:
  lxc-to-incus [flags]

Flags:
      --all          Import all containers
      --containers   Container(s) to import
      --debug        Print debugging output
      --delete       Delete the source container
      --dry-run      Dry run mode
  -h, --help         Print help
      --lxcpath      Alternate LXC path (default "/var/lib/lxc")
      --rsync-args   Extra arguments to pass to rsync
      --storage      Storage pool to use for the container
      --version      Print version number
root@core:~#
root@core:~# lxd-to-incus --help
Description:
  LXD to Incus migration tool

  This tool allows an existing LXD user to move all their data over to Incus.

Usage:
  lxd-to-incus [flags]

Flags:
  -h, --help      Print help
      --version   Print version number
      --yes       Migrate without prompting
root@core:~#
root@core:~# incus --help
Description:
  Command line client for Incus

  All of Incus's features can be driven through the various commands below.
  For help with any of those, simply call them with --help.

Usage:
  incus [command]

Available Commands:
  admin       Manage incus daemon
  alias       Manage command aliases
  cluster     Manage cluster members
  config      Manage instance and server configuration options
  console     Attach to instance consoles
  copy        Copy instances within or in between servers
  delete      Delete instances
  exec        Execute commands in instances
  export      Export instance backups
  file        Manage files in instances
  help        Help about any command
  image       Manage images
  import      Import instance backups
  info        Show instance or server information
  launch      Create and start instances from images
  list        List instances
  move        Move instances within or in between servers
  network     Manage and attach instances to networks
  operation   List, show and delete background operations
  profile     Manage profiles
  project     Manage projects
  publish     Publish instances as images
  rebuild     Rebuild instances
  remote      Manage the list of remote servers
  rename      Rename instances
  restart     Restart instances
  snapshot    Manage instance snapshots
  start       Start instances
  stop        Stop instances
  storage     Manage storage pools and volumes
  version     Show local and remote versions
  warning     Manage warnings

Flags:
      --all            Show less common commands
      --debug          Show all debug messages
      --force-local    Force using the local unix socket
  -h, --help           Print help
      --project        Override the source project
  -q, --quiet          Don't show progress information
      --sub-commands   Use with help or --help to view sub-commands
  -v, --verbose        Show all information messages
      --version        Print version number

Use "incus [command] --help" for more information about a command.
root@core:~#

I am not sure if I am messing up with all the messages when I do a cut-and-paste. Please let me know if there is a recommend way to do so that it will be clean. Right now I am blocking the messages and selecting preformatted text within the editor. Thanks.