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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: issue 9586 - still happening - version 4.20.0 - Unable to register node to OpenShift hub #13958

Open
e-dsouza opened this issue May 17, 2024 · 10 comments
Labels
C-grid I-defect I-issue-template Applied to issues not following the template, or missing information.

Comments

@e-dsouza
Copy link

What happened?

Unable to register node - hub in OCP pod, Node on windows server - image used - 4.20.0-20240505

Command run to register node:

java -jar selenium-server-4.20.0.jar node --publish-events tcp://publish-events-xxx-xxx.apps.ocp4- xxx.xxxint.net:443--subscribe-events tcp://subscribe-events-xxx-xxx.apps.ocp4-xxx.xxxint.net:443

Stuck at INFO [NodeServer$1.lambda$start$1] - Sending registration event no info on Hub OCP Pod log

when you try curl on publish event OCP route, pointed to hub port 4442

C:>curl-i https://publish-events-xxx-xxx.apps.ocp4-xxx.xxxint.net

HTTP/1.1 502 Bad Gateway

content-length: 107

cache-control: no-cache

content-type: text/html

Set-Cookie: BIGipServerwildcard-apps-ocp4-xx-443=!N/xx+xx; path=/; Httponly; Secure

502 Bad Gateway

The server returned an invalid or incomplete response.

Curl within OCP hub Pod:

$ curl localhost:4444 -verbose

*Trying 127.0.0.1:4444...

