VNC Failed Something went wrong, connection is closed

After deploying the VM and it becomes running when I click on the vnc icon I get this error

novnc log

hamo - - [30/Oct/2019 12:26:27] 192.168.122.1: Plain non-SSL (ws://) WebSocket connection
hamo - - [30/Oct/2019 12:26:27] 192.168.122.1: Version hybi-13, base64: 'False'
hamo - - [30/Oct/2019 12:26:27] 192.168.122.1: Path: '/?token=9wpxwe4kh5z9abr9mwwm'
hamo - - [30/Oct/2019 12:26:27] connecting to: hostnode2:5931
handler exception: [Errno -3] Temporary failure in name resolution
hamo - - [30/Oct/2019 12:29:32] 192.168.122.1: Plain non-SSL (ws://) WebSocket connection
hamo - - [30/Oct/2019 12:29:32] 192.168.122.1: Version hybi-13, base64: 'False'
hamo - - [30/Oct/2019 12:29:32] 192.168.122.1: Path: '/?host=192.168.122.198&port=29876&token=48uhgpvdgyifnm88ei18&encrypt=no&title=Ubuntu%2016.04%20-%20KVM-32&password=null'

I am using the latest release of opnnebula 5.9.9.0 from githib repo. I buillt it form source.
I have virtual setup.
I installed opnenbula on a virtual machine and connected to a virtual host.
the port 5932 is accesable form the host not from the frontend.
this the output of sudo lsof -i -P -n | grep LISTEN command

oned       1910        oneadmin   22u  IPv4  33014      0t0  TCP *:2633 (LISTEN)
ruby       2456        oneadmin   10u  IPv4  35173      0t0  TCP *:9869 (LISTEN)
ruby       2481        oneadmin   11u  IPv4  35145      0t0  TCP 127.0.0.1:2474 (LISTEN)
python     8245        oneadmin    0u  IPv4 112646      0t0  TCP *:29876 (LISTEN)
ruby      19233        oneadmin   13u  IPv4 253557      0t0  TCP 127.0.0.1:2101 (LISTEN)
ruby      19233        oneadmin   15u  IPv4 253559      0t0  TCP 127.0.0.1:2102 (LISTEN)

Hello @abdullah

Did you set up secure ws on sunstone-server.conf or are you just using plain ws?

Hello @ahuertas

Thank you for replying. I plain just plain ws.

And are you using KVM or vCenter?

Thank you for your intrest. I am using kvm.

You are welcome!

So, do you get any error in the browser console when trying to connect to the VNC? Just open it and send me a screenshot.

Sorry to be late in the reply.
this screen shot when I click on the vnc icon is the

and this when I open in I click on “open in a new window”

But, in the console browser, do you get any error?

Yes ,I get an error.

Any ideas ?

I had exactly the same issue, and it was because of SSL certificates and NoVNC services.

Look at novnc error log, and nginx eventually.

Hi,
Please I have a same problem with vCenter.

Best regards.

Hi,

Good topic.

I’m facing same issue:

websock.js:212 WebSocket connection to ‘wss://www.example.fr:29876/?host=www.example.fr&port=29876&token=ps4ul4wuvmalgesjgi69&encrypt=yes&title=test01&password=null’ failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

Regards

Hi,

Please check that the following ports are open:
- Browser <-> Sunstone Server TCP 29876
- Sunstone Server <-> Hypervisor TCP 5900 + VM_ID

1 Like

VNC consoles are returning “Something went wrong, connection is closed” while doing a minor update. .

Hello,

My environment:

  • ONE CE 6.2

It’s seems that I facing the same issue when try to access VNC.

Log from /var/log/one/novnc.log:

localhost.localdomain - - [02/Feb/2022 12:38:44] 127.0.0.1: SSL/TLS (wss://) WebSocket connection
localhost.localdomain - - [02/Feb/2022 12:38:44] 127.0.0.1: Version hybi-13, base64: 'False'
localhost.localdomain - - [02/Feb/2022 12:38:44] 127.0.0.1: Path: '/websockify?port=443/websockify&encrypt=yes&token=7gwbewppz2ud8nluka7e&info=eyJpZCI6IjIxNDUiLCJuYW1lIjoiU1RfVWJ1bnR1X1RydWVOQVMtOCIsInN0YXRlIjoiUlVOTklORyIsInN0YXJ0X3RpbWUiOiIxNjQyNTA4NDExIiwibmV0d29ya3MiOlsiMTkyLjE2OC4zLjY0Il19'
localhost.localdomain - - [02/Feb/2022 12:38:44] connecting to: c2.##redacted##:8045

Port is already open at the host node. Also between frontend and node can communicate using private IP.

root@c2.##redacted## ~
[ #redacted# ] # netstat -lnptu|grep 8045
tcp        0      0 192.168.3.12:8045       0.0.0.0:*               LISTEN      1006/qemu-kvm-one 

Error log from browser console:
image

Any idea for this issue?

Regards,
Harry

Ah I see.

I have this vnc_request_password: true configured in /etc/one/sunstone-server.conf.

I set to vnc_request_password: false, VNC console now active.

Question: I know about the password I can see on VM details.
How can I input the password when the vnc_request_password: true ?
image