selenium: [🐛 Bug]: Node can't connect to Grid hub from version 4.14.0 (Error checking service status http://localhost:4723/status)
What happened?
From version 4.14.0 node can’t connect to hub ( checked on 4.10, 4.13 ,4.14.0, 4.14.1, 4.16.1, selenium-server-4.17.0-SNAPSHOT). it works on 4.13 and below.
from browser run link “http://localhost:4723/status”- {“value”:{“ready”:true,“message”:“The server is ready to accept new connections”,“build”:{“version”:“2.4.1”}}}
node window result: .@ Grid % java -jar selenium-server-4.16.1.jar node --config node4.toml 15:48:48.216 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding 15:48:48.220 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing 15:48:48.268 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://0.0.0.0:4442 and tcp://0.0.0.0:4443 15:48:48.289 INFO [UnboundZmqEventBus.<init>] - Sockets created 15:48:49.295 INFO [UnboundZmqEventBus.<init>] - Event bus ready 15:48:49.393 INFO [NodeServer.createHandlers] - Reporting self as: http://192.168.1.144:5557 15:48:49.403 INFO [NodeOptions.getSessionFactories] - Detected 10 available processors 15:48:49.411 INFO [RelayOptions.getSessionFactories] - Adding relay configs for http://localhost:4723 15:48:49.415 INFO [RelayOptions.lambda$getSessionFactories$1] - Mapping Capabilities {appium:automationName: UiAutomator2, appium:deviceName: Pixar 5а, appium:platformVersion: 13, platformName: ANDROID}, 1 times 15:48:49.415 INFO [RelayOptions.lambda$getSessionFactories$1] - Mapping Capabilities {appium:automationName: UiAutomator2, appium:deviceName: Pixar 4, appium:platformVersion: 13, platformName: ANDROID}, 1 times 15:48:49.437 INFO [Node.<init>] - Binding additional locator mechanisms: relative 15:48:49.509 INFO [NodeServer$1.start] - Starting registration process for Node http://192.168.1.144:5557 15:48:49.510 INFO [NodeServer.execute] - Started Selenium node 4.16.1 (revision 9b4c83354e): http://192.168.1.144:5557 15:48:49.620 WARN [RelaySessionFactory.isServiceUp] - Error checking service status http://localhost:4723/status. java.io.IOException: HTTP/1.1 header parser received no bytes 15:48:49.621 ERROR [NodeServer$1.lambda$start$1] - Node is not alive: http://192.168.1.144:5557 is DOWN
How can we reproduce the issue?
java version "21.0.2" (same with "20.0.2")
grid - 4.16.1 (also checked selenium-server-4.17.0-SNAPSHOT, and 4.15)
Appium v2.4.1
1. Run hub "sudo java -jar selenium-server-4.16.1.jar hub"
2. Run node "java -jar selenium-server-4.16.1.jar node --config node4.toml"
# node4.toml
[server]
port = 5557
[node]
detect-drivers = false
[relay]
# Default Appium/Cloud server endpoint
url = "http://localhost:4723"
status-endpoint = "/status"
configs = ["1", "{\"platformName\": \"Android\", \"appium:platformVersion\": \"13\", \"appium:deviceName\": \"Pixar 5а\", \"appium:automationName\": \"UiAutomator2\"}",
"1", "{\"platformName\": \"Android\", \"appium:platformVersion\": \"13\", \"appium:deviceName\": \"Pixar 4\", \"appium:automationName\": \"UiAutomator2\"}"]
Relevant log output
____._____@_________ Grid % java -jar selenium-server-4.16.1.jar node --config node4.toml
15:48:48.216 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
15:48:48.220 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
15:48:48.268 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://0.0.0.0:4442 and tcp://0.0.0.0:4443
15:48:48.289 INFO [UnboundZmqEventBus.<init>] - Sockets created
15:48:49.295 INFO [UnboundZmqEventBus.<init>] - Event bus ready
15:48:49.393 INFO [NodeServer.createHandlers] - Reporting self as: http://192.168.1.144:5557
15:48:49.403 INFO [NodeOptions.getSessionFactories] - Detected 10 available processors
15:48:49.411 INFO [RelayOptions.getSessionFactories] - Adding relay configs for http://localhost:4723
15:48:49.415 INFO [RelayOptions.lambda$getSessionFactories$1] - Mapping Capabilities {appium:automationName: UiAutomator2, appium:deviceName: Pixar 5а, appium:platformVersion: 13, platformName: ANDROID}, 1 times
15:48:49.415 INFO [RelayOptions.lambda$getSessionFactories$1] - Mapping Capabilities {appium:automationName: UiAutomator2, appium:deviceName: Pixar 4, appium:platformVersion: 13, platformName: ANDROID}, 1 times
15:48:49.437 INFO [Node.<init>] - Binding additional locator mechanisms: relative
15:48:49.509 INFO [NodeServer$1.start] - Starting registration process for Node http://192.168.1.144:5557
15:48:49.510 INFO [NodeServer.execute] - Started Selenium node 4.16.1 (revision 9b4c83354e): http://192.168.1.144:5557
15:48:49.620 WARN [RelaySessionFactory.isServiceUp] - Error checking service status http://localhost:4723/status. java.io.IOException: HTTP/1.1 header parser received no bytes
15:48:49.621 ERROR [NodeServer$1.lambda$start$1] - Node is not alive: http://192.168.1.144:5557 is DOWN
Operating System
Mac os 14.2.1
Selenium version
4.16.1
What are the browser(s) and version(s) where you see this issue?
appium
What are the browser driver(s) and version(s) where you see this issue?
2.4.1
Are you using Selenium Grid?
4.16.1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 41 (13 by maintainers)
We have no timeline for this, as this issue currently stands in a low-priority area. If you wish to help, please feel free to comment on your approach, and we will help you when you send a PR. Thanks!
Sorry for bringing this up again. But has anyone tried to actually run a test against this? Adding “protocol-version” worked for adding a relay node, but the same error happened again when running a test against it. I tried this out in v4.20.0, btw.
Looks like the same code that create client in isServiceUp() is needed in the apply() function above too. I can try to take care of this and make a pr.
@alokkr016, Hi, unfortunately, the PR hasn’t merged yet, so the nightly Selenium node 4.21.0-SNAPSHOT (revision https://github.com/SeleniumHQ/selenium/commit/8723d04809f60fffeb15e7a366b43205b3ec7416) won’t work. Till the PR status changes to merge, you can try this jar is built from my fork for the preview.
I made the change and set up a test to verify server jar, it works. Refer to #13880 Once the PR is merged, via Nightly, you can download and try further.
Via PR #13849, I have tried to add a config to enforce the protocol version in HttpClient config used in relay. TOML config looks like
A quick test looks like
Also running into this issue. Running selenium 4.16.1, openjdk 21.0.1. Also tried running the relay server on a different machine same error as OP.
18:00:50.851 WARN [RelaySessionFactory.isServiceUp] - Error checking service status http://(host_name):11000/status. java.io.IOException: HTTP/1.1 header parser received no bytes 18:00:51.824 WARN [RelaySessionFactory.isServiceUp] - Error checking service status http://(host_name):11000/status. java.io.IOException: HTTP/1.1 header parser received no bytes
EDIT: Downgrading to selenium 4.13.0 fixed the problem like OP suggested (Only downgraded the relay server, the hub still running 4.16.1).
I think I have seen a similar issue with a relay node in between Appium and a Grid Hub, the
/statuscheck fails despite all hosted endpoints being reachable with other HTTP tools. I asked the User Group about this, that thread has a few common details to the above reports: https://groups.google.com/g/selenium-users/c/WZB5G6hbug0/m/33OP2JTIAAAJ@VitaliiPivtorak im getting same issue by using 4.13 version also.
I have checked new version 4.17.0, and replace localhost with ip address in toml file problem the same: @ Grid % java -jar selenium-server-4.17.0.jar node --config node4.toml 12:58:58.609 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding 12:58:58.612 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing 12:58:58.663 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://0.0.0.0:4442 and tcp://0.0.0.0:4443 12:58:58.682 INFO [UnboundZmqEventBus.<init>] - Sockets created 12:58:59.684 INFO [UnboundZmqEventBus.<init>] - Event bus ready 12:58:59.779 INFO [NodeServer.createHandlers] - Reporting self as: http://192.168.1.144:5557 12:58:59.788 INFO [NodeOptions.getSessionFactories] - Detected 10 available processors 12:58:59.798 INFO [RelayOptions.getSessionFactories] - Adding relay configs for http://192.168.1.144:4723 12:58:59.801 INFO [RelayOptions.lambda$getSessionFactories$1] - Mapping Capabilities {appium:automationName: UiAutomator2, appium:deviceName: Pixar 5а, appium:platformVersion: 13, platformName: ANDROID}, 1 times 12:58:59.801 INFO [RelayOptions.lambda$getSessionFactories$1] - Mapping Capabilities {appium:automationName: UiAutomator2, appium:deviceName: Pixar 4, appium:platformVersion: 13, platformName: ANDROID}, 1 times 12:58:59.822 INFO [Node.<init>] - Binding additional locator mechanisms: relative 12:58:59.890 INFO [NodeServer$1.start] - Starting registration process for Node http://192.168.1.144:5557 12:58:59.891 INFO [NodeServer.execute] - Started Selenium node 4.17.0 (revision e52b1be057*): http://192.168.1.144:5557 12:58:59.995 WARN [RelaySessionFactory.isServiceUp] - Error checking service status http://192.168.1.144:4723/status. java.io.IOException: HTTP/1.1 header parser received no bytes 12:58:59.996 ERROR [NodeServer$1.lambda$start$1] - Node is not alive: http://192.168.1.144:5557 is DOWN
I am running hub and node on same Mac and use url = “http://localhost:4723” in toml file. Without any changes it works on version 4.13.0