TrueOsiris / docker-vrising

Container for V-Rising dedicated server
237 stars 63 forks source link

Server already running #7

Closed Chapapa1 closed 2 years ago

Chapapa1 commented 2 years ago

Hello,

after a restart of the docker, this is what i get and i cant get it to run now:

SteamAppId set to 

Starting Xvfb and wine64 ...

(EE) 

Fatal server error:

(EE) Server is already active for display 0

    If this server is no longer running, remove /tmp/.X0-lock

    and start again.

(EE) 

0078:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".

0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION

0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.

0024:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.

0024:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000020FA70

00f8:fixme:file:CancelSynchronousIo (000000000000006C): stub

2022-05-21 13:04:14 status installed xserver-xorg-input-all:amd64 1:7.7+23ubuntu2

2022-05-21 13:04:14 trigproc fontconfig:amd64 2.13.1-4.2ubuntu5 <none>

2022-05-21 13:04:14 status half-configured fontconfig:amd64 2.13.1-4.2ubuntu5

2022-05-21 13:04:15 status installed fontconfig:amd64 2.13.1-4.2ubuntu5

2022-05-21 13:04:15 trigproc hicolor-icon-theme:all 0.17-2 <none>

2022-05-21 13:04:15 status half-configured hicolor-icon-theme:all 0.17-2

2022-05-21 13:04:15 status installed hicolor-icon-theme:all 0.17-2

2022-05-21 13:04:15 trigproc libc-bin:amd64 2.35-0ubuntu3 <none>

2022-05-21 13:04:15 status half-configured libc-bin:amd64 2.35-0ubuntu3

2022-05-21 13:04:15 status installed libc-bin:amd64 2.35-0ubuntu3

00f8:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000021FD70

017c:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000021FD70

The issue is, there is no /tmp/.X0-lock

Additional Info:

inxi:

System:
  Kernel: 5.15.12-1-pve x86_64 bits: 64 compiler: gcc v: 10.2.1 Console: lxc/tty1
    Distro: Ubuntu 22.04 LTS (Jammy Jellyfish)
Machine:
  Type: Desktop Mobo: ASRock model: X300M-STX serial: <superuser required>
    UEFI: American Megatrends LLC. v: P1.70 date: 07/01/2021
CPU:
  Info: 6-core model: AMD Ryzen 5 5600G with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3
    rev: 0 cache: L1: 384 KiB L2: 3 MiB L3: 16 MiB
  Speed (MHz): avg: 3089 high: 3435 min/max: 1400/4464 boost: enabled cores: 1: 3211 2: 2993
    3: 2994 4: 2993 5: 3301 6: 3181 7: 2994 8: 2994 9: 3435 10: 2993 11: 2994 12: 2992
    bogomips: 7785
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Cezanne driver: amdgpu v: kernel bus-ID: 03:00.0
  Display: server: No display server data found. Headless machine? tty: 150x40
  Message: GL data unavailable in console. Try -G --display
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel v: kernel
    bus-ID: 03:00.1
  Device-2: AMD Family 17h HD Audio vendor: ASRock driver: snd_hda_intel v: kernel
    bus-ID: 03:00.6
  Sound Server-1: ALSA v: k5.15.12-1-pve running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASRock driver: r8169
    v: kernel port: f000 bus-ID: 01:00.0
  IF-ID-1: bonding_masters state: N/A speed: N/A duplex: N/A mac: N/A
  IF-ID-2: docker0 state: up speed: 10000 Mbps duplex: unknown mac: <filter>
  IF-ID-3: eth0 state: up speed: 10000 Mbps duplex: full mac: <filter>
  IF-ID-4: veth3cd254b state: up speed: 10000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 238.47 GiB used: 8.02 GiB (3.4%)
  ID-1: /dev/sda model: SSD 256GB PID: J size: 238.47 GiB
Partition:
  ID-1: / size: 9.78 GiB used: 8.02 GiB (82.0%) fs: ext4 dev: /dev/pve-vm--106--disk--0
Swap:
  ID-1: swap-1 type: partition size: 4.5 GiB used: 0 KiB (0.0%) dev: N/A
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 28.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 35 Uptime: 2m Memory: 4 GiB used: 185.7 MiB (4.5%) Init: systemd runlevel: 5
  Compilers: gcc: N/A Packages: 467 Shell: Bash v: 5.1.16 inxi: 3.3.13

ps -f $(cat /tmp/.X0-lock)

--> is empty

Edit:

So i got it working again, however this is only temporary:

  1. Restart the docker
  2. Error occurs and server is not running
  3. Typ in terminal: Xvfb :0 -screen 0 1024x768x16 &
  4. restart docker and now the server runs.

If i now restart the computer, i have to do these steps manually again.

TrueOsiris commented 2 years ago

Not having this issue. Investigating.

MMM-Jasmin commented 2 years ago

Same problem here. Stoped and started the docker container and now I am getting this error as well. It shall also run on my nas so the display error is kind of strange

Chapapa1 commented 2 years ago

@MMM-Jasmin i noticed that Xvfb is not installed in the docker. so i just installed it and then took the steps i posted above.

TrueOsiris commented 2 years ago

@Chapapa1 That would be extremely weird, as these lines are in the Dockerfile. Did you update while not removing older images of this docker?

