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.