appium icon indicating copy to clipboard operation
appium copied to clipboard

"Grid registration error: Cannot find proxy with ID =http://0.0.0.0:4723 in the registry."

Open codedgeass opened this issue 10 years ago • 7 comments

The problem

I had my tests on an iOS 10 device up and running until I started getting a connection error. It seems that the Appium node is able to register but the Selenium Hub cannot find it and forward traffic to it. I made minimal node configuration changes and am unsure how this error has been introduced.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.0
  • Last Appium version that did not exhibit the issue (if applicable): 1.6.0
  • Desktop OS/version used to run Appium: Mac 10.11.6
  • Node.js version (unless using Appium.app|exe): 6.9.1
  • Mobile platform/version under test: iOS 10.0.2
  • Real device or emulator/simulator: Real
  • Appium CLI or Appium.app|exe: CLI

Details

Appium

[debug] [Appium] Grid registration error: Cannot find proxy with ID =http://0.0.0.0:4723 in the registry. [debug] [Appium] Appium successfully registered with the grid on localhost:4444

Java

org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Connect to 0.0.0.0:4723 [/0.0.0.0] failed: Operation timed out

Grid Console

This is the proxy name:

BaseRemoteProxy unknown version,Connect to 0.0.0.0:4723 [/0.0.0.0] failed: Operation timed out

Selenium Hub

15:05:03.794 INFO [1] org.openqa.grid.selenium.GridLauncher - Selenium Grid hub is up and running 15:05:05.067 INFO [24] org.openqa.grid.internal.Registry - Registered a node http://0.0.0.0:4723 15:05:08.605 INFO [26] org.openqa.grid.internal.Registry - Registered a node http://10.10.210.167:5555 15:05:22.799 INFO [19] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{proxy={proxyAutoconfigUrl=null, autodetect=false, socksUsername=null, socksPassword=null, httpProxy=, proxyType=MANUAL, noProxy=null, ftpProxy=, socksProxy=null, hCode=166794956, class=org.openqa.selenium.Proxy, sslProxy=}, automationName=XCUITest, browserName=Safari, udid=, platformName=iOS, deviceName=}] 15:05:22.800 INFO [11] org.openqa.grid.internal.ProxySet - Available nodes: [http://0.0.0.0:4723, http://10.10.210.167:5555] 15:05:22.800 INFO [11] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node http://0.0.0.0:4723 15:05:22.800 INFO [11] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {newCommandTimeout=60, automationName=XCUITest, browserName=Safari, xcodeConfigFile=, maxInstances=2, udid=, platformName=iOS, deviceName=}

Sometimes I will see this after the above output:

15:13:45.879 INFO [18] org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://0.0.0.0:4723: Host is down 15:13:45.879 INFO [18] org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://0.0.0.0:4723 15:13:45.880 INFO [18] org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://0.0.0.0:4723: Host is down 15:13:45.880 INFO [18] org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://0.0.0.0:4723 15:13:45.881 INFO [18] org.apache.http.impl.execchain.RetryExec - I/O exception (java.net.SocketException) caught when processing request to {}->http://0.0.0.0:4723: Host is down 15:13:45.881 INFO [18] org.apache.http.impl.execchain.RetryExec - Retrying request to {}->http://0.0.0.0:4723

Node Config JSON

{ "capabilities": [ { "browserName": "Safari", "deviceName": "", "newCommandTimeout": 60, "maxInstances": 2, "udid": "", "platformName": "iOS", "automationName": "XCUITest", "xcodeConfigFile": "" } ], "configuration": { "cleanUpCycle": 2000, "timeout": 30000, "browserTimeout": 60000, "maxSession": 2, "register": true, "registerCycle": 5000, "hubPort": 4444, "hubHost": "localhost" } }

codedgeass avatar Nov 08 '16 21:11 codedgeass

Try Appium 1.6.1beta. I saw that some problems with Selenum Grid compatibility have been addressed there.

mykola-mokhnach avatar Nov 08 '16 21:11 mykola-mokhnach

