aerokube / ggr-ui

The missing /status API for Ggr
https://aerokube.com/ggr-ui/latest/
Apache License 2.0
39 stars 15 forks source link

selenoid-ui fails to get ggr-ui status #27

Closed rab2215 closed 4 years ago

rab2215 commented 6 years ago

When setting up ggr > ggr-ui > selenoid-ui using docker-compose, selenoid-ui fails to get the status from ggr-ui. If I access the ggr-ui /status API directly, i get the response as expected.

Repeating Error:

selenoid-ui_1 | 2018/06/18 20:09:49 can't get status (Get http://ggrui:8888/status: context deadline exceeded)

docker-compose file:

version: '3' services: ggr: restart: always image: aerokube/ggr ports:

  • "4444:4444" volumes:
  • "./:/etc/grid-router:ro" command: ["-quotaDir", "/etc/grid-router"] ggr-ui: restart: always image: aerokube/ggr-ui ports:
  • "8888:8888" volumes:
  • "./:/etc/grid-router/quota:ro" selenoid-ui: restart: always image: aerokube/selenoid-ui links:
  • ggr-ui ports:
  • "8080:8080" command: ["--selenoid-uri", "http://ggr-ui:8888"]

I have used the same docker-compose configuration with base selenoid > selenoid-ui with no issues. Any ideas as to whats causing this?

vania-pooh commented 6 years ago

@rab2215 from the code point of view both Selenoid and Ggr UI are identical. The only difference is the port. You could try to link them manually and see whether it helps. I think this is something related to custom Docker networks and respective iptables rules.

rab2215 commented 6 years ago

Yeah so I tried linking them earlier and used vanilla docker without compose and ran into the same issue. Another question, is the ggr-ui port hardcoded to 8888? Even after changing the defined port when creating the container, i still see "listening on port 8888" in the container logs

I also, as a test, took the current selenoid-ui container and changed the url to an existing selenoid container and it works fine, but throws the same error again when pointing back to the ggr-ui endpoint.

I have also seen on 2-3 occasions that when restarting all containers using compose, the selenoid-ui will intermittently connect to ggr-ui and show correct data. After 1-2 minutes the selenoid-ui starts throwing the error again.

vania-pooh commented 6 years ago

@rab2215 btw, are you using the latest release?

rab2215 commented 6 years ago

Yes, I only started using ggr-ui yesterday, I also deleted all local images and redownloaded this morning.

On Tue, Jun 19, 2018 at 11:43 AM Ivan Krutov notifications@github.com wrote:

@rab2215 https://github.com/rab2215 btw, are you using the latest release?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aerokube/ggr-ui/issues/27#issuecomment-398466384, or mute the thread https://github.com/notifications/unsubscribe-auth/AGLFrOxsAqYJtBS7e4jR0b0wVsgdr4eBks5t-SpFgaJpZM4Usahd .

benzman81 commented 6 years ago

I seem to have the same issue starting the docker images manually like this: docker run --name=selenium-grid-ggr -d --restart=on-failure:3 -p 54444:4444 -v ${WORKSPACE}/selenium-grid-ggr:/etc/grid-router:ro aerokube/ggr:1.5.5

docker run --name=selenium-grid-ggr-ui -d --restart=on-failure:3 -p 54445:8888 -v ${WORKSPACE}/selenium-grid-ggr/quota:/etc/grid-router/quota:ro aerokube/ggr-ui:1.1.1

docker run --name=selenium-grid-selenoid-ui -d --restart=on-failure:3 -p 54446:8080 aerokube/selenoid-ui:1.6.1 --selenoid-uri http://localhost:54445

Any idea?

vania-pooh commented 6 years ago

@benzman81 guys, you surprize me. Every container has its own isolated localhost and this is why it is not working. You should link containers like this:

$ docker run --name=selenium-grid-ggr-ui -d --restart=on-failure:3 -v ${WORKSPACE}/selenium-grid-ggr/quota:/etc/grid-router/quota:ro aerokube/ggr-ui:1.1.1
$ docker run --name=selenium-grid-selenoid-ui -d --restart=on-failure:3 --link selenium-grid-ggr-ui  -p 54446:8080 aerokube/selenoid-ui:1.6.1 --selenoid-uri http://selenium-grid-ggr-ui:8888
benzman81 commented 6 years ago

@vania-pooh missed that as I am pretty new to docker. Works now for me.

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.