linuxserver / docker-steamos

Vanilla Arch modified into SteamOS with web based Desktop access, useful for remote play and lower end games
GNU General Public License v3.0
114 stars 6 forks source link

[BUG] Networking isn't functional #4

Closed pythoninthegrass closed 1 year ago

pythoninthegrass commented 1 year ago

Is there an existing issue for this?

Current Behavior

When launching the docker-steamos container, unable to access network interfaces, nor the internet in general.

Expected Behavior

Steps To Reproduce

docker compose up -d

version: "3"

services:
  steamos:
    image: lscr.io/linuxserver/steamos:latest
    container_name: steamos
    hostname: steamos                                       # optional
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    security_opt:
      - seccomp:unconfined
      - apparmor:unconfined                                  # optional
    environment:
      - TZ=America/Chicago
      - PUID=1000
      - PGID=1000
      - DRINODE=/dev/dri/renderD128
      - HOST_IP=192.168.192.161                             # optional
      - STARTUP=KDE                                         # optional
      - RESOLUTION=1920x1080                                # optional
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - $HOME/docker/containers/steamos/config:/config
      - /dev/input:/dev/input                               # optional
      - /run/udev/data:/run/udev/data                       # optional
    ports:
      - 3000:3000
      - 3001:3001
      - 27031-27036:27031-27036/udp                         # optional
      - 27031-27036:27031-27036                             # optional
      - 47984-47990:47984-47990                             # optional
      - 48010-48010:48010-48010                             # optional
      - 47998-48000:47998-48000/udp                         # optional
    devices:
      - /dev/dri:/dev/dri
    shm_size: "1gb"

Environment

- OS:

  PRETTY_NAME="VanillaOS 22.10 all"
  NAME="VanillaOS"
  VERSION_ID="22.10"
  VERSION="22.10 all"
  VERSION_CODENAME="kinetic"
  ID=ubuntu
  ID_LIKE=debian
  HOME_URL="https://github.com/vanilla-os"
  SUPPORT_URL="https://github.com/vanilla-os"
  BUG_REPORT_URL="https://github.com/vanilla-os"
  PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
  UBUNTU_CODENAME="kinetic"

