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

[🐛 Bug]: noVNC session not showing anything #2154

Closed
kristaps-aksjonovs opened this issue Feb 29, 2024 · 22 comments · Fixed by #2192
Closed

[🐛 Bug]: noVNC session not showing anything #2154

kristaps-aksjonovs opened this issue Feb 29, 2024 · 22 comments · Fixed by #2192

Comments

@kristaps-aksjonovs
Copy link

kristaps-aksjonovs commented Feb 29, 2024

What happened?

After starting the standalone or hub docker container and trying to debug using noVNC it shows nothing.
With Chrome Version 108, it was working as usual, but with versions 120, 121, and 122 it seems not to work anymore when trying to inspect the session.

no_VNC_session

Command used to start Selenium Grid with Docker (or Kubernetes)

docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:4.18.1-20240224

Relevant log output

2024-02-29 09:41:15 2024-02-29 07:41:15,607 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2024-02-29 09:41:15 2024-02-29 07:41:15,609 INFO RPC interface 'supervisor' initialized
2024-02-29 09:41:15 2024-02-29 07:41:15,610 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-02-29 09:41:15 2024-02-29 07:41:15,610 INFO supervisord started with pid 24
2024-02-29 09:41:16 2024-02-29 07:41:16,618 INFO spawned: 'xvfb' with pid 31
2024-02-29 09:41:16 2024-02-29 07:41:16,621 INFO spawned: 'vnc' with pid 32
2024-02-29 09:41:16 2024-02-29 07:41:16,623 INFO spawned: 'novnc' with pid 33
2024-02-29 09:41:16 2024-02-29 07:41:16,626 INFO spawned: 'selenium-standalone' with pid 34
2024-02-29 09:41:16 2024-02-29 07:41:16,735 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-02-29 09:41:16 2024-02-29 07:41:16,736 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-02-29 09:41:16 2024-02-29 07:41:16,736 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-02-29 09:41:16 2024-02-29 07:41:16,736 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-02-29 09:41:16 2024-02-29 07:41:16,736 INFO exited: novnc (terminated by SIGTRAP; not expected)
2024-02-29 09:41:16 Appending Selenium options: --heartbeat-period 30
2024-02-29 09:41:16 Appending Selenium options: --reject-unsupported-caps false
2024-02-29 09:41:16 Setting up SE_NODE_GRID_URL...
2024-02-29 09:41:16 Selenium Grid Standalone configuration: 
2024-02-29 09:41:16 [network]
2024-02-29 09:41:16 relax-checks = true
2024-02-29 09:41:16 
2024-02-29 09:41:16 [node]
2024-02-29 09:41:16 session-timeout = "300"
2024-02-29 09:41:16 override-max-sessions = false
2024-02-29 09:41:16 detect-drivers = false
2024-02-29 09:41:16 drain-after-session-count = 0
2024-02-29 09:41:16 max-sessions = 1
2024-02-29 09:41:16 
2024-02-29 09:41:16 [[node.driver-configuration]]
2024-02-29 09:41:16 display-name = "chrome"
2024-02-29 09:41:16 stereotype = '{"browserName": "chrome", "browserVersion": "122.0", "platformName": "Linux", "goog:chromeOptions": {"binary": "/usr/bin/google-chrome"}}'
2024-02-29 09:41:16 max-sessions = 1
2024-02-29 09:41:16 
2024-02-29 09:41:16 Starting Selenium Grid Standalone...
2024-02-29 09:41:16 Tracing is disabled
2024-02-29 09:41:17 07:41:17.666 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
2024-02-29 09:41:17 07:41:17.674 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
2024-02-29 09:41:18 07:41:18.371 INFO [NodeOptions.getSessionFactories] - Detected 3 available processors
2024-02-29 09:41:18 07:41:18.429 INFO [NodeOptions.report] - Adding chrome for {"browserName": "chrome","browserVersion": "122.0","goog:chromeOptions": {"binary": "\u002fusr\u002fbin\u002fgoogle-chrome"},"platformName": "linux","se:noVncPort": 7900,"se:vncEnabled": true} 1 times
2024-02-29 09:41:18 07:41:18.451 INFO [Node.<init>] - Binding additional locator mechanisms: relative
2024-02-29 09:41:18 07:41:18.474 INFO [GridModel.setAvailability] - Switching Node 36527a08-dc88-4d41-98d9-c3e5f2ddfd55 (uri: http://172.17.0.2:4444) from DOWN to UP
2024-02-29 09:41:18 07:41:18.474 INFO [LocalDistributor.add] - Added node 36527a08-dc88-4d41-98d9-c3e5f2ddfd55 at http://172.17.0.2:4444. Health check every 120s
2024-02-29 09:41:18 07:41:18.564 INFO [Standalone.execute] - Started Selenium Standalone 4.18.1 (revision b1d3319b48): http://172.17.0.2:4444
2024-02-29 09:41:19 2024-02-29 07:41:19,593 INFO exited: vnc (terminated by SIGTRAP; not expected)
2024-02-29 09:41:55 07:41:55.427 INFO [LocalDistributor.newSession] - Session request received by the Distributor: 
2024-02-29 09:41:55  [Capabilities {browserName: chrome}]
2024-02-29 09:41:58 07:41:58.162 INFO [LocalNode.newSession] - Session created by the Node. Id: 50d83fc47fe5ae8ee34211cef4f33abd, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 122.0.6261.69, chrome: {chromedriverVersion: 122.0.6261.69 (81bc525b6a36..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:32893}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://172.17.0.2:4444/sessio..., se:cdpVersion: 122.0.6261.69, se:vnc: ws://172.17.0.2:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.2:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
2024-02-29 09:41:58 07:41:58.175 INFO [LocalDistributor.newSession] - Session created by the Distributor. Id: 50d83fc47fe5ae8ee34211cef4f33abd 
2024-02-29 09:41:58  Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 122.0.6261.69, chrome: {chromedriverVersion: 122.0.6261.69 (81bc525b6a36..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:32893}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://172.17.0.2:4444/sessio..., se:cdpVersion: 122.0.6261.69, se:vnc: ws://172.17.0.2:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.2:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
2024-02-29 09:42:04 07:42:04.592 INFO [ProxyNodeWebsockets.createWsEndPoint] - Establishing connection to ws://172.17.0.2:7900
2024-02-29 09:42:04 07:42:04.617 WARN [DefaultChannelPipeline.onUnhandledInboundException] - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
2024-02-29 09:42:04 java.lang.NullPointerException
2024-02-29 09:42:04 at org.openqa.selenium.netty.server.RequestConverter.channelRead0(RequestConverter.java:127)
2024-02-29 09:42:04 at org.openqa.selenium.netty.server.RequestConverter.channelRead0(RequestConverter.java:52)
2024-02-29 09:42:04 at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
2024-02-29 09:42:04 at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:102)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
2024-02-29 09:42:04 at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:102)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
2024-02-29 09:42:04 at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
2024-02-29 09:42:04 at org.openqa.selenium.netty.server.WebSocketUpgradeHandler.channelRead(WebSocketUpgradeHandler.java:98)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
2024-02-29 09:42:04 at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
2024-02-29 09:42:04 at io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.channelRead(WebSocketServerExtensionHandler.java:91)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
2024-02-29 09:42:04 at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
2024-02-29 09:42:04 at io.netty.handler.codec.http.HttpServerKeepAliveHandler.channelRead(HttpServerKeepAliveHandler.java:64)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
2024-02-29 09:42:04 at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
2024-02-29 09:42:04 at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
2024-02-29 09:42:04 at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
2024-02-29 09:42:04 at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
2024-02-29 09:42:04 at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
2024-02-29 09:42:04 at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
2024-02-29 09:42:04 at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
2024-02-29 09:42:04 at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
2024-02-29 09:42:04 at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
2024-02-29 09:42:04 at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
2024-02-29 09:42:04 at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
2024-02-29 09:42:04 at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
2024-02-29 09:42:04 at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
2024-02-29 09:42:04 at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
2024-02-29 09:42:04 at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
2024-02-29 09:42:04 at java.base/java.lang.Thread.run(Thread.java:829)
2024-02-29 09:42:06 07:42:06.684 INFO [LocalSessionMap.lambda$new$0] - Deleted session from local Session Map, Id: 50d83fc47fe5ae8ee34211cef4f33abd
2024-02-29 09:42:06 07:42:06.685 INFO [GridModel.release] - Releasing slot for session id 50d83fc47fe5ae8ee34211cef4f33abd
2024-02-29 09:42:06 07:42:06.686 INFO [SessionSlot.stop] - Stopping session 50d83fc47fe5ae8ee34211cef4f33abd

Operating System

macOS Sonoma 14.2.1 (23C71) Apple M3

Docker Selenium version (image tag)

4.18.1-20240224

Selenium Grid chart version (chart version)

No response

Copy link

@kristaps-aksjonovs, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@VietND96
Copy link
Member

I saw macOS Sonoma 14.2.1 (23C71) Apple M3 - can you check out image for ARM here https://github.com/seleniumhq-community/docker-seleniarm/releases

@kristaps-aksjonovs
Copy link
Author

@VietND96 The VNC part doesn't have issues, there seems to be issue with connection with ARM image.
But still how 108 standalone works without any issues but 120+ throws the Errors in container and for VNC not browser it self?

@matc1294
Copy link

matc1294 commented Mar 1, 2024

This might not be an ARM alone issue, I'm having the same issue with a m6i.metal instance in AWS, for me the noVNC was working just up to the 1.14 after that all the versions of the selenium grid have had issues.

@VietND96
Copy link
Member

VietND96 commented Mar 3, 2024

In this case, can you open Dev Tool (press F12), tab Console to see any error logs of noVNC there?

@matc1294
Copy link

matc1294 commented Mar 3, 2024

I don't get any messages on console
On the network tab this is what I get
image

Sometimes the noVNC connects after 5 minutes, other times it doesn't matter how long the connection is requested, it never connects.

@yongjun925
Copy link

Encountered the same problem on Mac m3

@mikejohnstonPremierinc
Copy link

mikejohnstonPremierinc commented Mar 4, 2024

Encountering this same issue with version 122 standalone chrome/edge/firefox and with node-docker 4.18.1 and hub 4.18.1

version: "3"
services:
node-docker:
image: selenium/node-docker:4.18.1
volumes:
- /share/pqafiles/assets:/opt/selenium/assets
- /share/pqafiles/config/toml_server1.toml:/opt/bin/config.toml
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_VNC_NO_PASSWORD=1
- SE_OPTS=--session-timeout 297 --enable-managed-downloads true
selenium-hub:
image: selenium/hub:4.18.1
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"

This is what I see on the Console tab and the Network tab
Console
Network

@kristaps-aksjonovs
Copy link
Author

@VietND96 Any idea when this will be addressed?

VietND96 added a commit that referenced this issue Mar 27, 2024
Take latest version for possible fixes could have #2154

Signed-off-by: Viet Nguyen Duc <[email protected]>
@VietND96
Copy link
Member

In the release 4.19.0-20240328, I updated noVNC to download the latest source on their main branch instead of the version v1.4.0 (since Jan 2023) to get new updates from their side.
Kindly check if it helps solve the above issues.

@mikejohnstonPremierinc
Copy link

mikejohnstonPremierinc commented Mar 28, 2024

@VietND96
I am unable to test 4.19.0 because it is throwing the error below. nnode-docker does not get created successfully

Attaching to node-docker-1, selenium-hub
selenium-hub | 2024-03-28 13:14:33,965 INFO Included extra file "/etc/supervisor/conf.d/selenium-grid-hub.conf" during parsing
selenium-hub | 2024-03-28 13:14:33,968 INFO RPC interface 'supervisor' initialized
selenium-hub | 2024-03-28 13:14:33,968 CRIT Server 'unix_http_server' running without any HTTP authentication checking
selenium-hub | 2024-03-28 13:14:33,968 INFO supervisord started with pid 8
node-docker-1 | 2024-03-28 13:14:34,164 INFO Included extra file "/etc/supervisor/conf.d/selenium-grid-docker.conf" during parsing
node-docker-1 | 2024-03-28 13:14:34,167 INFO RPC interface 'supervisor' initialized
node-docker-1 | 2024-03-28 13:14:34,167 CRIT Server 'unix_http_server' running without any HTTP authentication checking
node-docker-1 | 2024-03-28 13:14:34,168 INFO supervisord started with pid 8
selenium-hub | 2024-03-28 13:14:34,972 INFO spawned: 'selenium-grid-hub' with pid 9
selenium-hub | Appending Selenium options: --reject-unsupported-caps false
selenium-hub | 2024-03-28 13:14:34,978 INFO success: selenium-grid-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
selenium-hub | Tracing is disabled
node-docker-1 | 2024-03-28 13:14:35,171 INFO spawned: 'socat' with pid 9
node-docker-1 | 2024-03-28 13:14:35,173 INFO spawned: 'selenium-grid-docker' with pid 10
node-docker-1 | Starting Selenium Grid Node Docker...
node-docker-1 | Appending Selenium options: --session-timeout 297 --enable-managed-downloads true
node-docker-1 | 2024-03-28 13:14:35,178 INFO success: socat entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
node-docker-1 | 2024-03-28 13:14:35,178 INFO success: selenium-grid-docker entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
node-docker-1 | Tracing is disabled
selenium-hub | 13:14:35.283 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
selenium-hub | 13:14:35.288 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
selenium-hub | 13:14:35.370 INFO [BoundZmqEventBus.] - XPUB binding to [binding to tcp://:4442, advertising as tcp://172.19.0.2:4442], XSUB binding to [binding to tcp://:4443, advertising as tcp://172.19.0.2:4443]
selenium-hub | 13:14:35.414 INFO [UnboundZmqEventBus.] - Connecting to tcp://172.19.0.2:4442 and tcp://172.19.0.2:4443
selenium-hub | 13:14:35.429 INFO [UnboundZmqEventBus.] - Sockets created
node-docker-1 | 13:14:35.490 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
node-docker-1 | 13:14:35.495 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
node-docker-1 | 13:14:35.588 INFO [UnboundZmqEventBus.] - Connecting to tcp://selenium-hub:4442 and tcp://selenium-hub:4443
node-docker-1 | 13:14:35.626 INFO [UnboundZmqEventBus.] - Sockets created
selenium-hub | 13:14:36.430 INFO [UnboundZmqEventBus.] - Event bus ready
node-docker-1 | 13:14:36.628 INFO [UnboundZmqEventBus.] - Event bus ready
node-docker-1 | 13:14:36.709 INFO [NodeServer.createHandlers] - Reporting self as: http://172.19.0.3:5555
node-docker-1 | 13:14:36.728 INFO [NodeOptions.getSessionFactories] - Detected 32 available processors
selenium-hub | 13:14:36.944 INFO [Hub.execute] - Started Selenium Hub 4.19.0 (revision 5f9cec8963): http://172.19.0.2:4444
node-docker-1 | 13:14:36.997 INFO [V141Docker.isContainerPresent] - Checking if container is present: 2b314e58dc8c
node-docker-1 | 13:14:37.094 INFO [Docker.getImage] - Obtaining image: selenium/standalone-chrome
node-docker-1 | 13:14:37.094 INFO [Docker.getImage] - Obtaining image: selenium/standalone-firefox
node-docker-1 | 13:14:37.094 INFO [Docker.getImage] - Obtaining image: selenium/standalone-edge
node-docker-1 | 13:14:37.104 INFO [V141Docker.getImage] - Listing local images: Reference{domain='docker.io', name='selenium/standalone-firefox', tag='latest', digest='null'}
node-docker-1 | 13:14:37.105 INFO [V141Docker.getImage] - Listing local images: Reference{domain='docker.io', name='selenium/standalone-edge', tag='latest', digest='null'}
node-docker-1 | 13:14:37.105 INFO [V141Docker.getImage] - Listing local images: Reference{domain='docker.io', name='selenium/standalone-chrome', tag='latest', digest='null'}
node-docker-1 | 13:14:37.117 INFO [V141Docker.getImage] - Pulling Reference{domain='docker.io', name='selenium/standalone-edge', tag='latest', digest='null'}
node-docker-1 | 13:14:37.117 INFO [V141Docker.getImage] - Pulling Reference{domain='docker.io', name='selenium/standalone-firefox', tag='latest', digest='null'}
node-docker-1 | 13:14:37.117 INFO [V141Docker.getImage] - Pulling Reference{domain='docker.io', name='selenium/standalone-chrome', tag='latest', digest='null'}
node-docker-1 | 13:14:37.118 INFO [PullImage.apply] - Pulling Reference{domain='docker.io', name='selenium/standalone-firefox', tag='latest', digest='null'}
node-docker-1 | 13:14:37.118 INFO [PullImage.apply] - Pulling Reference{domain='docker.io', name='selenium/standalone-edge', tag='latest', digest='null'}
node-docker-1 | 13:14:37.118 INFO [PullImage.apply] - Pulling Reference{domain='docker.io', name='selenium/standalone-chrome', tag='latest', digest='null'}
node-docker-1 | 13:14:37.120 ERROR [Bootstrap.runMain] - Error during execution
node-docker-1 | java.lang.reflect.InvocationTargetException
node-docker-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
node-docker-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
node-docker-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
node-docker-1 | at java.base/java.lang.reflect.Method.invoke(Unknown Source)
node-docker-1 | at org.openqa.selenium.grid.Bootstrap.runMain(Bootstrap.java:77)
node-docker-1 | at org.openqa.selenium.grid.Bootstrap.main(Bootstrap.java:70)
node-docker-1 | Caused by: org.openqa.selenium.grid.config.ConfigException: java.lang.reflect.InvocationTargetException
node-docker-1 | at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:119)
node-docker-1 | at org.openqa.selenium.grid.node.config.NodeOptions.getNode(NodeOptions.java:181)
node-docker-1 | at org.openqa.selenium.grid.node.httpd.NodeServer.createHandlers(NodeServer.java:126)
node-docker-1 | at org.openqa.selenium.grid.node.httpd.NodeServer.asServer(NodeServer.java:185)
node-docker-1 | at org.openqa.selenium.grid.node.httpd.NodeServer.execute(NodeServer.java:247)
node-docker-1 | at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$4(TemplateGridCommand.java:122)
node-docker-1 | at org.openqa.selenium.grid.Main.launch(Main.java:83)
node-docker-1 | at org.openqa.selenium.grid.Main.go(Main.java:56)
node-docker-1 | at org.openqa.selenium.grid.Main.main(Main.java:41)
node-docker-1 | ... 6 more
node-docker-1 | Caused by: java.lang.reflect.InvocationTargetException
node-docker-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
node-docker-1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
node-docker-1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
node-docker-1 | at java.base/java.lang.reflect.Method.invoke(Unknown Source)
node-docker-1 | at org.openqa.selenium.grid.config.ClassCreation.callCreateMethod(ClassCreation.java:51)
node-docker-1 | at org.openqa.selenium.grid.config.MemoizedConfig.lambda$getClass$4(MemoizedConfig.java:104)
node-docker-1 | at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
node-docker-1 | at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:99)
node-docker-1 | ... 14 more
node-docker-1 | Caused by: java.lang.IllegalArgumentException: non-positive contentLength: 0
node-docker-1 | at java.net.http/java.net.http.HttpRequest$BodyPublishers.fromPublisher(Unknown Source)
node-docker-1 | at org.openqa.selenium.remote.http.jdk.JdkHttpMessages.notChunkingBodyPublisher(JdkHttpMessages.java:124)
node-docker-1 | at org.openqa.selenium.remote.http.jdk.JdkHttpMessages.createRequest(JdkHttpMessages.java:82)
node-docker-1 | at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute0(JdkHttpClient.java:371)
node-docker-1 | at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
node-docker-1 | at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:55)
node-docker-1 | at org.openqa.selenium.remote.http.jdk.JdkHttpClient.execute(JdkHttpClient.java:352)
node-docker-1 | at org.openqa.selenium.remote.tracing.TracedHttpClient.execute(TracedHttpClient.java:54)
node-docker-1 | at org.openqa.selenium.docker.v1_41.PullImage.apply(PullImage.java:62)
node-docker-1 | at org.openqa.selenium.docker.v1_41.V141Docker.getImage(V141Docker.java:79)
node-docker-1 | at org.openqa.selenium.docker.Docker.lambda$getImage$0(Docker.java:50)
node-docker-1 | at java.base/java.util.Optional.map(Unknown Source)
node-docker-1 | at org.openqa.selenium.docker.Docker.getImage(Docker.java:50)
node-docker-1 | at org.openqa.selenium.grid.node.docker.DockerOptions.lambda$loadImages$5(DockerOptions.java:259)
node-docker-1 | at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
node-docker-1 | at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown Source)
node-docker-1 | at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
node-docker-1 | at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
node-docker-1 | at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
node-docker-1 | at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
node-docker-1 | at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
node-docker-1 | Exception in thread "Thread-0" java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.grid.node.Node.getStatus()" because "this.node" is null
node-docker-1 | at org.openqa.selenium.grid.node.httpd.NodeServer.lambda$new$0(NodeServer.java:78)
node-docker-1 | at java.base/java.lang.Thread.run(Unknown Source)
node-docker-1 | 2024-03-28 13:14:37,447 INFO exited: selenium-grid-docker (exit status 1; not expected)

