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

[Need help] Quota is showing 0 #1264

Closed HarryFree closed 2 years ago

HarryFree commented 2 years ago

@vania-pooh I am setting up ggr in my local machine and facing challenges that Quota shows zero but all services are running fine.

Docker Compose

version: '3'

services:
  selenoid:
    image: sskorol/selenoid_chromium_vnc:100.0
    network_mode: bridge
    restart: unless-stopped
    volumes:
      - "/Users/automation/tests:/etc/selenoid/"
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "/etc/selenoid/video:/opt/selenoid/video"
      - "/etc/selenoid/log:/opt/selenoid/logs"
    environment:
      - TZ=Asia/Singapore
    command:
      [
        "-conf",
        "/etc/selenoid/browsers.json",
        "-limit",
        "10",
        "-timeout",
        "5m",
        "-video-output-dir",
        "/opt/selenoid/video",
        "-log-output-dir",
        "/opt/selenoid/logs"
      ]
    ports:
      - "4445:4444"

  selenoid-ui:
    image: aerokube/selenoid-ui
    network_mode: bridge
    restart: unless-stopped
    links:
      - selenoid
    ports:
      - 8080:8080
    command: [ "--selenoid-uri", "http://selenoid:4444" ]

Browser.json

{
    "chrome": {
        "default": "100.0",
        "versions": {
            "100.0": {
                "image": "sskorol/selenoid_chromium_vnc:100.0",
                "port": "4444",
                "path": "/",
                "env": [
                    "TZ=Asia/Singapore"
                ],
                "screen": "1920x1080x24",
                "volumes": [
                    "/Users/automation/test/resources/videos:/opt/docker/video"
                ]
            }
        }
    }
}

test.xml

<qa:browsers xmlns:qa="urn:config.gridrouter.qatools.ru">
<browser name="chrome" defaultVersion="100.0">
    <version number="100.0">
        <region name="1">
            <host name="<ip>" port="4445" count="1"/>
        </region>
    </version>
</browser>
</qa:browsers>

Container status

image

Quota is 0 here.

image

status

image

vania-pooh commented 2 years ago

@HarryFree take a look at selenoid-ui container logs.

HarryFree commented 2 years ago

@vania-pooh It shows this

2022/09/09 08:42:42 [INIT] [Listening on :8080]
2022/09/09 08:42:44 Client added. 1 registered clients
vania-pooh commented 2 years ago

@HarryFree what is the goal of using a browser image instead of Selenoid?

  selenoid:
    image: sskorol/selenoid_chromium_vnc:100.0
HarryFree commented 2 years ago

in mac M1 chip chrome image is not working.

https://github.com/aerokube/images/pull/524

vania-pooh commented 2 years ago

@HarryFree you should use aerokube/selenoid anyway. What you are using does not contain Selenoid at all. It only contains Chrome and Chromedriver.

HarryFree commented 2 years ago

after changed to above image, it works. tons of thanks @vania-pooh