- How docker service was installed: [Vanilla OS Handbook Installing Docker Engine and Docker Desktop](https://handbook.vanillaos.org/2022/02/05/install-docker.html)
  - TL;DR
    ```bash
    sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

### CPU architecture

x86-64

### Docker creation

```bash
docker compose up -d

Container logs

λ docker logs steamos
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

**** creating video group videocpx5 with id 44 ****
**** adding /dev/dri/card0 to video group videocpx5 with id 44 ****
[custom-init] No custom files found, skipping...
[ls.io-init] done.
2023/08/20 14:32:14 [warn] 223#223: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.1.0 - built Aug 18 2023 16:27:55
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Set firefox.desktop as the default for x-scheme-handler/https
Set firefox.desktop as the default for x-scheme-handler/http
[adapter_name] -- [/dev/dri/renderD128]
[2023:08:20:14:32:15]: Info: Sunshine version: v0.20.0
Cannot load libcuda.so.1
[2023:08:20:14:32:15]: Error: Couldn't load cuda: -1
[2023:08:20:14:32:15]: Error: Failed to gain CAP_SYS_ADMIN
[2023:08:20:14:32:15]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2023:08:20:14:32:15]: Info: Detecting monitors
[2023:08:20:14:32:15]: Info: Detected monitor 0: VNC-0, connected: true
[2023:08:20:14:32:15]: Error: Could not create Sunshine Mouse: No such file or directory
[2023:08:20:14:32:15]: Error: Could not create Sunshine Touchscreen: No such file or directory
[2023:08:20:14:32:15]: Error: Could not create Sunshine Keyboard: No such file or directory
[2023:08:20:14:32:15]: Error: Unable to create some input devices! Are you a member of the 'input' group?
[2023:08:20:14:32:15]: Info: Falling back to XTest
[2023:08:20:14:32:15]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2023:08:20:14:32:15]: Info: Trying encoder [nvenc]
[2023:08:20:14:32:15]: Info: Screencasting with X11
[2023:08:20:14:32:15]: Error: Couldn't load cuda: -1
Cannot load libcuda.so.1
[2023:08:20:14:32:15]: Info: Screencasting with X11
Cannot load libcuda.so.1
[2023:08:20:14:32:15]: Error: Couldn't load cuda: -1
[2023:08:20:14:32:15]: Info: Screencasting with X11
Cannot load libcuda.so.1
[2023:08:20:14:32:15]: Error: Couldn't load cuda: -1
[2023:08:20:14:32:15]: Info: Screencasting with X11
Cannot load libcuda.so.1
[2023:08:20:14:32:15]: Error: Couldn't load cuda: -1
[2023:08:20:14:32:15]: Info: Encoder [nvenc] failed
[2023:08:20:14:32:15]: Info: Trying encoder [vaapi]
[2023:08:20:14:32:15]: Info: Screencasting with X11
[2023:08:20:14:32:15]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:32:15]: Info: Screencasting with X11
[2023:08:20:14:32:15]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:32:15]: Info: Screencasting with X11
[2023:08:20:14:32:15]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:32:15]: Info: Screencasting with X11
[2023:08:20:14:32:15]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:32:15]: Info: Encoder [vaapi] failed
[2023:08:20:14:32:15]: Info: Trying encoder [software]
[2023:08:20:14:32:15]: Info: Screencasting with X11
[2023:08:20:14:32:15]: Info: SDR color coding [Rec. 601]
[2023:08:20:14:32:15]: Info: Color range: [JPEG]
[2023:08:20:14:32:15]: Info: System tray created

(sunshine:291): libappindicator-WARNING **: 14:32:15.539: Unable to get the session bus: Error spawning command line ?dbus-launch --autolaunch=7eb21d46a6cc49079578b174108c86f3 --binary-syntax --close-stderr?: Child process exited with code 1

