Toolbox not working, again

Error: unable to start container "fedora-toolbox-31": container '50f4c0b124eebaf7b01c68ce018bd1dde11b213c9b28193477269b33e7403844' already exists: OCI runtime error

A new day begins and toolbox breaks after today’s update.

I am not sure if I can recommend Silverblue anymore, this release has been absolute pain.

EDIT: I am on Silverblue 31

Version: 31.20191204.0 (2019-12-04T00:37:38Z)
BaseCommit: 29760a7e84c23d06eaa98d0db35ba1f908dae2a563e55f8d9213a76fa1220045

At this point I think there is a serious issue on how these packages are getting pushed with almost zero consideration on toolbox.

1 Like

Hello @deathwish,

Was this from creating a container or entering one already created? I have both coretoolbox and toolbox currently in use on my F31SB and there are no issues for me.

Yep, broken for me too. I get a different error. This is opening a previously created container. This is just getting ridiculous.

toolbox: failed to create /run/.toolboxenv in container fedora-toolbox-31

FWIW: I’m currently using 31.20191204.0 too (same basecommit too), but toolbox works here for me, both for running existing containers and creating (and running) new ones.

But, yeah, agreed: We’ve all been hitting too many issues with toolbox on Silverblue lately and it does need better testing before being pushed out to all of us. (Most of these were during the beta, but that random crun-based issue after an official release stung.)

What version of Silverblue did you update from? Perhaps there’s a configuration issue related to old versions of ~/.config/containers/libpod.conf (or your containers in ~/.local/share/containers/) and new.

@deathwish, @mmorrell2016: Can you create new containers and run them at least?

toolbox create -c test
toolbox enter -c test
1 Like

