SeleniumHQ / docker-selenium

Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Docker, making it easier to perform browser automation
http://www.selenium.dev/docker-selenium/
Other
7.76k stars 2.5k forks source link

[🐛 Bug]: Can't connect to VNC when deployed on Azure Container #2295

Open Berets opened 3 weeks ago

Berets commented 3 weeks ago

What happened?

Hi, i deployed a container based on the selenium/chrome_standalone. It works everything except the connection to VNC. Seems that the port it's not exposed, did i missed anything?

Thanks for the help

Command used to start Selenium Grid with Docker (or Kubernetes)

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "containerGroups_selenium_search_app_name": {
            "defaultValue": "selenium-search-app",
            "type": "String"
        }
    },
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.ContainerInstance/containerGroups",
            "apiVersion": "2023-05-01",
            "name": "[parameters('containerGroups_selenium_search_app_name')]",
            "location": "northeurope",
            "properties": {
                "sku": "Standard",
                "containers": [
                    {
                        "name": "[parameters('containerGroups_selenium_search_app_name')]",
                        "properties": {
                            "image": "***/selenium-search:v1",
                            "ports": [
                                {
                                    "protocol": "TCP",
                                    "port": 4444
                                },
                                {
                                    "protocol": "TCP",
                                    "port": 7900
                                }
                            ],
                            "environmentVariables": [],
                            "resources": {
                                "requests": {
                                    "memoryInGB": 2,
                                    "cpu": 1
                                }
                            }
                        }
                    }
                ],
                "initContainers": [],
                "imageRegistryCredentials": [
                    {
                        "server": "***",
                        "username": "***"
                    }
                ],
                "restartPolicy": "Always",
                "ipAddress": {
                    "ports": [
                        {
                            "protocol": "TCP",
                            "port": 4444
                        },
                        {
                            "protocol": "TCP",
                            "port": 7900
                        }
                    ],
                    "ip": "*.***.**.**",
                    "type": "Public",
                    "dnsNameLabel": "selenium-search-dns",
                    "autoGeneratedDomainNameLabelScope": "Unsecure"
                },
                "osType": "Linux"
            }
        }
    ]
}

Relevant log output

No output

Operating System

Linux

Docker Selenium version (image tag)

4.22.0

Selenium Grid chart version (chart version)

No response

github-actions[bot] commented 3 weeks ago

@Berets, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

VietND96 commented 2 weeks ago

Do you want to see the VNC via noVNC Websocket? If yes, container port 7900 needs to be exposed to access from outside (http://:/?autoconnect=1&resize=scale&password=secret) If you want to access via protocol VNC, container port 5900 needs to be exposed to access from outside, then you can connect to VNC session via such client e.g VNCViewer

Berets commented 2 weeks ago

It's not this part of configuration that expose the port?

{ "protocol": "TCP", "port": 7900 }