(sunshine:291): LIBDBUSMENU-GLIB-WARNING **: 14:32:15.539: Unable to get session bus: Error spawning command line ?dbus-launch --autolaunch=7eb21d46a6cc49079578b174108c86f3 --binary-syntax --close-stderr?: Child process exited with code 1
[2023:08:20:14:32:15]: Info:
[2023:08:20:14:32:15]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2023:08:20:14:32:15]: Info:
[2023:08:20:14:32:15]: Info: Found encoder software: [libx264]
[2023:08:20:14:32:15]: Info: Open the Web UI to set your new username and password and getting started
[2023:08:20:14:32:15]: Error: Failed to create client: Daemon not running
[2023:08:20:14:32:15]: Info: File /config/.config/sunshine/sunshine_state.json doesn't exist
[2023:08:20:14:32:15]: Info: Configuration UI available at [https://localhost:47990]
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

**** permissions for /dev/dri/card0 are good ****
[custom-init] No custom files found, skipping...
[ls.io-init] done.
2023/08/20 14:59:19 [warn] 192#192: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.1.0 - built Aug 18 2023 16:27:55
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

Set firefox.desktop as the default for x-scheme-handler/https
Set firefox.desktop as the default for x-scheme-handler/http
[adapter_name] -- [/dev/dri/renderD128]
[2023:08:20:14:59:21]: Info: Sunshine version: v0.20.0
[2023:08:20:14:59:21]: Error: Couldn't load cuda: -1
Cannot load libcuda.so.1
[2023:08:20:14:59:21]: Error: Failed to gain CAP_SYS_ADMIN
[2023:08:20:14:59:21]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2023:08:20:14:59:21]: Info: Detecting monitors
[2023:08:20:14:59:21]: Info: Detected monitor 0: VNC-0, connected: true
[2023:08:20:14:59:21]: Error: Could not create Sunshine Mouse: No such file or directory
[2023:08:20:14:59:21]: Error: Could not create Sunshine Touchscreen: No such file or directory
[2023:08:20:14:59:21]: Error: Could not create Sunshine Keyboard: No such file or directory
[2023:08:20:14:59:21]: Error: Unable to create some input devices! Are you a member of the 'input' group?
[2023:08:20:14:59:21]: Info: Falling back to XTest
[2023:08:20:14:59:21]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2023:08:20:14:59:21]: Info: Trying encoder [nvenc]
[2023:08:20:14:59:21]: Info: Screencasting with X11
Cannot load libcuda.so.1
Cannot load libcuda.so.1
[2023:08:20:14:59:21]: Error: Couldn't load cuda: -1
[2023:08:20:14:59:21]: Info: Screencasting with X11
[2023:08:20:14:59:21]: Error: Couldn't load cuda: -1
[2023:08:20:14:59:21]: Info: Screencasting with X11
Cannot load libcuda.so.1
[2023:08:20:14:59:21]: Error: Couldn't load cuda: -1
[2023:08:20:14:59:21]: Info: Screencasting with X11
[2023:08:20:14:59:21]: Error: Couldn't load cuda: -1
[2023:08:20:14:59:21]: Info: Encoder [nvenc] failed
Cannot load libcuda.so.1
[2023:08:20:14:59:21]: Info: Trying encoder [vaapi]
[2023:08:20:14:59:21]: Info: Screencasting with X11
[2023:08:20:14:59:21]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:59:21]: Info: Screencasting with X11
[2023:08:20:14:59:21]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:59:21]: Info: Screencasting with X11
[2023:08:20:14:59:21]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:59:21]: Info: Screencasting with X11
[2023:08:20:14:59:21]: Error: Couldn't open /dev/dri/renderD128: No such file or directory
[2023:08:20:14:59:21]: Info: Encoder [vaapi] failed
[2023:08:20:14:59:21]: Info: Trying encoder [software]
[2023:08:20:14:59:21]: Info: Screencasting with X11
[2023:08:20:14:59:21]: Info: SDR color coding [Rec. 601]
[2023:08:20:14:59:21]: Info: Color range: [JPEG]
[2023:08:20:14:59:21]: Info: System tray created

(sunshine:260): libappindicator-WARNING **: 14:59:21.594: Unable to get the session bus: Error spawning command line ?dbus-launch --autolaunch=7eb21d46a6cc49079578b174108c86f3 --binary-syntax --close-stderr?: Child process exited with code 1

