[SOLVED] failed to install snap into LXC: "Failed to send reload request: No such file or directory"

neur0mancer

New Member
Nov 23, 2023
19
1
3
Disclaimer: I'm referring to this post:

https://forum.proxmox.com/threads/cant-install-snap-in-lxc-container.68708/

Peopel solved the problem there, but I still stuck with installation of Firefox into an LXC using apt/snap. So, here we go again :)

~~~

I tried installing firefox on a Ubuntu container (latest updates/upgrades done). Those are the steps:

Code:
sudo apt install squashfuse fuse snapd -y \
sudo mkdir /lib/modules

sudo apt install firefox

I also tried

Code:
sudo snap install firefox

Also, as recommended at some places, I tried issuing the commands again.

The Container is also prepared as recommended:

mandatory reboots are done, FUSE box in options is active, container is "unprivileged" and the following options are set:

Code:
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional
lxc.mount.auto=cgroup:rw

I have to mention, though I think it does not make any difference: I run the container as a clone of a custom-template, because I got sick preparing the naked container again for every new try - I tried it with dozens containers now to find the issue.

However, I always end up with this error as mentioned above:

Code:
- Setup snap "firefox" (3416) security profiles (cannot setup udev for snap "firefox": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "firefox" (3416) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "firefox" (3416) security profiles for auto-connections (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)

According to this post in the snap-board, it's not possible at all in a LXC container? I cannot believ that, actually - because a lot of people seem to be able to solve it:

https://forum.snapcraft.io/t/unable-to-install-snap-from-store-or-locally/4629

I am apparantly not the only one, it seems like this problem pops up again in the last weeks, months, like here:

https://forum.proxmox.com/threads/snap-fehler-in-einem-lcx-container.72228/
 
OK, it can be nailed down to udev, apparently. systemctl status udev reveals, that the service is not running:

Code:
* systemd-udevd.service - Rule-based Manager for Device Events and Files
     Loaded: loaded (/lib/systemd/system/systemd-udevd.service; static)
    Drop-In: /usr/lib/systemd/system/systemd-udevd.service.d
             `-syscall-architecture.conf
     Active: inactive (dead)
TriggeredBy: * systemd-udevd-control.socket
             * systemd-udevd-kernel.socket
  Condition: start condition failed at Fri 2023-12-01 15:51:30 UTC; 6min ago
             `- ConditionPathIsReadWrite=/sys was not met
       Docs: man:systemd-udevd.service(8)
             man:udev(7)

Dec 01 15:51:30 firefox systemd[1]: systemd-udevd.service - Rule-based Manager for Device Events and Files was skipped because of an unmet condition check (Con>

I'm trying to wrap my head around it, so let's check the configuration for the service under /lib/systemd/system/systemd-udevd.service;

Code:
[Unit]
Description=Rule-based Manager for Device Events and Files
Documentation=man:systemd-udevd.service(8) man:udev(7)
DefaultDependencies=no
After=systemd-sysusers.service systemd-hwdb-update.service
Before=sysinit.target
ConditionPathIsReadWrite=/sys


Let's manually reload the configuration via udevadm control --reload or udevadm control --reload-rules

Code:
Failed to send reload request: No such file or directory

Strange things happen. At some point I also got this error message returned (I cannot reproduce it yet)


Code:
Failed to send reload request: Connection refused
 
OK, what a ride.. I started udev manually via

Code:
/lib/systemd/systemd-udevd --daemon

Now I was able to install firefox:

Code:
sudo snap install firefox

So, for some reason the udev is not properly implemented into the cotainer (it's the latest Ubuntu version). Manually running UDEV solves it.
 
Proxmox host, edit the config file at /etc/pve/lxc/<CTID>.conf
Code:
#nano /etc/pve/lxc/<CTID>.conf
features: mount=fuse,nesting=1
lxc.mount.entry: /dev/fuse dev/fuse none bind,create=file,optional
lxc.mount.auto: cgroup:rw
Next step open lxc container, install app, after switch off
also can create folder
Code:
sudo mkdir /lib/modules
Code:
sudo apt install squashfuse fuse
sudo poweroff
After run lxc and try install snapd, and snap install --classic certbot
Code:
sudo apt-get update -y
sudo apt install snapd -y
sudo snap install core; snap refresh core
sudo snap install --classic certbot
 
Last edited:
I did everything of that, except

Code:
sudo snap install core; snap refresh core
sudo snap install --classic certbot


Will try later on a fresh machine! Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!