# Help:VNC Failed to connect to server (code: 1006)

**URL:** <https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040>\
**Category:** Product Support\
**Created:** [July 27, 2015, 9:14pm UTC](https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040 "2015-07-27T21:14:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomabroad](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tomabroad](https://forum.opennebula.io/u/tomabroad)\
**Post date:** [July 27, 2015, 9:14pm UTC](https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040/1 "2015-07-27T21:14:11Z")

</div>

what do i need? i have followed th equick start guide for ubuntu, 1 worker , 1 frontend server; vm seems to be running

thx

---

<div class="post-metadata">

**Author:** ![DaD](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dad/32/8466_2.png) [@DaD](https://forum.opennebula.io/u/DaD)\
**Post date:** [July 27, 2015, 10:13pm UTC](https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040/2 "2015-07-27T22:13:20Z")

</div>

tomabroad [forum@opennebula.org](mailto:forum@opennebula.org) writes:

> what do i need? i have followed th equick start guide for ubuntu, 1  
> worker , 1 frontend server; vm seems to be running

Generally, I saw the 1006 error when vnc SSL is activated but the  
certificate is unknown to the browser.

If you have certificate enable in /etc/one/sunstone-server.conf then you  
should try to connect to the websocket proxy:

```
https://<SUNSTONE>:29876

```

Then accept the certificate, it should result in a 405 error.

After that, retry to open a noVNC console.

## Regards.

Daniel Dehennin  
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF  
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF  
[signature.asc](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/2/292798d7b69c70a1340450747a6a6b118e00305e.asc) (342 Bytes)

---

<div class="post-metadata">

**Author:** ![jmelis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jmelis/32/24_2.png) [@jmelis](https://forum.opennebula.io/u/jmelis)\
**Post date:** [August 13, 2015, 7:05am UTC](https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040/3 "2015-08-13T07:05:49Z")

</div>

Make sure the port is open as well

---

<div class="post-metadata">

**Author:** ![godzsa](https://avatars.discourse-cdn.com/v4/letter/g/ea666f/32.png) [@godzsa](https://forum.opennebula.io/u/godzsa)\
**Post date:** [August 17, 2016, 8:09am UTC](https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040/4 "2016-08-17T08:09:18Z")

</div>

Hi! I have the same problem. Should I open the port on the host or the front-end machine? I got a bit confused

---

<div class="post-metadata">

**Author:** ![paprika27](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@paprika27](https://forum.opennebula.io/u/paprika27)\
**Post date:** [August 18, 2016, 4:36pm UTC](https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040/5 "2016-08-18T16:36:43Z")

</div>

> [@jmelis](#):
>
> Make sure the port is open as well

to do so  
` # service firewalld stop`

> [@godzsa](#):
>
> Should I open the port on the host or the front-end machine?

on whichever machine you’re failing to reach

---

<div class="post-metadata">

**Author:** ![VURoland](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/vuroland/32/7682_2.png) [@VURoland](https://forum.opennebula.io/u/VURoland)\
**Post date:** [August 19, 2016, 8:47am UTC](https://forum.opennebula.io/t/help-vnc-failed-to-connect-to-server-code-1006/1040/6 "2016-08-19T08:47:57Z")

</div>

hope this makes it clearer:

your VM will be available on your hypervisor server on the VNC port defined in the template (basically port 5900 + ID of your VM. The VNC data is sent to the NoVNC proxy, which is running on your master server or sunstone-server.

so: VNC port 5900 on hypervisor --\> novnc proxy --\> Sunstone (port 29876)

You have activated SSL on the last part, probably with a self-signed cert. so you need to accept the risk in your browser when you connect for the first time: sunstone IP:29876 --\> accept selfsigned cert. --\> VNC over SSL is possible. So on your Sunstone server, you need to open port 29876 (for VNC) and the port for the sunstone web interface (default 9869, maybe 80 / 443 via http proxy).

hope this helps!
