aerokube / ggr

A lightweight load balancer used to create big Selenium clusters
https://aerokube.com/ggr/latest/
Apache License 2.0
314 stars 74 forks source link

selenoid is not able o connect to ggr with docker compose #308

Closed Minion0313 closed 4 years ago

Minion0313 commented 4 years ago

@vania-pooh I am getting session not created issue when i am trying run the tests using ggr with selenoid (with docker compose) Apr 06, 2020 11:42:42 AM org.openqa.selenium.remote.DesiredCapabilities chrome INFO: Using new ChromeOptions() is preferred to DesiredCapabilities.chrome() Exception in thread "main" org.openqa.selenium.WebDriverException: cannot create session chrome-80.0 on any hosts after 1 attempt(s), last host error was: wait: http://172.17.0.4:4444/ does not respond in 30s (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 32.09 seconds Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'V815428', ip: '10.x.x.x', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161' Driver info: driver.version: RemoteWebDriver this is only happening when i use docker-compose to get selenoid If i get selenoid using cm it all works fine i am not able to understand what is the root cause Can you please help me to fix this @vania-pooh

vania-pooh commented 4 years ago

@Minion0313 Docker compose is always creating a custom Docker network to run containers. In that case you have to specify -container-network flag with created custom network name. A working example can be found here: https://aerokube.com/selenoid/latest/#_selenoid_with_docker_compose

Minion0313 commented 4 years ago

@Minion0313 Docker compose is always creating a custom Docker network to run containers. In that case you have to specify -container-network flag with created custom network name. A working example can be found here: https://aerokube.com/selenoid/latest/#_selenoid_with_docker_compose

Thank u for the quick reply will try that

Minion0313 commented 4 years ago

hi still getting the same issue @vania-pooh Please let me know if i am doing something wrong

here is my docker-compose.yml file version: '3' networks: selenoid: external: name: selenoid # This assumes network is already created services: ggr: restart: always image: aerokube/ggr links:

Here is test.xml file (its in /etc/grid-router/quota)

**Here is browsers.xml file i am using** { "chrome": { "default": "80.0", "versions": { "80.0": { "image": "selenoid/chrome:80.0", "port": "4444", "path": "/" } } } }
vania-pooh commented 4 years ago

@Minion0313 could you please try with older Chrome (e.g. 70.0) images or with Firefox images? There is one Chrome-specific issues with similar sympthoms.

Minion0313 commented 4 years ago

@Minion0313 could you please try with older Chrome (e.g. 70.0) images or with Firefox images? There is one Chrome-specific issues with similar sympthoms.

@vania-pooh is everything good with docker compose, tests.xml and browsers.json file? I can try that, but just to clarify it all works fine with only selenoid i mean when i run the tests only with selenoid (https://localhost:4444/wd/hub) this error occurs only when I try it with ggr URL that is when i am trying to run the tests using GGR

vania-pooh commented 4 years ago

@Minion0313 using localhost in Ggr quota file only makes sense if --net host mode is used. Otherwise localhost in Ggr container is not the same host as localhost of your host machine. This is how Docker works.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.