(sunshine:260): LIBDBUSMENU-GLIB-WARNING **: 14:59:21.595: Unable to get session bus: Error spawning command line ?dbus-launch --autolaunch=7eb21d46a6cc49079578b174108c86f3 --binary-syntax --close-stderr?: Child process exited with code 1
[2023:08:20:14:59:21]: Info:
[2023:08:20:14:59:21]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2023:08:20:14:59:21]: Info:
[2023:08:20:14:59:21]: Info: Found encoder software: [libx264]
[2023:08:20:14:59:21]: Info: Open the Web UI to set your new username and password and getting started
[2023:08:20:14:59:21]: Info: File /config/.config/sunshine/sunshine_state.json doesn't exist
[2023:08:20:14:59:21]: Info: Configuration UI available at [https://localhost:47990]
[2023:08:20:14:59:21]: Error: Failed to create client: Daemon not running
 2023-08-20 15:07:01,868 [INFO] websocket 0: got client connection from 127.0.0.1
 2023-08-20 15:07:01,875 [PRIO] Connections: accepted: @172.19.0.1_1692562021.868366::websocket
 2023-08-20 15:14:33,323 [PRIO] Connections: closed: @172.19.0.1_1692562021.868366::websocket (Clean disconnection)
 2023-08-20 15:14:50,339 [INFO] websocket 1: got client connection from 127.0.0.1
 2023-08-20 15:14:50,348 [PRIO] Connections: accepted: @172.19.0.1_1692562490.339975::websocket
 2023-08-20 15:15:50,029 [PRIO] Connections: closed: @172.19.0.1_1692562490.339975::websocket (Clean disconnection)
 2023-08-20 15:15:57,591 [INFO] websocket 2: got client connection from 127.0.0.1
 2023-08-20 15:15:57,599 [PRIO] Connections: accepted: @172.19.0.1_1692562557.591670::websocket
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

pythoninthegrass commented 1 year ago

Looking over the logs, could be related to Failed to gain CAP_SYS_ADMIN. Will poke around to see if I can sort that out.

thelamer commented 1 year ago

The host IP for route method is only for remote play, try it without that env var, it might not work in all environments. Sunshine works without it.

pythoninthegrass commented 1 year ago

Looks like that was half the equation — commented out the HOST_IP env var, then had to update the pacman db before being able to install anything. Was tripped up by the former, so couldn't complete the latter.

Edited env vars section:

    environment:
      - TZ=America/Chicago
      - PUID=1000
      - PGID=1000
      - DRINODE=/dev/dri/renderD128
      # - HOST_IP=192.168.192.161                           # optional
      - STARTUP=KDE                                         # optional
      - RESOLUTION=1920x1080                                # optional

Now it runs as expected:

λ docker exec -it steamos bash
[root@steamos /]# pacman -S iputils
warning: database file for 'core' does not exist (use '-Sy' to download)
warning: database file for 'extra' does not exist (use '-Sy' to download)
warning: database file for 'multilib' does not exist (use '-Sy' to download)
warning: database file for 'jupiter-staging' does not exist (use '-Sy' to download)
warning: database file for 'holo-staging' does not exist (use '-Sy' to download)
error: target not found: iputils
[root@steamos /]# pacman -Sy
:: Synchronizing package databases...
 core downloading...
 extra downloading...
 multilib downloading...
 jupiter-staging downloading...
 holo-staging downloading...
[root@steamos /]# pacman -S --noconfirm iputils
resolving dependencies...
looking for conflicting packages...

Package (1)   New Version  Net Change  Download Size

core/iputils  20221126-2     0.43 MiB       0.11 MiB

Total Download Size:   0.11 MiB
Total Installed Size:  0.43 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 iputils-20221126-2-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing iputils...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[root@steamos /]# ping google.com
PING google.com (142.251.116.138) 56(84) bytes of data.
64 bytes from rt-in-f138.1e100.net (142.251.116.138): icmp_seq=1 ttl=103 time=10.6 ms
64 bytes from rt-in-f138.1e100.net (142.251.116.138): icmp_seq=2 ttl=103 time=10.9 ms
^C

Thanks for your help @thelamer!

vcadieux commented 1 year ago

I do have the same problem using Unraid. Internet is not working when I access the steamos so I can't setup steam neither update it. Removing the HOST_IP does not fix the issue.

What's even worst is that it seems that launching this particular docker makes my entire Unraid server loosing internet, have to reboot the server without having that particular docker container launching on boot. The server will be back online until I start that container again.

It is being set as HOST for the network.

domrockt commented 1 year ago

I do have the same problem using Unraid. Internet is not working when I access the steamos so I can't setup steam neither update it. Removing the HOST_IP does not fix the issue.

What's even worst is that it seems that launching this particular docker makes my entire Unraid server loosing internet, have to reboot the server without having that particular docker container launching on boot. The server will be back online until I start that container again.

It is being set as HOST for the network.

same :D no internet, i cant use it n bridge mode cause it wants to use 0.0.0.0:80 is already in use.

jac2424 commented 1 week ago

Issue still seems unresolved in Unraid even running on latest container update and Beta Unraid 7.0.0-beta.4.