I see a very similar reason with just plain podman, without toolbox, on current Fedora CoreOS (see https://github.com/cockpit-project/bots/pull/305). I just reported that as https://bugzilla.redhat.com/show_bug.cgi?id=1780161

I get the error both when running an old toolbox and creating a new one. After a rollback to

Version: 31.20191130.0 (2019-11-30T00:35:48Z)
BaseCommit: 3acfe02779b60bf385950fac7b0bcf1de58b10bedd263e39dd2d70d6448903b5

toolbox is working again. In discord one user at least reported that it was working fine and I didn’t see any package that could break anything during the update (talking from ignorance).

I feel the same way about Silverblue all the time, but usually the problems work themselves out. What keeps me around is that I believe in the technology behind it and I knew when I downloaded Silverblue that I was getting into something that was not a finished product but a work in progress.

Just to be clear, I been on silverblue for some time now and it has only become an issue with f31 as this is happening almost like once a month.

Solved in 31.20191205.1

1 Like

I am still getting same error with 31.20191207.0. Here is what I get when I try to toolbox -v enter:

[mike@mustang ~]$ toolbox enter
toolbox: failed to create /run/.toolboxenv in container fedora-toolbox-31
[mike@mustang ~]$ toolbox -v enter
toolbox: running as real user ID 1000
toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: checking if /etc/subgid and /etc/subuid have entries for user mike
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: running on a cgroups v2 host
toolbox: current Podman version is 1.6.2
toolbox: migration not needed: Podman version 1.6.2 is unchanged
toolbox: Fedora generational core is f31
toolbox: base image is fedora-toolbox:31
toolbox: container is fedora-toolbox-31
toolbox: checking if container fedora-toolbox-31 exists
toolbox: calling org.freedesktop.Flatpak.SessionHelper.RequestSession
toolbox: starting container fedora-toolbox-31
toolbox: /etc/profile.d/toolbox.sh already mounted in container fedora-toolbox-31
toolbox: inspecting entry point of container fedora-toolbox-31
toolbox: entry point of container fedora-toolbox-31 is toolbox
toolbox: waiting for container fedora-toolbox-31 to finish initializing
Error: unable to find user root: no matching entries in passwd file
toolbox: failed to create /run/.toolboxenv in container fedora-toolbox-31

Here’s some more info after doing some troubleshooting. If I remove my container with toolbox rm container-id and then do a toolbox enter and say yes to create a new container, that works. When I exit the toolbox and do a systemctl restart, after the reboot I get the same error…

[mike@mustang ~]$ toolbox enter
toolbox: failed to create /run/.toolboxenv in container fedora-toolbox-31
[mike@mustang ~]$ toolbox list
IMAGE ID      IMAGE NAME                                        CREATED
c7b500cb5741  localhost/fedora-toolbox-mike:30                  7 months ago
b8e18bacde99  registry.fedoraproject.org/f30/fedora-toolbox:30  8 months ago
3a3fb0a29265  registry.fedoraproject.org/f31/fedora-toolbox:31  2 months ago

CONTAINER ID  CONTAINER NAME     CREATED        STATUS             IMAGE NAME
54efa9849dbe  fedora-toolbox-31  3 minutes ago  Up 27 seconds ago  registry.fedoraproject.org/f31/fedora-toolbox:31

Seems like it might be a permission issue maybe?

Seems to be fixed since the 31.20191208.0 update. Not sure what changed but glad it is fixed again.

Same issue here. Did an rpm-ostree upgrade and toolbox broke, giving the same error cited above:

toolbox: failed to create /run/.toolboxenv in container fedora-toolbox-31

Rolling back the deployment fixed it. For reference:

$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
● ostree://fedora:fedora/31/x86_64/silverblue
                   Version: 31.20191219.0 (2019-12-19T00:41:28Z)
                    Commit: 675ab14ffbae92afce5424c756b281fec5614208400291215e39599748cdaaf9
              GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4

  ostree://fedora:fedora/31/x86_64/silverblue
                   Version: 31.20191221.0 (2019-12-21T00:41:41Z)
                    Commit: ec1cbfc67d9534ef6dadf6d243a3fb2996c173452a5f6bde02c6fff11a056b4a
              GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4

Looking at the toolbox script, it looks like this error happens when it tries create the .toolboxenv hidden file in the containers /run directory, but the file already exists so it errors out. The file may exist already because another shell already has entered the toolbox container, or it was not cleaned up when the toolbox was exited. Maybe this happens when toolbox is entered and a system reboot happens. To fix this, I think you need to shell into the running container and remove the /run/.toolboxenv file. Then exit the container shell and try toolbox enter again.

I’ve been hit by this same bug (ie. if I remove all containers, create new then works, upon reboot stops working). How do I “shell into the container to manually rm /run/.toolboxenv”? I can’t seem to execute any “podman exec” commands because it complains about “unable to find user root”.

Yeah, I would think

podman run -ti image-id /bin/bash

would connect an interactive terminal to the container. Not sure why you get the “unable to find user root” error. I did get the same error as you recently and I removed all my containers and images and also deleted my local container storage directory ~/.local/share/containers/storage and started fresh. So far, I have not had the problem reoccur. Currently running version 31.20191221.0. I have my base on ext4 partition and my home directory is btrfs mounted filesystem. No sure if having my container storage on btrfs filesystem makes a difference, but it shouldn’t.

Got that error after doing a rpm-ostree upgrade. Did a rollback and toolbox would work again!!

Filed an issue: https://github.com/containers/toolbox/issues/359#issue-547058508

rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
● ostree://fedora:fedora/31/x86_64/silverblue
Version: 31.20200107.0 (2020-01-07T01:34:27Z)
BaseCommit: 3ea3a112a5a5e89559435fecb9377549edbbe93eb44a3888deadaf2c4f995d37
GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4
LayeredPackages: fedora-workstation-repositories filelight google-chrome mupdf virt-manager

ostree://fedora:fedora/31/x86_64/silverblue
Version: 31.20200108.0 (2020-01-08T11:26:07Z)
BaseCommit: 13625cd496d7cccc8729af79df460d8e1ca75a446ce0da0537c86ec4cc67302c
GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4
LayeredPackages: fedora-workstation-repositories filelight google-chrome mupdf virt-manager