Skip to content

Troubleshooting

Madman10K edited this page Jun 9, 2024 · 12 revisions

Here is a list of common errors and their fixes.

No audio

If you have no audio inside the container, that might be a problem with your pulse audio configuration. Here is a fix:

  1. Test if pulse is working on the host
  2. Try to update pulse on the container and the host to the latest version
  3. Restart and check if pulse still works on the host
  4. If pulse still doesn't work on the container, it may be caused by a socket issue
    1. Check if the variable XDG_RUNTIME_DIR is not empty and defined in the environment variables list
    2. If it is, re-add the socket with the following commands
    incus config device remove <your container's name here> PASocket1
    incus config device add <your container's name here> PASocket1 proxy bind=container "connect=unix:${XDG_RUNTIME_DIR}/pulse/native" listen=unix:/pulse-native uid=1000 gid=1000 mode=0777 security.uid=1000 security.gid=1000
    
    1. If the XDG_RUNTIME_DIR variable doesn't exist, try to find the pulse socket. It is mostly stored under
      • /pulse-native
      • /run/user/1000/pulse/native
      • /var/run/user/1000/pulse/native
      • /home/<username>/pulse-native
      • the PULSE_SERVER environment variable
      • /home/<username>/.config/pulse/
      • /home/<username>/.pulse/

No windows showing up

This might be a problem with your X configuration.

  1. Make sure your GPU supports the latest AMD/Intel/NVidia(non-free) drivers and that they can be found on the arch linux archive
  2. Make sure you have the DISPLAY environment variable set to :0, this indicates to GUI programs what display they should display a window to(do this on both the host and on the container)
  3. Make sure you have the right access control settings for X set on the host, run the command xhost +local: to enable it
  4. Make sure your GPU drivers are at the same version on the host and container(especially for NVidia users), if they are not use the update command from the GUI to install the same one as is on the host
  5. This is a very rare issue, but make sure your X socket is located under /tmp/.X11-unix/. If it isn't, do the following:
    1. Find the new location of the X socket
    2. Execute the following commands, they will remove and re-add the socket to the container
    incus config device remove <your container's name here> X0
    incus config device add <your container's name here> X0 proxy bind=container connect=unix:<your new socket location here> listen=unix:/tmp/.X11-unix/X0 uid=1000 gid=1000 mode=0777 security.uid=1000 security.gid=1000
    
    1. If there is still no connection check for the socket on the container's side and if it is not under /tmp/.X11-unix/X0 then do the same commands as above but replace the listen=unix:/tmp/.X11-unix/X0 part of the second command with listen=unix:<your new socket location here>

No network connection

Sometimes your configuration of Incus may be at fault, resulting in your container not having a network connection. To diagnose this, check out the following:

  1. Ping a site like google on your host system to check if you have internet
  2. Restart your container and check again. If it doesn't work, restart Incus, restart your container again and check again
  3. If it still does not work, run ip route get 1.1.1.1 | sed -nr 's/.*dev ([^\ ]+).*/\1/p', which will return the name of your current network adapter. Wireless adapters usually have a name starting with wlan, while wired adapters usually start with eth. If you changed the way you interact with the internet, changing the adapter or the type of interface you use to receive it, you might need to change some Incus settings

Changing Incus network configuration when changing adapter

Wireless adapters, i.e. starting with wlan should run over a bridge. If you previously used a wired connection, you need to change your Incus network configuration to run over a bridge.

Errors when installing

If you get some error similar to this: Error: Get "http://unix.socket/1.0": dial unix /var/lib/incus/unix.socket: connect: connection refused, you have 2 possible fixes

  1. You need to refresh your session for groups to update
  2. Use incus --debug --group incus

Guide for users who chose the second option:

  1. If you get an error similar to this: Error: Failed to start dqlite server: raft_start(): io: load closed segment 0000000000000002-0000000000000002: unexpected format version 8095768602490157155
    1. You have a problem with the Incus segments. To fix it, navigate to /var/lib/incus/database/global and remove the listed segments
    2. Restart the Incus daemon

Error when creating a new container

If you get the following error:

Error: Failed to create the following container: my-container Error: Error getting container with the following name: my-container; Error code: -2

in the CLI output of the manager, when creating a new container, make sure to compile the xdelta library with the lzma feature. On Gentoo systems, the package will have the lzma USE flag available for configuration.