Skip to content

Unable to Connect to VNC Service, Sandbox VNC Not Starting as Expected** #1

@SherylM030

Description

@SherylM030

Description

While following the instructions in the README to start a sandbox and connect to the VNC service, the VNC service inside the sandbox does not start as expected. This results in the inability to connect to the sandbox GUI using noVNC or any VNC client.

Steps to Reproduce

  1. Start the arrakis-restserver as described in the README:
    cd arrakis-prebuilt
    sudo ./arrakis-restserver
  2. Start a sandbox using the CLI:
    ./arrakis-client start -n agent-sandbox
  3. Verify the sandbox status:
    ./arrakis-client list-all
    Output shows the sandbox is RUNNING and port forwarding is configured as 3000 -> 5901.
  4. Start the noVNC proxy:
    ./utils/novnc_proxy --vnc 127.0.0.1:3000
  5. Open a browser and navigate to http://127.0.0.1:6080/vnc.html. The connection fails, and the noVNC logs show:
    Failed to connect to 127.0.0.1:3000: [Errno 111] Connection refused
    
  6. Use the Python SDK to check the VNC service status inside the sandbox:
    from py_arrakis import SandboxManager
    sandbox_manager = SandboxManager('http://127.0.0.1:7000')
    sandbox = sandbox_manager.get_sandbox('agent-sandbox')
    
    # Check VNC service status
    print(sandbox.run_cmd('ps aux | grep vnc'))
    print(sandbox.run_cmd('netstat -tulpn | grep 5901'))
    Output shows that the VNC service is not running, and port 5901 is not being listened to.

Expected Behavior

  • The sandbox should automatically start the VNC service upon creation.
  • The host's port 3000 should correctly forward to the sandbox's 5901 port.
  • Users should be able to connect to the sandbox GUI using noVNC or any VNC client.

Actual Behavior

  • The VNC service inside the sandbox does not start.
  • The vncserver command fails with the following error:
    You will require a password to access your desktops.
    getpassword error: Inappropriate ioctl for device
    Password:
    
  • The sandbox does not listen on port 5901, and the host's port 3000 is not functional.

Logs and Outputs

  1. arrakis-client list-all Output:

    INFO[0000] client config: {
    ServerHost: 127.0.0.1
    ServerPort: 7000
    } 
    Available VMs:
    -------------
    VM Name: agent-sandbox
    Status: RUNNING
    IP Address: 10.20.1.2/24
    Tap Device: tap0
    Port Forwards:
      3000 -> 5901: gui
  2. noVNC Proxy Logs:

    Failed to connect to 127.0.0.1:3000: [Errno 111] Connection refused
    
  3. Python SDK Output:

    print(sandbox.run_cmd('ps aux | grep vnc'))
    print(sandbox.run_cmd('netstat -tulpn | grep 5901'))

    Output:

    {'output': '', 'error': 'exit status 1'}
    
  4. Attempt to Start VNC Service:

    print(sandbox.run_cmd('export HOME=/elara && vncserver :1'))

    Output:

    {'output': 'You will require a password to access your desktops.\ngetpassword error: Inappropriate ioctl for device\nPassword:', 'error': 'exit status 1'}
    

Possible Causes

  • The sandbox's VNC service is not properly configured or started.
  • The vncserver command requires a password to be set, but the current environment does not support interactive input.
  • The sandbox's environment variables (e.g., HOME) are not correctly set, causing vncserver to fail.
  • Missing dependencies in the sandbox (e.g., tigervnc-standalone-server, xfce4).

Environment Information

  • Operating System: Ubuntu 22.04
  • Arrakis Version: Latest (cloned from GitHub)
  • Python SDK Version: py-arrakis 1.2.0
  • noVNC Version: Latest (cloned from GitHub)

Addressing this issue will significantly improve the user experience and reliability of the Arrakis project. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions