selenoid icon indicating copy to clipboard operation
selenoid copied to clipboard

Cannot open display browser:99, error 1. browser:99: I/O error

Open EzrealerQAQ opened this issue 2 years ago • 11 comments

when i run webdriver.Remote() in my program for some times ,the first few times success,after 3 or more times,errors as follows:

program error: selenium.common.exceptions.SessionNotCreatedException: Message: wait: http://172.17.0.2:4444/ does not respond in 1m0s

selenoid contaioner logs: 2022/03/09 04:17:55 [948] [SERVICE_STARTUP_FAILED] [wait: http://172.17.0.2:4444/ does not respond in 1m0s]

video_record container logs:

Sleeping before next attempt... Sleeping before next attempt... ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.3.0 (Alpine 9.3.0) configuration: --prefix=/usr --enable-avfilter --enable-gpl --enable-libx264 --enable-libpulse --enable-static --enable-small --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 --enable-indev=xcbgrab --enable-indev=pulse --disable-debug libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 [x11grab @ 0x7ff23a8633c0] Cannot open display browser:99, error 1. browser:99: I/O error

need help,thanks a lot

EzrealerQAQ avatar Mar 09 '22 04:03 EzrealerQAQ

@EzrealerQAQ need browser container logs.

vania-pooh avatar Mar 09 '22 07:03 vania-pooh

@vania-pooh browser container logs:

Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... Waiting X server... ....

EzrealerQAQ avatar Mar 09 '22 08:03 EzrealerQAQ

@EzrealerQAQ probably your cluster is just overloaded.

vania-pooh avatar Mar 09 '22 08:03 vania-pooh

@vania-pooh deploy stand alone by docker,ram 200G+ left,cpu 1.7 used ,storage 5T left, i'll try to deploy in a new server

EzrealerQAQ avatar Mar 09 '22 08:03 EzrealerQAQ

but it seems the reson of error is about ffmpeg or x11grap as [x11grab @ 0x7ff23a8633c0] Cannot open display browser:99, error 1. browser:99: I/O error

EzrealerQAQ avatar Mar 09 '22 08:03 EzrealerQAQ

@EzrealerQAQ video recorder is unable to access X server because it does not start for some reason. X server is anyway started in browser container. These messages Waiting X server... should take 1-2 seconds maximum. Probably you are also running Selenoid in some restricted environment preventing X server from start.

vania-pooh avatar Mar 09 '22 08:03 vania-pooh

@vania-pooh thank you very much,i can't find what to prevent X server from start,maybe a new clear server would work...

EzrealerQAQ avatar Mar 09 '22 08:03 EzrealerQAQ

@EzrealerQAQ we are testing everything under Ubuntu. in case of using CentOS probably turning off SELinux can help.

vania-pooh avatar Mar 09 '22 08:03 vania-pooh

@vania-pooh i use centos7, [root@ezrealer selenoid]# getenforce Disabled and anthor new clear server also don't work...

EzrealerQAQ avatar Mar 09 '22 08:03 EzrealerQAQ

i add try to my program

        while True:
            try:
                driver = webdriver.Remote(command_executor=command_executor,
                                          desired_capabilities=capabilities, options=self.options)

                break
            except Exception as e:
                print(e)
                time.sleep(1)

every try could success,so strange....

EzrealerQAQ avatar Mar 09 '22 10:03 EzrealerQAQ

@EzrealerQAQ try under Ubuntu is possible.

vania-pooh avatar Mar 09 '22 12:03 vania-pooh

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jan 18 '24 01:01 github-actions[bot]