*Connected to localhost (127.0.0.1) port 4444 (#0)

GET/HTTP/1.1

Host: localhost:4444

User-Agent: curl/7.81.0

Accept: /

Mark bundle as not supporting multiuse

<HTTP/1.1 302 Found

<content-length:0

<Location: /ui/
<
*Connection #0 to host localhost left intact

$ curl localhost:4442 -verbose

  • Trying 127.0.0.1:4442...

  • Connected to localhost (127.0.0.1) port 4442 (#0)

GET/HTTP/1.1

Host: localhost:4442

User-Agent: curl/7.81.0

Accept: /

Received HTTP/0.9 when not allowed

  • Closing connection 0

<

curl: (1) Received HTTP/0.9 when not allowed

$ curl localhost:4443-verbose Trying 127.0.0.1:4443...

  • Connected to localhost (127.0.0.1) port 4443 (#0)

GET/HTTP/1.1

Host: localhost:4443

User-Agent: curl/7.81.0

Accept: /

Received HTTP/0.9 when not allowed**

Closing connection 0

curl: (1) Received HTTP/0.9 when not allowed

How can we reproduce the issue?

Info provided above. same issue as this - https://github.com/SeleniumHQ/selenium/issues/9586 , 502 Bad Gatway

Relevant log output

C:\Users\Public\Selenium Grid>java -jar selenium-server-4.20.0.jar node-publish-events tcp://publish- events-xxx-xxx.apps.ocp4-xxx.xxxint.net:443-subscribe-events tcp://subscribe-events-xxx- xxxx.apps.ocp4-xxx.xxxint.net:443

10:35:33.398 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding

10:35:33.415 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing

10:35:33.827 INFO [UnboundZmqEventBus.<init>]-Connecting to tcp://publish-events-xxx-

xxx.apps.ocp4-xxx.xxxint.net:443 and tcp://subscribe-events-xxx-xxx.apps.ocp4-xxx.xxxint.net:443

10:35:33.976 INFO [UnboundZmqEventBus.<init>] - Sockets created

10:35:34.990 INFO [UnboundZmqEventBus.<init>] - Event bus ready

10:35:35.242 INFO [NodeServer.createHandlers] - Reporting self as: http://xx.xx.xx.xx:5555

10:35:35.460 INFO [NodeOptions.getSessionFactories] Detected 2 available processors

10:35:35.476 INFO [NodeOptions.discoverDrivers] - Looking for existing drivers on the PATH.

10:35:35.476 INFO [NodeOptions.discover Drivers) - Add-selenium-manager true' to the startup command to setup drivers automatically.

10:35:37.273 WARN [SeleniumManager.lambda$runCommand$1] - Unable to discover proper chromedriver version in offline mode

10:35:39.601 WARN [SeleniumManager.lambda艦runCommand$1] - Exception managing Microsoft Edge:

Unable to discover proper msedgedriver version in offline mode

10:35:39.601 WARN [SeleniumManager.lambdaSrunCommand$1] The msedgedriver version (112.0.1722.11) detected in PATH at C:\Users\Public\Selenium Grid\msedgedriver.exe might not be

compatible with the detected Microsoft Edge version (124.0.2478.105); currently, msedgedriver is recommended for Microsoft Edge 124.*, so it is advised to delete the driver in PATH and retry

10:35:41.650 WARN [SeleniumManager.lambda$runCommand$1] - Unable to discover proper

geckodriver version in offline mode 10:35:43.227 WARN [SeleniumManager.lambda$runCommand$1] - Unable to discover proper IEDriver Server version in offline mode

10:35:43.545 INFO [NodeOptions.report] - Adding Edge for ("browserName":

"MicrosoftEdge", "platformName": "Windows XP"} 2 times

10:35:43.758 INFO [Node.<init>]-Binding additional locator mechanisms: relative

10:35:44.368 INFO [NodeServer$1.start]-Starting registration process for Node http://xxx.xx.xxx.xxx:5555

10:35:44.377 INFO [NodeServer.execute) - Started Selenium node 4.20.0 (revision 866c76ca80):

http://xxx.xxx.xx.xx:5555

10:35:44.399 INFO [NodeServer$1.lambda$start$1]-Sending registration event...

10:35:54.448 INFO [NodeServer$1.lambda$start$1] - Sending registration event...

Operating System

Windows 2022 server, Linux (OCP pod -hub)

Selenium version

4.20.0

What are the browser(s) and version(s) where you see this issue?

N/A

What are the browser driver(s) and version(s) where you see this issue?

N/A

Are you using Selenium Grid?

4.20.0-20240505

Copy link

@e-dsouza, 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!

@pujagani pujagani added the I-issue-template Applied to issues not following the template, or missing information. label May 17, 2024
Copy link

Hi, @e-dsouza.
Please follow the issue template, we need more information to reproduce the issue.

Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue.

Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough.

Reply to this issue when all information is provided, thank you.

@e-dsouza
Copy link
Author

e-dsouza commented May 17, 2024

@pujagani Thanks for your response.

This is the command I ran to register node to hub
java -jar selenium-server-4.20.0.jar node --publish-events tcp://publish-events-xxx-xxx.apps.ocp4-xxx.xxxint.net:443 --subscribe-events tcp://subscribe-events-xxx- xxxx.apps.ocp4-xxx.xxxint.net:443

I do not have any github repo/code, I am trying to setup Grid. Hub is running as Openshift Pod. Now trying to add windows server 2022 as node

my issue is exactly same as issue 9586

Thanks for your time.

@diemol
Copy link
Member

diemol commented May 17, 2024

You should run the Hub and the Nodes in debug mode to understand missing information. The Node sends a message through the event bus, so you need to see that message incoming and being read by the Hub. Then, the Hub will make an HTTP call to the Node to confirm its existence.

This issue happens when network permissions are not properly set, which ends up as HTTP/1.1 502 Bad Gateway

@e-dsouza
Copy link
Author

Okay, I'll have to check OCP team, I believe, how to run container in debug mode.

My guess is that the OCP route isnt getting right response from hub so it is giving 502 Bad gatway error, see below when I do curl within the OCP Pod.

$ curl localhost:4442 -verbose
Trying 127.0.0.1:4442...
Connected to localhost (127.0.0.1) port 4442 (#0)
GET/HTTP/1.1
Host: localhost:4442
User-Agent: curl/7.81.0
Accept: /
Received HTTP/0.9 when not allowed

@KrzysztofC were you able to resolve this?

@diemol
Copy link
Member

diemol commented May 17, 2024

The Hub does not reply with 5xx, it should be layer you have on top of it.

@e-dsouza
Copy link
Author

Okay. it doesnt give 5xx but should it not give valid one? again I am just guessing 000 converted to 502 by route

$ curl -o /dev/null -s -w "%{http.code}\n" localhost:4442
000
$ curl -o/dev/null -s -w "%{http code}\n" localhost:4444
302
$ curl -o /dev/null -s -w "%{http_code}\n" localhost:4443
000

@diemol
Copy link
Member

diemol commented May 17, 2024

4442 and 4443 are TCP, not HTTP.

@e-dsouza
Copy link
Author

Okay, I may need to check OCP route?

My command is doing TCP using route url

java -jar selenium-server-4.20.0.jar node --publish-events tcp://publish-events-xxxx-xxxx.apps.ocp4-

xxx.xxxint.net:443 --subscribe-events tcp://subscribe-events-xxx-xxxx.apps.ocp4-xxxx.xxxint.net:443

@e-dsouza
Copy link
Author

This isn't resolved yet. I'm still working with OCP admin team to assist with 502 gateway error. So far no positive outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-grid I-defect I-issue-template Applied to issues not following the template, or missing information.
Projects
None yet
Development

No branches or pull requests

3 participants