Articles on: ggRock

๐Ÿ› ๏ธ Fix: "Failed to Connect to Server" When Opening a VM Console (noVNC)

When you open a VM from the ggRock admin panel, such as ToolchainVM or an image VM, the noVNC screen shows a red banner reading "Failed to connect to server", and the console never loads.


๐Ÿ“Œ Who This Affects

Servers updated to Debian 12 or Debian 13 that are running a recent version of ggRock.


๐Ÿ”Ž What Causes It

The console connects through a WebSocket path that changed from /websockify to /vnc/websockify. On affected servers, the new path is handled by an nginx rule that doesn't pass the WebSocket headers, so the connection fails. The fix adds a matching rule for the new path.


โœ… Step 1: Run the Fix

Open the Debian Control Panel terminal, SSH, or the server console as root, and run:


wget -O - https://images.ggleap.com/ManagedServices/Scripts/fix-novnc-websockify.sh | bash -


The script:

  • Backs up /etc/nginx/conf.d/ggrock.conf with a timestamp
  • Adds the new rule, copied from the working /websockify rule
  • Tests the nginx configuration before applying it
  • Restores the backup automatically if the test fails


When it succeeds, it prints:

OK: /vnc/websockify block in place; nginx tested and reloaded.


Want to read the script first? Download it and run it yourself:

wget https://images.ggleap.com/ManagedServices/Scripts/fix-novnc-websockify.sh
less fix-novnc-websockify.sh
bash fix-novnc-websockify.sh


If the error returns after an update, run the fix again


๐Ÿงช Step 2: Test the Console

  1. Refresh the ggRock admin panel.
  2. Open the VM and click Connect in the noVNC window.
  3. The VM's screen should appear.


๐Ÿ” If the Script Says a Block Already Exists

If someone added a /vnc/websockify rule by hand, the script shows it and makes no changes. Those rules are sometimes missing headers or use a short timeout. To replace it with the correct rule, run:

wget -O - https://images.ggleap.com/ManagedServices/Scripts/fix-novnc-websockify.sh | REPLACE=1 bash -


โ†ฉ๏ธ Undo the Fix

The script prints a rollback command at the end. It looks like this, with your own backup file name:

cp -a /etc/nginx/conf.d/ggrock.conf.bak.YYYYMMDD-HHMMSS /etc/nginx/conf.d/ggrock.conf && systemctl reload nginx


โš ๏ธ Troubleshooting

Message

What it means

run as root

Run the command as root or with sudo.

config not found

/etc/nginx/conf.d/ggrock.conf doesn't exist on this server. Contact support.

no 'location /websockify' block found

The config doesn't look like a standard ggRock install. Contact support.

nginx -t FAILED - reverting

The script restored your original config. Contact support with a copy of the output.


๐Ÿงฐ Workaround

You can still control VMs from the Debian Control Panel. See Using Cockpit Virtual Machines on ggRock (Advanced).


๐Ÿ†˜ Still Stuck?

Chat with our support team with the purple chat bubble at the bottom-right of ggcircuit.com and include:


  • A screenshot of the error
  • Your ggRock version (shown at the bottom-left of the admin panel)
  • Your Debian version

Updated on: 24/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!