RUN apt install -y xserver-xorg \
                   xvfb

it seems your host is not stopping the (dummy) display service on container restart. If you stop the docker container, is an x process still running on the host? Or, are you using xvfb in another container as well?

Chapapa1 commented 2 years ago

@TrueOsiris i use an lxc template with 22.04 Docker and Portainer on it. Nothing else. So i did not really update but started fresh everytime using the :latest parameter.

Yeah i figured that there must be an x process running in the docker, however there was none. That is when i noticed xvfb is not installed in this docker. i installed xfvb and used the steps i posted earlier to get it running again.

TrueOsiris commented 2 years ago

How did you install xfvb in the docker, if I may ask? dpkg?

Chapapa1 commented 2 years ago

here is the cmd i used:

image

Chapapa1 commented 2 years ago

Edit did not work on my previous post, so i make a new one:

i made a new lxc container to go trough the steps again, here is what happens:

image

  1. Xvfb is not installed
  2. Server is running and i can connect and create a char. vrisingtest_logs_first_start.TXT

Next i will restart and post logs etc.

Chapapa1 commented 2 years ago

Sorry for reposting, but i cannot edit and add new logs... weird..

Anyways,

  1. Reboot LXC
  2. Manually start vrising docker
  3. Can connect and create char vrising_logs_2_reboot_lxc.txt

Now the interesting part:

  1. Restart the vrising docker (via portainer)
  2. cannot connect to server _vrising_logs_restartvrisingcontainer.txt

Edit: So it seems rebooting the lxc works, but restarting the vrisingdocker does not work. I set my restart-policy to "unless-stopped", now after a lxc reboot the vrising docker automatically starts and i can connect.

MMM-Jasmin commented 2 years ago

If you remove the lock after stoping the docker (/tmp/.X0-lock) it will start again. So I did a find / -iname ".X0-lock" and delete the locks. Then i can start it again and connect

Chapapa1 commented 2 years ago

ahh, i did not find it in /tmp/.. with the find cmd i was able to find it aswell:

image

TrueOsiris commented 2 years ago

just crawled through my image build log

Step 10/14 : RUN apt install -y xserver-xorg                    xvfb
 ---> Running in 51d149578c6c

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  apport apport-symptoms keyboard-configuration libegl-mesa0 libegl1 libepoxy0
  libevdev2 libfontenc1 libice6 libinput-bin libinput10 libmtdev1 libsm6
  libwacom-bin libwacom-common libwacom9 libxatracker2 libxaw7 libxcb-util1
  libxcvt0 libxfont2 libxkbfile1 libxmu6 libxmuu1 libxt6 libxtst6 libxvmc1
  python3-apport python3-problem-report python3-systemd python3-yaml udev
  x11-xkb-utils xauth xcvt xfonts-base xfonts-encodings xfonts-utils
  xserver-common xserver-xorg-core xserver-xorg-input-all
  xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-legacy
  xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati
  xserver-xorg-video-fbdev xserver-xorg-video-intel xserver-xorg-video-nouveau
  xserver-xorg-video-qxl xserver-xorg-video-radeon xserver-xorg-video-vesa
  xserver-xorg-video-vmware
Suggested packages:
  apport-gtk | apport-kde xfonts-100dpi | xfonts-75dpi xfonts-scalable xinput
  firmware-amd-graphics xserver-xorg-video-r128 xserver-xorg-video-mach64
  firmware-misc-nonfree
The following NEW packages will be installed:
  apport apport-symptoms keyboard-configuration libegl-mesa0 libegl1 libepoxy0
  libevdev2 libfontenc1 libice6 libinput-bin libinput10 libmtdev1 libsm6
  libwacom-bin libwacom-common libwacom9 libxatracker2 libxaw7 libxcb-util1
  libxcvt0 libxfont2 libxkbfile1 libxmu6 libxmuu1 libxt6 libxtst6 libxvmc1
  python3-apport python3-problem-report python3-systemd python3-yaml udev
  x11-xkb-utils xauth xcvt xfonts-base xfonts-encodings xfonts-utils
  xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all
  xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-legacy
  xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati
  xserver-xorg-video-fbdev xserver-xorg-video-intel xserver-xorg-video-nouveau
  xserver-xorg-video-qxl xserver-xorg-video-radeon xserver-xorg-video-vesa
  xserver-xorg-video-vmware xvfb
0 upgraded, 56 newly installed, 0 to remove and 0 not upgraded.
Unpacking xserver-xorg-video-qxl (0.1.5+git20200331-3) ...
Selecting previously unselected package xvfb.
Preparing to unpack .../54-xvfb_2%3a21.1.3-2ubuntu2_amd64.deb ...
Unpacking xvfb (2:21.1.3-2ubuntu2) ...
Selecting previously unselected package xserver-xorg-legacy.
Preparing to unpack .../55-xserver-xorg-legacy_2%3a21.1.3-2ubuntu2_amd64.deb ...

Setting up xvfb (2:21.1.3-2ubuntu2) ...

All without errors. xvfb is definately in the image. I'm kinda clueless why it wouldn't be in your build. My only guess is lxc is retaining a cached version of the sub-images while it did pull a newer version of start.sh.