aerokube / selenoid

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.
https://aerokube.com/selenoid/latest/
Apache License 2.0
2.57k stars 322 forks source link

Getting Error - http://172.x.x.x:4444/wd/hub does not respond in 30s #565

Closed rohitpatwari84 closed 4 years ago

rohitpatwari84 commented 5 years ago

This is my docker-compose running on swarm and I am using overlay network (as passed in the command for selenoid) .Could anyone please have a look at the compose file and guide if any thing is missing -

version: '2'
services:
  selenoid:
    image: aerokube/selenoid:latest-release

    volumes:
      - "selenoid-config-volume:/etc/selenoid"
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "selenoid-data-volume:/opt/selenoid/data"
    environment:
      - constraint:node-type==app-node
    command: ["-conf", "/etc/selenoid/browsers.json","-video-output-dir", "/opt/selenoid/data/video","-timeout","3m","sessionTimeout","2m", "-container-network", "orgselenoiddit_default"]
    ports:
      - "4444:4444"

  selenoid-ui:
    image: "aerokube/selenoid-ui"
    labels:
      - interlock.hostname=selenoid.org
      - interlock.domain=dit.paascloud.org.com
      - interlock.port=8080

    ports:
        - "8080"
    environment:
        - DBUS_SESSION_BUS_ADDRESS=/dev/null
        - constraint:node-type==app-node
    command: ["--selenoid-uri", "http://ggr-ui:8888"]      

  ggr:
    image: "aerokube/ggr:latest-release"
    environment:
      - constraint:node-type==app-node
    labels:
      - interlock.hostname=ggr.org
      - interlock.domain=dit.paascloud.org.com
      - interlock.port=4444

    ports:
        - "4444"
    volumes:
      - "gridrouter-volume:/etc/grid-router"

  ggr-ui:
    image: "aerokube/ggr-ui:latest-release"
    environment:
      - constraint:node-type==app-node

    ports:
      - "8888"
    volumes:
      - "gridrouter-volume:/etc/grid-router"
rohitpatwari84 commented 5 years ago

I had a look at [(https://github.com/aerokube/selenoid/issues/564)] , and tried to make it work but no luck

yosserO commented 5 years ago

@rohitpatwari84 Just for your info: The solution propsed in https://github.com/aerokube/selenoid/issues/564 resolved the "does not respond in 30s" error but I'm getting now another error: "Session timed out". The containers are all part of the overlay network, but the session is created and directly deleted after that. I will try today to make this work, and give you feedback.

I think your other services should also be in the orgselenoiddit_default network.

vania-pooh commented 5 years ago

@yosserO btw, Selenoid does not create swarm service.

yosserO commented 5 years ago

After struggling with this for a while: The load balancing in docker swarm make it difficult to achieve session stickiness between the selenoid service and the automatically created browser containers. the requests/answers get lost and are not sent to the correct service in the swarm. I haven't figured it out yet. :(

vania-pooh commented 4 years ago

Closing this because of inactivity. Feel free to reopen if still having questions.