Can't enter toolbox

I was trying to enter a toolbox I created earlier. After attempting to enter it I get the following error:

    toolbox: failed to list containers with com.redhat.component=fedora-toolbox
    toolbox: container flips not found
    Use the 'create' command to create a toolbox.
    Try 'toolbox --help' for more information.

I then tried to create another container but then got the following error message
toolbox: failed to get RepoTag for base image fedora-toolbox:30
Then I deleted ~/.local/share/containers and was able to successfully create a new image again, but when I tried to enter it the cycle started over again. Is this a bug or is there something I can do to fix it?

EDIT: I should add I get no errors the first time I try to enter the container after creating one, but then get the above errors if I try to enter it again.

EDIT 2: Here’s what I get from running toolbox -v enter -c <container_name>

toolbox: resolved absolute path for /usr/bin/toolbox to /usr/bin/toolbox
toolbox: TOOLBOX_PATH is /usr/bin/toolbox
toolbox: Fedora generational core is f30
toolbox: base image is fedora-toolbox:30
toolbox: customized user-specific image is fedora-toolbox-chris:30
toolbox: container is flips
toolbox: checking if container flips exists
toolbox: container flips was created from image localhost/fedora-toolbox-chris:30
toolbox: checking if image localhost/fedora-toolbox-chris:30 has volumes for host bind mounts
toolbox: trying to start container flips
toolbox: creating list of environment variables to forward
toolbox: COLORTERM=truecolor
toolbox: DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
toolbox: DBUS_SYSTEM_BUS_ADDRESS is unset
toolbox: DESKTOP_SESSION=gnome
toolbox: DISPLAY=:0
toolbox: LANG=en_US.utf8
toolbox: SHELL=/bin/bash
toolbox: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
toolbox: TERM=xterm-256color
toolbox: TOOLBOX_PATH is unset
toolbox: VTE_VERSION=5603
toolbox: WAYLAND_DISPLAY=wayland-0
toolbox: XDG_CURRENT_DESKTOP=GNOME
toolbox: XDG_DATA_DIRS=/home/chris/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/
toolbox: XDG_MENU_PREFIX=gnome-
toolbox: XDG_RUNTIME_DIR=/run/user/1000
toolbox: XDG_SEAT=seat0
toolbox: XDG_SESSION_DESKTOP=gnome
toolbox: XDG_SESSION_ID=2
toolbox: XDG_SESSION_TYPE=wayland
toolbox: XDG_VTNR=2
toolbox: created options for environment variables to forward
--env=COLORTERM=truecolor --env=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus --env=DESKTOP_SESSION=gnome --env=DISPLAY=:0 --env=LANG=en_US.utf8 --env=SHELL=/bin/bash --env=SSH_AUTH_SOCK=/run/user/1000/keyring/ssh --env=TERM=xterm-256color --env=VTE_VERSION=5603 --env=WAYLAND_DISPLAY=wayland-0 --env=XDG_CURRENT_DESKTOP=GNOME --env=XDG_DATA_DIRS=/home/chris/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/ --env=XDG_MENU_PREFIX=gnome- --env=XDG_RUNTIME_DIR=/run/user/1000 --env=XDG_SEAT=seat0 --env=XDG_SESSION_DESKTOP=gnome --env=XDG_SESSION_ID=2 --env=XDG_SESSION_TYPE=wayland --env=XDG_VTNR=2
toolbox: looking for /bin/bash in container flips
ERRO[0000] open /var/home/chris/.local/share/containers/storage/overlay-containers/2137b384db9e7959108f0b90a851596d31bc42ff72c3732ab1ed668c6927a771/userdata/conmon.pid: permission denied 
toolbox: /bin/bash not found in flips; using /bin/bash instead
toolbox: trying to exec /bin/bash in container flips
ERRO[0000] open /var/home/chris/.local/share/containers/storage/overlay-containers/2137b384db9e7959108f0b90a851596d31bc42ff72c3732ab1ed668c6927a771/userdata/conmon.pid: permission denied

Try sudo chown -R $USER ~/.local/share/containers/storage/overlay-containers.

EDIT: Apparently this caused some permissions issue with sudo, apologies for that.

A version that I believe should work better would be sudo find ~/.local/share/containers/storage/overlay-containers -name conmon.pid -exec chown $USER '{}' '; '.

4 Likes

Thanks! That worked for me. Wonder how the permissions got messed up in the first place though?

¯\_(ツ)_/¯ Rootless podman can be a bit buggy sometimes, so I’m used to dealing with some of these weird issues and recognized this one.

This worked for me too, thanks!

I wonder what keeps causing it?

Good to know, I may just alias that command as “fix-toolbox” or something until it gets sorted out. I’ve found Aliases come in really handy for Silverblue, between flatpak command-line apps being a pain to type out and needing to go into toolboxes for certain apps.

Yep, it does seem to be an issue with libpod. Running multiple rootless containers in parallel with toolbox-like UID mapping results in "conmon.pid: permission denied" ¡ Issue #3187 ¡ containers/podman ¡ GitHub
moving back to an older version also seems to do the trick.

Btw, does sudo work inside toolbox after fixing permissions this way? When I got the same error on monday I was not able to use it.

I was able to use sudo inside the container no problem after the above fix. Installed packages in the container no problem and compiled a package. Even was able to run the built GUI application from inside the container afterwards.

Very old thread but I have the same problem. Just re-installed SB30 clean install (having fouled up the original) and now I get this error when starting a toolbox. It worked fine on my original install of SB30. I tried the find command recommended by @refi64 above but it failed with “missing argument to -exec”.

Oof I typo’d slightly but can’t seem to edit it anymore, the space after the semicolon shouldn’t be there (so instead of '; ' it should be ';").

That being said this issue has long since been fixed, you might want to open a new thread and see what running toolbox with -v says.