I’m trying to connect my appium node to selenium hub
Step 1 i start the server for the hub and works fine
java -jar selenium-server-4.17.0.jar hub
Step 2 I start the appium server and get the error
appium server --nodeconfig C:\path\to\node1.json --base-path=/wd/hub
The error :
[Appium] An attempt to register with the grid was unsuccessful: Request failed with status code 404
[Appium] Hub down or not responding: Request failed with status code 404
Config File :
{
“capabilities”:
[
{
“browserName”: “Android”,
“version”:“12.0”,
“maxInstances”: 1,
“platform”:“Android”,
“automationName”: “UiAutomator2”,
“deviceName”: “emulator-5554”
}
],
“configuration”:
{
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“maxSession”: 2,
“url”:“http://127.0.0.1:4723/wd/hub ”,
“host” : “localhost”,
“port”: 4723,
“register”: true,
“registerCycle”: 5000,
“hubPort”: 4444,
“hubHost”: “localhost”,
“nodeStatusCheckTimeout”: 5000
}
}
Any help will be appreciated
wreed
March 12, 2024, 2:27am
2
Have you read the instructions on how to do this?
From your description you are starting ‘hub’ first, which should be last.
Then you start appium server, which should be first.
You never start the nodes, which should be second.
It seems like a closer reading of the documentation would get you up and running.
I tried that and tried it in the same order as listed, but i still get this error where its failing to connect to the appium server i believe.
Error checking service status http://localhost:4723/status . java.io.IOException: HTTP/1.1 header parser received no bytes
03:05:46.202 ERROR [NodeServer$1.lambda$start$1] - Node is not alive: http://MYIP:5565 is DOWN
I’ve tried the configuration format listed in the documentation as well but still getting this error any help would be appreciated.
This is all running on the same machine.
Looks like this was a bug, downgraded to version 4.13.0 for the jar file and its able to work now.
opened 01:59PM - 22 Jan 24 UTC
C-grid
I-defect
### 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?
```shell
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
```shell
____._____@_________ 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
1 Like