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]: I encountered a 504 error while using Selenium Grid with JavaScript. #2158

Open
spartacus0816 opened this issue Mar 4, 2024 · 8 comments

Comments

@spartacus0816
Copy link

What happened?

I am developing an Automation System using Selenium Grid with JavaScript. I utilized Docker containers for the Selenium Grid.
Screenshot 2024-03-04 164709
There were 4 nodes.
Screenshot 2024-03-04 164854
I deployed a Node.js server on a remote Ubuntu server.
Screenshot 2024-03-04 165028
I tested it with postman.
Screenshot 2024-03-04 165116
But I could not get the response. The response will be HTML documentation.
Please help me.
Here is my code snipet.
Screenshot 2024-03-04 165231
Screenshot 2024-03-04 165252

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

sudo docker container restart selenium-chrome-1
sudo docker container restart selenium-chrome-2

Relevant log output

at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
errno: -110,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.18.0.3',
port: 4444

Operating System

Linux

Docker Selenium version (image tag)

4.18.1

Selenium Grid chart version (chart version)

No response

Copy link

github-actions bot commented Mar 4, 2024

@superdev0816, 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!

@spartacus0816
Copy link
Author

Thank for your consideration.

@diemol
Copy link
Member

diemol commented Mar 4, 2024

What is expected from this issue? Actually, what is the problem? Your NodeJS server returns that 504.

@spartacus0816
Copy link
Author

I tested it in local machine. But it worked well.
But there was an issue when I connected remoteDriver.

@diemol
Copy link
Member

diemol commented Mar 4, 2024

What issue? It is complicated to help when not enough details are shared.

@spartacus0816
Copy link
Author

Ok, no problem.
Here is my code:
driver = await new Builder() .forBrowser("chrome") .setChromeOptions(options) .withCapabilities(Capabilities.chrome()) .usingServer(remoteWebDriver) .build();
In above code, it worked well when I comment the .usingServer function.

Copy link

github-actions bot commented Mar 4, 2024

Hi, @spartacus0816.
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.

@diemol
Copy link
Member

diemol commented Mar 4, 2024

I am using that code alone, and I am able to create a session using Selenium Grid. I am not sure what you plan to do with your app, but it seems to be out of the scope of what can be called an issue in Selenium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants