Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video-recorder: "Cannot open display 127.0.0.1:0, error 1." #437

Closed
toby181 opened this issue Feb 13, 2025 · 10 comments
Closed

video-recorder: "Cannot open display 127.0.0.1:0, error 1." #437

toby181 opened this issue Feb 13, 2025 · 10 comments

Comments

@toby181
Copy link

toby181 commented Feb 13, 2025

Hi together,

We got a moon setup in version 2.6.2 running on k8s.

From around 50 test cases which all should create and upload a video to s3 around 70% of them were failing with the following exception:

ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219
  configuration: --prefix=/usr --pkg-config-flags=--static --extra-libs='-lpthread -lm -lz' --extra-ldexeflags=-static --enable-gpl --enable-static --enable-small --enable-avfilter --enable-libx264 --enable-libxcb --disable-ffplay --disable-ffprobe --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-w32threads --disable-alsa --disable-audiotoolbox --disable-cuda --disable-cuvid --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-librtmp --disable-devices --disable-debug --disable-asm --enable-indev=xcbgrab
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[x11grab @ 0x7fc98f135030] Cannot open display 127.0.0.1:0, error 1.
127.0.0.1:0: I/O error
stream closed EOF for moon/chrome-129-0-6fc68560-e725-4092-b1cd-dc6f056c36e4 (video-recorder)

The video-recorder container stops with status 'completed', it does not crash (from a pod POV).

It's not the test case itself nor resources, we verified that.

My assumption is that the video-recorder container is starting too early while the others are not yet up and therefore can't connect.
The workaround that we got in place is to use quay.io/aerokube/video-recorder:latest. This way k8s will always pull the image, due to latest tag, and the container starts last since it needs to pull the image first, which the other containers do not need to do since we're using an image proxy to cache them or they're already available on the node.

Due to an upload bug in the video-recorder image in version 2.7.2 it makes no sense to update since we have to use the latest tag there anyway.

@aandryashin
Copy link
Member

aandryashin commented Feb 13, 2025 via email

@toby181
Copy link
Author

toby181 commented Feb 13, 2025

Those are the images that we use
quay.io/aerokube/ca-certs:2.6.2
quay.io/browser/google-chrome-stable:129.0
quay.io/aerokube/defender:2.6.2
quay.io/aerokube/xvfb-server:2.6.2
quay.io/aerokube/vnc-server:2.6.2
quay.io/aerokube/video-recorder:latest

@aandryashin
Copy link
Member

aandryashin commented Feb 13, 2025 via email

@toby181
Copy link
Author

toby181 commented Feb 13, 2025

The issue occurs with version 2.6.2 of the video-recorder but is tackled (workaround) with 'latest' tag. I see, what was not clearly stated in my initial report, sorry.
So for the mentioned issue, we use these images:
quay.io/aerokube/ca-certs:2.6.2
quay.io/browser/google-chrome-stable:129.0
quay.io/aerokube/defender:2.6.2
quay.io/aerokube/xvfb-server:2.6.2
quay.io/aerokube/vnc-server:2.6.2
quay.io/aerokube/video-recorder:2.6.2

@aandryashin
Copy link
Member

aandryashin commented Feb 13, 2025 via email

@toby181
Copy link
Author

toby181 commented Feb 13, 2025

Ok, let me explain again and separate the topics.

2.6.2 + video-recorder:latest

  • Latest tag is compatible with version 2.6.2 since we're using that successfully. The video is uploaded to s3. Every pod succeeds.
quay.io/aerokube/ca-certs:2.6.2
quay.io/browser/google-chrome-stable:129.0
quay.io/aerokube/defender:2.6.2
quay.io/aerokube/xvfb-server:2.6.2
quay.io/aerokube/vnc-server:2.6.2
quay.io/aerokube/video-recorder:latest
  • Latest tag is, in case of moon browser pods, always pulled, see the official kubernetes documentation: Default image pull policy: "if you omit the imagePullPolicy field, and the tag for the container image is :latest, imagePullPolicy is automatically set to Always;"
    If you check the browser pod there is no imagePullPolicy configured, therefore it's using the default values.

2.6.2 + video-recorder:2.6.2

We got moon in version 2.6.2 deployed and our browser pods are running with those images:

quay.io/aerokube/ca-certs:2.6.2
quay.io/browser/google-chrome-stable:129.0
quay.io/aerokube/defender:2.6.2
quay.io/aerokube/xvfb-server:2.6.2
quay.io/aerokube/vnc-server:2.6.2
quay.io/aerokube/video-recorder:2.6.2

From around 50 test cases which all should create and upload a video to s3 around 70% of them were failing with the following exception:

ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219
  configuration: --prefix=/usr --pkg-config-flags=--static --extra-libs='-lpthread -lm -lz' --extra-ldexeflags=-static --enable-gpl --enable-static --enable-small --enable-avfilter --enable-libx264 --enable-libxcb --disable-ffplay --disable-ffprobe --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-w32threads --disable-alsa --disable-audiotoolbox --disable-cuda --disable-cuvid --disable-d3d11va --disable-dxva2 --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-librtmp --disable-devices --disable-debug --disable-asm --enable-indev=xcbgrab
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[x11grab @ 0x7f6e01000030] Cannot open display 127.0.0.1:0, error 1.
127.0.0.1:0: I/O error
stream closed EOF for moon-namespace/chrome-129-0-473cf699-bbcd-4b2b-abf1-e2beaf6ce7d8 (video-recorder)

The video-recorder container stops with status 'completed', it does not crash (from a pod POV).

@aandryashin
Copy link
Member

aandryashin commented Feb 13, 2025 via email

@toby181
Copy link
Author

toby181 commented Feb 13, 2025

No OOM. The video-recorder container stops immediately but with the reason 'Completed', not Error or OOM. All of the other containers are proceeding.

  video-recorder:
    Container ID:   containerd://4a105994e84a1bf7665b1cdb24c835a1db98bcea7411546ef333057f0e42a291
    Image:          quay.io/aerokube/video-recorder:2.6.2
    Image ID:       quay.io/aerokube/video-recorder@sha256:29b09bfb3874eb4f8d0a00e423dd41b9bf4f871a0f04919e326e6dc55db7dce4
    Port:           <none>
    Host Port:      <none>
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Thu, 13 Feb 2025 14:20:06 +0100
      Finished:     Thu, 13 Feb 2025 14:20:06 +0100
    Ready:          False
    Restart Count:  0
    Limits:
      cpu:     4
      memory:  8Gi
    Requests:
      cpu:     1
      memory:  1000Mi

@aandryashin
Copy link
Member

aandryashin commented Feb 13, 2025 via email

@toby181
Copy link
Author

toby181 commented Feb 14, 2025

Version 2.7.3 looks quite good. We ran a lot of tests and no issues so far, all video-recorder container started properly. Thanks for providing that version so quickly and fixing the issue. Much appreciated!

Those are the images that we were using, all are the default ones from helm.

quay.io/aerokube/ca-certs:2.7.3
quay.io/browser/google-chrome-stable:129.0
quay.io/aerokube/defender:2.7.3
quay.io/aerokube/xvfb:21.1
quay.io/aerokube/openbox:3.6.1
quay.io/aerokube/x11vnc:0.9.16
quay.io/aerokube/video-recorder:2.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants