aerokube / selenoid-ui

Graphical user interface for Selenoid project
https://aerokube.com/selenoid-ui/latest/
Apache License 2.0
305 stars 76 forks source link

Showing wrong number of sessions when using with ggr and ggr-ui #527

Closed fedgimeno closed 6 months ago

fedgimeno commented 6 months ago

Hi!

I'm having problems gettin selenoid-ui to report the correct number of sessions.

My current setup is as follows:

2 Selenoid hosts currently running in ports 6666 and 6667. ggr running in port 4444 ggr-ui running in port 8888 selenoid-ui running in 8080

Each host has a limit of 1 parallel container running.

I ran the docker containers with the following configuration:

docker run -d --name ggr -p 4444:4444 -v /etc/grid-router/:/etc/grid-router:ro aerokube/ggr:latest-release -guests-allowed
docker run -d --name ggr-ui -p 8888:8888 -v /etc/grid-router/quota/:/etc/grid-router/quota/:ro aerokube/ggr-ui:latest-release
docker run -d --name selenoid-ui -p 8080:8080 --link ggr-ui  ggr aerokube/selenoid-ui:latest-release \
              --webdriver-uri http://ggr:4444 --status-uri http://ggr-ui:8888
[root@ip-10-121-51-226 bin]# docker ps
CONTAINER ID   IMAGE                                 COMMAND                  CREATED              STATUS                        PORTS                                       NAMES
b87171acbd6c   aerokube/selenoid-ui:latest-release   "/selenoid-ui --webd…"   About a minute ago   Up About a minute (healthy)   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp   selenoid-ui
a54425bebd0a   aerokube/ggr:latest-release           "/usr/bin/ggr -liste…"   2 minutes ago        Up 2 minutes                  0.0.0.0:4444->4444/tcp, :::4444->4444/tcp   ggr
1626c1415c59   aerokube/ggr-ui:latest-release        "/usr/bin/ggr-ui -qu…"   4 minutes ago        Up 4 minutes                  0.0.0.0:8888->8888/tcp, :::8888->8888/tcp   ggr-ui
f594194499db   aerokube/selenoid:latest-release      "/usr/bin/selenoid -…"   2 hours ago          Up 2 hours                    0.0.0.0:6667->4444/tcp, :::6667->4444/tcp   selenoid2
050fdc7071b4   aerokube/selenoid:latest-release      "/usr/bin/selenoid -…"   2 hours ago          Up 2 hours                    0.0.0.0:6666->4444/tcp, :::6666->4444/tcp   selenoid1
[root@ip-10-121-51-226 bin]#
[root@ip-10-121-51-226 bin]#
[root@ip-10-121-51-226 bin]#
[root@ip-10-121-51-226 bin]#
[root@ip-10-121-51-226 bin]# cat /etc/grid-router/quota/test.xml
<qa:browsers xmlns:qa="urn:config.gridrouter.qatools.ru">
<browser name="chrome" defaultVersion="121.0">
    <version number="121.0">
        <region name="1">
            <host name="10.121.51.226" port="6666" count="1"/>
            <host name="10.121.51.226" port="6667" count="1"/>
        </region>
    </version>
</browser>
</qa:browsers>

[root@ip-10-121-51-226 bin]#

Selenoid-UI reports 2 available sessions correctly, but when I launch one session using http://10.121.51.226:4444/wd/hub/, it reports 2 sessions running instead of 1. Can't fine the cause of the issue in the logs, very weird to me.

https://github.com/aerokube/selenoid-ui/assets/10782676/f9d352b8-d636-48d4-a9c1-9526f42586d0

Regards!

fedgimeno commented 6 months ago

Update. I bumped the ggr-ui version to 1.1.2 and things started working as expected, so perhaps the issue is related to ggr-ui.

vania-pooh commented 6 months ago

This is duplicate of https://github.com/aerokube/ggr-ui/issues/71.