@codedgeass Have you done it previous appium version ? If 'Yes' then obviously version related issue , but If 'No' then check this link, It will help you to know the process and code.

Ref: https://github.com/Tanmoyray/AppiumParallelExecutionSample

Tanmoyray avatar Nov 09 '16 11:11 Tanmoyray

Grid registration error: Cannot find proxy with ID =http://192.168.227.134:4724 in the registry.

Am on Appium -version - 1.6.4

This is from server log

10:49:10.919 INFO - Unregistering the node http://192.168.227.134:4724 because it's been down for 60060 milliseconds 10:49:10.919 WARN - Cleaning up stale test sessions on the unregistered node http://192.168.227.134:4724 10:49:15.896 INFO - Registered a node http://192.168.227.134:4724 10:49:25.906 INFO - Marking the node http://192.168.227.134:4724 as down: cannot reach the node for 2 tries

thats my Json file

{ "capabilities": [ { "browserName": "Galaxy S6", "version":"6.0.1", "maxInstances": 1, "platform":"ANDROID", "deviceName": "1215fcd81beb2f04" } ], "configuration": { "cleanUpCycle":2000, "timeout":30000, "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "url":"http://192.168.227.134:4724/wd/hub", "host": "192.168.227.134", "port": 4724, "maxSession": 1, "register": true, "registerCycle": 5000, "hubPort": 4444, "hubHost":"192.168.227.134" }

skhanam avatar May 19 '17 09:05 skhanam

Is this still an issue?

dpgraham avatar Jul 19 '17 21:07 dpgraham

I've moved on from Selenium Grid. This can be closed.

codedgeass avatar Jul 19 '17 21:07 codedgeass

Getting this error in v1.8.1. Also even when the port number is specified, appium starts at default port 4723.

Appium log:

C:\Users\x>appium --nodeconfig D:\x\Eclipse_Workspace\emulatornode.json [Appium] Welcome to Appium v1.8.1 [Appium] Non-default server args: [Appium] nodeconfig: D:\x\Eclipse_Workspace\emulatornode.json [debug] [Appium] Starting auto register thread for grid. Will try to register every 5000 ms. [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [debug] [Appium] Appium successfully registered with the grid on http://127.0.0.1:4444 [debug] [Appium] Grid registration error: Cannot find proxy with ID =http://127.0.0.1:4728 in the registry. [debug] [Appium] Appium successfully registered with the grid on http://127.0.0.1:4444 [debug] [Appium] Grid registration error: Cannot find proxy with ID =http://127.0.0.1:4728 in the registry. [debug] [Appium] Appium successfully registered with the grid on http://127.0.0.1:4444

Selenium standalone server logs

C:\Users\x\Downloads>java -jar selenium-server-standalone-3.12.0.jar -role hub INFO [GridLauncherV3.launch] - Selenium build info: version: '3.12.0', revision: '7c6e0b3' INFO [GridLauncherV3$2.launch] - Launching Selenium Grid hub on port 4444 INFO::main: Logging initialized @782ms to org.seleniumhq.jetty9.util.log.StdErrLog [Hub.start] - Selenium Grid hub is up and running INFO [Hub.start] - Nodes should register to http://172.22.237.81:4444/grid/register/ INFO [Hub.start] - Clients should connect to http://172.22.237.81:4444/wd/hub

JSON File

{ "capabilities": [{ "deviceName": "emulator-5554", "version": "8.1", "maxInstances": 3, "platform": "ANDROID" }], "configuration": { "cleanUpCycle": 2000, "timeout": 30000, "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "url": "http://127.0.0.1:4728/wd/hub", "host": "127.0.0.1", "port": 4728, "maxSession": 1, "register": true, "registerCycle": 5000, "hubPort": 4444, "hubHost": "127.0.0.1",

	"hub": "127.0.0.1:4444/grid/register"
}

}

Gocoollnath avatar Jun 22 '18 11:06 Gocoollnath

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

lock[bot] avatar Jun 22 '19 12:06 lock[bot]