@Earlopain
Copy link
Contributor

I've made a fix where I'm fairly sure that is related to this. Just to be certain, can you try running with --ulimit nofile=65536:65536 to see if that makes a difference? With compose that would be something like this:

services:
  selenium:
    ...
    ulimits:
      nofile:
        soft: 65536
        hard: 65536

@mikejohnstonPremierinc
Copy link

mikejohnstonPremierinc commented Apr 5, 2024

I've made a fix where I'm fairly sure that is related to this. Just to be certain, can you try running with --ulimit nofile=65536:65536 to see if that makes a difference? With compose that would be something like this:

services:
  selenium:
    ...
    ulimits:
      nofile:
        soft: 65536
        hard: 65536

This did not work. Below is my compose and the screenshot of Console

version: "3"
services:
  selenium-hub:
    image: selenium/hub:4.18.1
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444" 
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
      
  node-docker:
    image: selenium/node-docker:4.18.1
    volumes:
      - /share/pqafiles/assets:/opt/selenium/assets
      - /share/pqafiles/config/toml_server1.toml:/opt/bin/config.toml
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - selenium-hub 
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443      
      - SE_VNC_NO_PASSWORD=1
      - SE_OPTS=--session-timeout 297 --enable-managed-downloads true  

Errors

@Earlopain
Copy link
Contributor

