Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Berets opened this issue Jun 28, 2024 · 4 comments
Open

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

Berets opened this issue Jun 28, 2024 · 4 comments

Comments

@Berets
Copy link

Berets commented Jun 28, 2024

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

Copy link

@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
Copy link
Member

VietND96 commented Jul 1, 2024

Do you want to see the VNC via noVNC Websocket? If yes, container port 7900 needs to be exposed to access from outside (http://<host_ip>:<host_port>/?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
Copy link
Author

Berets commented Jul 1, 2024

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

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

@VietND96
Copy link
Member

VietND96 commented Sep 9, 2024

In this case, can you check if Websocket is allowed
Via session capabilities, you can see a capability "se:vncLocalAddress": "ws://*.*.*.*:7900", Websocket is need for this address can be reacable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants