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

cannot get ggr or ggr-ui to work with selenoid nodes. #331

Closed tpunx99gsx closed 3 years ago

tpunx99gsx commented 4 years ago

This is a brand new install, 3 centos 7 minimal VMs (ive already tried using Centos 8 to no avail) I first installed the selenoid nodes on 2 VMs using CM. Both have been tested and are working. Secondly I go into the GGR server which is separate from the nodes, and they are on the same subnet. I did the following steps as per the readme and the youtube videos

  1. create the /etc/grid-router/quota folder
  2. then run htpasswd -bc /etc/grid-router/users.htpasswd test test-password
  3. then create the test.xml with the basic settings in there pointing to the ip of the nodes as hosts with one chrome driver.
  4. start the docker container for ggr using 13 docker run -d --name ggr -v /etc/grid-router/:/etc/grid-router:ro --net host aerokube/ggr:latest-release
  5. at this point i run a test, and it fails. I then run a curl curl http://test:test-password@localhost:4444/wd/hub i get a 404 not found. I think this is the primary issue. Anyone else having these issues? When I go to install ggr-ui and selenoid-ui on this server using the link etc. the selenoid-ui comes up but says theres an issue detected with selenoid. Anyone seeing something standing out? not sure if using the latests is the wrong route and i should go back a couple versions. any help would be greatly appreciated. Tom
vania-pooh commented 4 years ago

@tpunx99gsx 1) This is Docker particularity, but --net host flag only works under Linux. In case of Mac \ Windows you can use -p 4444:4444 instead of --net host. 2) Doing GET request to /wd/hub makes no sense as this API it not present in W3C Selenium standard. To check that Ggr runs you can issue:

$ curl http://localhost:4444/ping

To check that sessions are starting correct request is:

$ curl --data '{"capabilities": {"alwaysMatch": {"browserName": "chrome"}}}' http://test:test-password@localhost:4444/wd/hub/session
tpunx99gsx commented 4 years ago

when i run the $ curl --data '{"capabilities": {"alwaysMatch": {"browserName": "chrome"}}}' http://test:test-password@localhost:4444/wd/hub/session i get the following: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"85.0.4183.121","chrome":{"chromedriverVersion":"85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689})","userDataDir":"/tmp/.com.google.Chrome.bUgJMR"},"goog:chromeOptions":{"debuggerAddress":"localhost:39241"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"linux","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify","webauthn:virtualAuthenticators":true},"sessionId":"80ca874e9f385700709d11d82139df48bae66a8654a62d5472d151128a9a98fe"}} also in running the command "docker logs ggr-ui" i get the following error over and over again 2020/09/30 14:38:09 [STATUS] [Unknown quota user: unknown] [172.17.0.3] and the docker logs for selenoid-ui i get this error 2020/09/30 14:41:39 [ERROR] [Can't get status: invalid character 'B' looking for beginning of value]

a couple things that arent covered in the getting started guide and the video. Does the user test with test-password need to be created on the vms themselves? is there any firewall rules that need to be opened on the vms themselves (no firewalls between the vms as they are on the same network)?

vania-pooh commented 4 years ago

@tpunx99gsx for ggr-ui please use release version and not aerokube/ggr-ui:latest. You curl output shows that session is created and everything is working.

tpunx99gsx commented 4 years ago

ok, so the issue seems to be with the firewall on the GGR server. When i stop firewalld on the server, i am able to start only ggr (ggr-ui and selenoid-ui fail to start most likely due to the ports and iptables) but interestingly, with the firewall off and just ggr running, the tests run perfect and split across the two nodes i have. (i have selenoid-ui installed on both nodes to watch the split) So i guess ill look at a way to run the ggr-ui and selenoid-ui without the firewall or figure out where the firewall is blocking.

stale[bot] commented 3 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.