@mikejohnstonPremierinc I have only used the standalone images myself and am not knowledgeable how that plays with the individual instances. Can you apply the additional config to node-docker? I'm fairly certain it would need to go there.

@mikejohnstonPremierinc
Copy link

@mikejohnstonPremierinc I have only used the standalone images myself and am not knowledgeable how that plays with the individual instances. Can you apply the additional config to node-docker? I'm fairly certain it would need to go there.

Added to node-docker. Still did not work

@matc1294
Copy link

matc1294 commented Apr 5, 2024

I'm also still having the same issue, I enabled logs to see what is going on but on the grid I have nothing other than this Apr 05, 2024 2:20:42 PM org.openqa.selenium.grid.Bootstrap createExtendedClassLoader, on the browser container I did get this

2024-04-05 14:20:43,394 INFO Included extra file "/etc/supervisor/conf.d/chrome-cleanup.conf" during parsing
2024-04-05 14:20:43,394 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2024-04-05 14:20:43,397 INFO RPC interface 'supervisor' initialized
2024-04-05 14:20:43,397 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-04-05 14:20:43,398 INFO supervisord started with pid 8
2024-04-05 14:20:44,399 INFO spawned: 'browserleftoverscleanup' with pid 9
2024-04-05 14:20:44,401 INFO spawned: 'xvfb' with pid 10
2024-04-05 14:20:44,402 INFO spawned: 'vnc' with pid 11
2024-04-05 14:20:44,404 INFO spawned: 'novnc' with pid 12
2024-04-05 14:20:44,407 INFO spawned: 'selenium-node' with pid 13
2024-04-05 14:20:44,408 INFO exited: browserleftoverscleanup (exit status 0; not expected)
2024-04-05 14:20:44,413 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Appending Selenium options: --session-timeout 300
Appending Selenium options: --heartbeat-period 30
Generating Selenium Config
Configuring server...
Setting up SE_NODE_HOST...
Setting up SE_NODE_PORT...
Setting up SE_NODE_GRID_URL...
Tracing is disabled
Selenium Grid Node configuration: 
[events]
publish = "tcp://selenium-hub:4442"
subscribe = "tcp://selenium-hub:4443"
[node]
session-timeout = "300"
override-max-sessions = false
detect-drivers = false
drain-after-session-count = 50
max-sessions = 1
[[node.driver-configuration]]
display-name = "chrome"
stereotype = '{"browserName": "chrome", "browserVersion": "123.0", "platformName": "Linux", "goog:chromeOptions": {"binary": "/usr/bin/google-chrome"}}'
max-sessions = 1
Starting Selenium Grid Node...
14:20:45.169 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
14:20:45.176 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
14:20:45.287 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://selenium-hub:4442 and tcp://selenium-hub:4443
14:20:45.332 INFO [UnboundZmqEventBus.<init>] - Sockets created
2024-04-05 14:20:45,442 INFO spawned: 'browserleftoverscleanup' with pid 129
2024-04-05 14:20:45,443 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-05 14:20:45,443 INFO success: vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-05 14:20:45,443 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-04-05 14:20:45,451 INFO exited: browserleftoverscleanup (exit status 0; not expected)
14:20:46.334 INFO [UnboundZmqEventBus.<init>] - Event bus ready
14:20:46.430 INFO [NodeServer.createHandlers] - Reporting self as: http://10.5.0.10:5555
14:20:46.448 INFO [NodeOptions.getSessionFactories] - Detected 192 available processors
14:20:46.491 INFO [NodeOptions.report] - Adding chrome for {"browserName": "chrome","browserVersion": "123.0","goog:chromeOptions": {"binary": "\u002fusr\u002fbin\u002fgoogle-chrome"},"platformName": "linux","se:noVncPort": 7900,"se:vncEnabled": true} 1 times
14:20:46.524 INFO [Node.<init>] - Binding additional locator mechanisms: relative
14:20:46.737 INFO [NodeServer$1.start] - Starting registration process for Node http://10.5.0.10:5555
14:20:46.738 INFO [NodeServer.execute] - Started Selenium node 4.19.0 (revision 5f9cec8963): http://10.5.0.10:5555
14:20:46.750 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
14:20:47.253 INFO [NodeServer.lambda$createHandlers$2] - Node has been added
2024-04-05 14:20:48,256 INFO spawned: 'browserleftoverscleanup' with pid 184
2024-04-05 14:20:48,262 INFO exited: browserleftoverscleanup (exit status 0; not expected)
2024-04-05 14:20:51,268 INFO spawned: 'browserleftoverscleanup' with pid 185
2024-04-05 14:20:51,274 INFO exited: browserleftoverscleanup (exit status 0; not expected)
2024-04-05 14:20:52,276 INFO gave up: browserleftoverscleanup entered FATAL state, too many start retries too quickly
14:20:56.107 INFO [LocalNode.newSession] - Session created by the Node. Id: 48b6b21e3e9af52ad5ad0161b38d06a5, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 123.0.6312.86, chrome: {chromedriverVersion: 123.0.6312.86 (9b72c47a0536..., userDataDir: /var/tmp/.org.chromium.Chro...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:9222}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, se:bidiEnabled: false, se:cdp: ws://10.5.0.10:4444/session..., se:cdpVersion: 123.0.6312.86, se:initiator: Terminal, se:vnc: ws://10.5.0.10:4444/session..., se:vncEnabled: true, se:vncLocalAddress: ws://10.5.0.10:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
14:21:05.812 INFO [ProxyNodeWebsockets.createWsEndPoint] - Establishing connection to ws://10.5.0.10:7900
14:22:34.751 INFO [SessionSlot.stop] - Stopping session 48b6b21e3e9af52ad5ad0161b38d06a5

I also tried adding the ulimit but it didn't work either, although it did help with responsiveness on getting a new session
This is my compose for the hub:

version: "3.7"
services:
  chrome:
    image: selenium/node-chrome:123.0
    volumes:
      - /dev/shm:/dev/shm
      - type: tmpfs
        target: /var/tmp
        tmpfs:
          mode: 01777
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_DRAIN_AFTER_SESSION_COUNT=50
      - VNC_NO_PASSWORD=1
      - TMPDIR=/var/tmp
      - SE_JAVA_OPTS=-XX:-UsePerfData
    dns:
      - 1.1.1.1
      - 9.9.9.9
    networks:
      - selenium-test
    deploy: 
      replicas: 2
      resources:
        limits:
          memory: 2G
  selenium-hub:
    image: selenium/hub:4.19.1
    volumes:
      - /dev/shm:/dev/shm
      - type: tmpfs
        target: /tmp
    dns:
      - 1.1.1.1
      - 9.9.9.9
    ports:
      - "3442:4442"
      - "3443:4443"
      - "3444:4444"
    networks:
      - selenium-test
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
networks:
  selenium-test:
    external: true

The network I created was done with this command docker network create --subnet=10.5.0.0/16 --attachable --driver overlay

On the console tab I do get something new, screenshot:
Network_tab

and for the network tab I still get the same thing, the VNC connection is stuck in changing the protocols (HTTP 101) screenshot:
Console

@Earlopain
Copy link
Contributor

@VietND96 would you mind reopening? The attached PR should not have closed this.

@VietND96
Copy link
Member

I think will let reporter verify and reopen it if they have the same experience in the latest image tag 4.20.0-20240425

@kristaps-aksjonovs
Copy link
Author

I checked with provided version and didn't had any issues.
Thank you.

@matc1294
Copy link

matc1294 commented Apr 25, 2024

I just tested and the fixes appear to work for me, I upgraded my stacks and everything is fine.

If it helps this is the docker compose that worked for me. The only note that I have is that I'm running this on x86_64, so not sure if it will work on Apple's M class processors

version: "3.7"
services:
  chrome:
    image: selenium/node-chrome:124.0
    volumes:
      - /dev/shm:/dev/shm
      - type: tmpfs
        target: /var/tmp
        tmpfs:
          mode: 01777
    depends_on:
      - selenium-hub
    environment:
      - SE_OPTS=--log-level OFF --enable-managed-downloads true
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_DRAIN_AFTER_SESSION_COUNT=50
      - VNC_NO_PASSWORD=1
      - TMPDIR=/var/tmp
      - SE_JAVA_OPTS=-XX:-UsePerfData
    dns:
      - 1.1.1.1
      - 9.9.9.9
    networks:
      - selenium-test
    deploy: 
      replicas: 2
      resources:
        limits:
          memory: 2G

  selenium-hub:
    image: selenium/hub:4.20
    volumes:
      - /dev/shm:/dev/shm
      - type: tmpfs
        target: /tmp
    environment:
      - SE_OPTS=--log-level OFF
    dns:
      - 1.1.1.1
      - 9.9.9.9
    ports:
      - "3442:4442"
      - "3443:4443"
      - "3444:4444"
    networks:
      - traefik-public
      - selenium-test
networks:
  selenium-test:
    external: true
  traefik-public:
    external: true

@mikejohnstonPremierinc
Copy link

I apologize. It actually IS fixed for me now with version 4.20. I have deleted my posts above about it not being fixed in 4.20.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants