Failed to connect to server are you connected to the internet error code 1006

Одминский блог Блог о технологиях, технократии и методиках борьбы с граблями Ошибка 1006 noVNC соединения к виртуальной машине Proxmox VE Неспешно знакомлюсь с системой виртуализации ProxMox VE, которая примечательна тем, что из коробки поддерживает одновременно KVM и OpenVZ. И, помимо этого, при крайне простом веб-интерфейсе, поддерживает все фичи виртуализации KVM в бесплатном режиме, хотя […]

Содержание

  1. Одминский блог
  2. Ошибка 1006 noVNC соединения к виртуальной машине Proxmox VE
  3. Server disconnected (code: 1006)
  4. opaxweb
  5. dietmar
  6. informant
  7. dietmar
  8. informant
  9. dietmar
  10. informant
  11. dietmar
  12. informant
  13. dietmar
  14. informant
  15. informant
  16. informant
  17. informant
  18. dimitrilobesno
  19. Glowsome

Одминский блог

Блог о технологиях, технократии и методиках борьбы с граблями

Ошибка 1006 noVNC соединения к виртуальной машине Proxmox VE

Неспешно знакомлюсь с системой виртуализации ProxMox VE, которая примечательна тем, что из коробки поддерживает одновременно KVM и OpenVZ. И, помимо этого, при крайне простом веб-интерфейсе, поддерживает все фичи виртуализации KVM в бесплатном режиме, хотя и выкидывает, при каждом заходе в админку, уведомление “у вас отсутствует подписка”. Что разительно отличает данную систему от VMware ESXi, которая в бесплатном режиме держит всего один камень, а также требует, как минимум, 2IP для создания виртуальной фермы серверов, ибо один забирает под сервер и не имеет собственной реализации NAT.

Всем удобная система, но напоролся на отвратительный баг, по которому в Mozilla Firefox с завидным постоянством отваливается браузерная noVNC консоль доступа к виртуальной машине через веб-консоль управления. Соединение просто прекращается, показывает форму логина и выдает ошибку Server disconnected (code: 1006). Причем наглухо, так что приходится скакать с бубном, пытаясь реанимировать noVNC соединение, ибо все новые начинают запускаться с этой же ошибкой.

Что только не ковырял, но лечится это только путем удаления куков для урла вебморды ProxMox и перечиткой сертификата, находящегося в разделе Дополнительно -> Сертификаты -> Просмотр сертификатов -> Серверы -> PVE Cluster Manager CA

Но поскольку noVNC консоль висла каждые пару минут, то стал искать пути как с этим жить и что делать, ибо в Vivaldi оказались те же проблемы. И случайно обнаружил очень занятный ценебаг-цефич: у меня установлена Mozilla Aurora, еще со времен протечки памяти Firefox. И вот при запуске Aurora стартует тот же самый Firefox 50.1.0, просто вторым окном. Но из него noVNC соединение работает вообще без нареканий, а из первого окна, где постоянно отваливалось – теперь максимум что, может зависнуть сессия noVNC, которую просто закрываешь и стартуешь новую консоль.

Очень странно конечно, но не менее странно, чем отвал сертификата ProxMox в процессе работы.

Еще одним вариантом быстрого доступа к консоли виртуальной машины с проблемами noVNC, является использование протокола SPICE (Simple Protocol for Independent Computing Environments) созданного как раз для доступа к десктопным VE машинам. В винде уже имеется встроенный виндовый клиент доступа RemoteViewer, но лучше установить свежий родной клиент. Тем более что там же можно взять драйвер редиректа USB.

Для использования SPICE соединения, следует погасить виртуальную машину, после чего в управлении виртуальной машиной PROXMOX, драйвер дисплея виртуальной машины надо переключить в SPICE режим, как показано на картинке. После старта виртуалки можно запускать соединение, либо с помощью виндового Remote Viewer, либо дополнительно установленного VirtViewer – последний работает как то по-стабильней.

З.Ы в процессе поиска решения, нашел самый угарный коммент о том, что чел обнаружил на своем сервере виртуализации установленный netcat6, который и выдавал эту ошибку. После того как он запустил команду “apt-get remove netcat6″ у него отлично заработало novnc. Если кто не понял, то повторять не надо.

Источник

Server disconnected (code: 1006)

opaxweb

Member

I am new to the forum and proxmox, currently i am facing an issue when connecting to the console.

Everytime i try to connect to the console i get the following error message: «Server disconnected (code: 1006)»

Any help is greatly appreciated.

dietmar

Proxmox Staff Member

Best regards,
Dietmar

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

informant

Active Member

Hi, same issue here, but only on one node in cluster.

Test with newest FF, Opera, IE and Chrome.

error msg in log:

dietmar

Proxmox Staff Member

Best regards,
Dietmar

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

informant

Active Member

Hi, we can post our IP if you would, we have only comment it on this post^^.

dietmar

Proxmox Staff Member

Best regards,
Dietmar

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

informant

Active Member

ok, i wouldn´t modify it in next time, but do you have a workarround for this issue?

dietmar

Proxmox Staff Member

Best regards,
Dietmar

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

informant

Active Member

Hi, without /dev/null:

dietmar

Proxmox Staff Member

Best regards,
Dietmar

Do you already have a Commercial Support Subscription? — If not, Buy now and read the documentation

informant

Active Member

Hi, i have edit the post, with correct command.

informant

Active Member

any ideas to fix it?

informant

Active Member

Hi all, we have test lookup hostname, and reverse lookup and ping hostname . all working fine. what can we do do solve this error?

please help. very thanks and bet regards

informant

Active Member

Hi all, we have found a solution for this problem.

you must clean /root/.ssh/know_hosts on node and cluster. after this you connect via ssh to node and cluster and have new keys. after this the vnc console works fine, without 1006 error.

Active Member

Hi all, we have found a solution for this problem.

you must clean /root/.ssh/know_hosts on node and cluster. after this you connect via ssh to node and cluster and have new keys. after this the vnc console works fine, without 1006 error.

Can you give any more detail on what you did? I emptied known_hosts on the nodes, but what else needs to be done?

Active Member
Member

For future time travelers:

If you want to see the console from a vm on another node in your cluster and you get error 1006 in your browser console your issue might be this:

Try to ssh from the node which throws an error to the desired target node.

node01 -> node02 (example)

You may get an error similar to this one:

To fix this error, remove the entries of the broken target node in the following files (in this sample all entries about node02):

After this ssh from node01 to node02 via command line. You should get this info:

Accept with yes. Log out of the remote shell again and try to ssh into node02 (from node01) again just to check that you’ll be grated access without any further question or error.

You should now be able to use your cluster as expected again.

dimitrilobesno

New Member

I am new to the forum and proxmox, currently i am facing an issue when connecting to the console.

Everytime i try to connect to the console i get the following error message: «Server disconnected (code: 1006)»

Any help is greatly appreciated.

Glowsome

Active Member

Examining nodes i found that known_hosts were on their own ( /root/.ssh/known_hosts, /etc/ssh/ssh_known_hosts), instead of being sym-linked to /etc/pve/priv/known_hosts

Another observation : seems that the preference/default of a ssh-dsa key has changed to ecdsa-sha2-nistp256.

So in my setup i have used ansible to correct/inject both the ssh-dsa aswell as the ecdsa-sha2-nistp256 — keys into the known hosts located at /etc/pve/priv/known_hosts

Since then its all cool and no issues anymore.

Источник

Unfortunately I’m not getting anywhere with this so far.

I tried starting
./utils/launch.sh —vnc 10.1.1.10:5951 —listen 6001

When I try to connect with VNC client from my pc or from a webpage I get the following output in console:

Warning: could not find self.pem
Starting webserver and WebSockets proxy on port 6001
WARNING: no ‘numpy’ module, HyBi protocol is slower or disabled
WebSocket server settings:

  • Listen on :6001
  • Flash security policy server
  • Web server. Web root: /usr/share/openqrm/plugins/novnc/vncclient
  • No SSL/TLS support (no cert file)
  • proxying from :6001 to 10.1.1.10:5951
    I tried starting
    ./utils/launch.sh —vnc 10.26.13.10:5951 —listen 6001

When I try to connect with VNC client from my pc or from a webpage I get the following output in console:

Warning: could not find self.pem
Starting webserver and WebSockets proxy on port 6001
WARNING: no ‘numpy’ module, HyBi protocol is slower or disabled
WebSocket server settings:

  • Listen on :6001
  • Flash security policy server
  • Web server. Web root: /usr/share/openqrm/plugins/novnc/vncclient
  • No SSL/TLS support (no cert file)
  • proxying from :6001 to 10.1.1.10:5951

Navigate to this URL:

http://hostname:6001/vnc.html?host=hostname&port=6001

Press Ctrl-C to exit

1: 10.1.1.12: ignoring socket not ready
2: handler exception: [Errno 104] Connection reset by peer
31: 10.1.1.12: Plain non-SSL (ws://) WebSocket connection
31: 10.1.1.12: Version hybi-13, base64: ‘True’
31: 10.1.1.12: Path: ‘/websockify’
31: connecting to: 10.1.1.10:5951
31: handler exception: [Errno 111] Connection refused
61: 10.1.1.12: Plain non-SSL (ws://) WebSocket connection
61: 10.1.1.12: Version hybi-13, base64: ‘True’
61: 10.1.1.12: Path: ‘/websockify’
61: connecting to: 10.1.1.10:5951
61: handler exception: [Errno 111] Connection refused
^C
Terminating WebSockets proxy (30915)

Thanks!
Navigate to this URL:

http://hostname:6001/vnc.html?host=hostname&port=6001

Press Ctrl-C to exit

1: 10.1.1.12: ignoring socket not ready
2: handler exception: [Errno 104] Connection reset by peer
31: 10.1.1.12: Plain non-SSL (ws://) WebSocket connection
31: 10.1.1.12: Version hybi-13, base64: ‘True’
31: 10.1.1.12: Path: ‘/websockify’
31: connecting to: 10.1.1.10:5951
31: handler exception: [Errno 111] Connection refused
61: 10.1.1.12: Plain non-SSL (ws://) WebSocket connection
61: 10.1.1.12: Version hybi-13, base64: ‘True’
61: 10.1.1.12: Path: ‘/websockify’
61: connecting to: 10.1.1.10:5951
61: handler exception: [Errno 111] Connection refused
^C
Terminating WebSockets proxy (30915)

Netstat still does not show anything for 5951, shouldn’t novnc start something for that as well? It can’t proxy anything from 6001 to 5951 if there’s nothing listening?

Thanks!

22 Jan 2017 | Автор: dd |

Неспешно знакомлюсь с системой виртуализации ProxMox VE, которая примечательна тем, что из коробки поддерживает одновременно KVM и OpenVZ. И, помимо этого, при крайне простом веб-интерфейсе, поддерживает все фичи виртуализации KVM в бесплатном режиме, хотя и выкидывает, при каждом заходе в админку, уведомление “у вас отсутствует подписка”. Что разительно отличает данную систему от VMware ESXi, которая в бесплатном режиме держит всего один камень, а также требует, как минимум, 2IP для создания виртуальной фермы серверов, ибо один забирает под сервер и не имеет собственной реализации NAT.

Всем удобная система, но напоролся на отвратительный баг, по которому в Mozilla Firefox с завидным постоянством отваливается браузерная noVNC консоль доступа к виртуальной машине через веб-консоль управления. Соединение просто прекращается, показывает форму логина и выдает ошибку Server disconnected (code: 1006). Причем наглухо, так что приходится скакать с бубном, пытаясь реанимировать noVNC соединение, ибо все новые начинают запускаться с этой же ошибкой.

Что только не ковырял, но лечится это только путем удаления куков для урла вебморды ProxMox и перечиткой сертификата, находящегося в разделе Дополнительно -> Сертификаты -> Просмотр сертификатов -> Серверы -> PVE Cluster Manager CA

Но поскольку noVNC консоль висла каждые пару минут, то стал искать пути как с этим жить и что делать, ибо в Vivaldi оказались те же проблемы. И случайно обнаружил очень занятный ценебаг-цефич: у меня установлена Mozilla Aurora, еще со времен протечки памяти Firefox. И вот при запуске Aurora стартует тот же самый Firefox 50.1.0, просто вторым окном. Но из него noVNC соединение работает вообще без нареканий, а из первого окна, где постоянно отваливалось – теперь максимум что, может зависнуть сессия noVNC, которую просто закрываешь и стартуешь новую консоль.

Очень странно конечно, но не менее странно, чем отвал сертификата ProxMox в процессе работы.

включение spice консоли в proxmoxЕще одним вариантом быстрого доступа к консоли виртуальной машины с проблемами noVNC, является использование протокола SPICE (Simple Protocol for Independent Computing Environments) созданного как раз для доступа к десктопным VE машинам. В винде уже имеется встроенный виндовый клиент доступа RemoteViewer, но лучше установить свежий родной клиент. Тем более что там же можно взять драйвер редиректа USB.

Для использования SPICE соединения, следует погасить виртуальную машину, после чего в управлении виртуальной машиной PROXMOX, драйвер дисплея виртуальной машины надо переключить в SPICE режим, как показано на картинке. После старта виртуалки можно запускать соединение, либо с помощью виндового Remote Viewer, либо дополнительно установленного VirtViewer – последний работает как то по-стабильней.

З.Ы в процессе поиска решения, нашел самый угарный коммент о том, что чел обнаружил на своем сервере виртуализации установленный netcat6, который и выдавал эту ошибку. После того как он запустил команду “apt-get remove netcat6″ у него отлично заработало novnc. Если кто не понял, то повторять не надо.

Rating: 3.1/10 (19 votes cast)

Rating: -3 (from 3 votes)

Ошибка 1006 noVNC соединения к виртуальной машине Proxmox VE, 3.1 out of 10 based on 19 ratings

Теги: proxmox, виртуализация

proxmox:troubleshooting:nonvc_fails_to_connect_with_server_disconnected_code:1006

Table of Contents

Proxmox — Troubleshooting — noNVC fails to connect with Server disconnected (code: 1006)

Trying to connect to a console within Proxmox returns the following error message: Server disconnected (code: 1006).

TASK ERROR: command '/usr/bin/termproxy 5901 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1

Regenerate Certificates

SSH into the Proxmox host.

pvecm updatecerts --force
systemctl restart pvedaemon.service
systemctl restart pveproxy.service

NOTE: The certificates are out of sync, so regenerate them.


Revert to default SSL configuration

rm -rf /etc/pve/pve-root-ca.pem
rm -rf /etc/pve/priv/pve-root-ca.key
rm -rf /etc/pve/nodes/pve/pve-ssl.pem
rm -rf /etc/pve/nodes/pve/pve-ssl.key
rm /etc/pve/pve-root-ca.pem /etc/pve/priv/pve-root-ca.key
 
pvecm updatecerts -f
systemctl restart pveproxy

Check Logs

cat /var/log/daemon.log | grep -e pveproxy -e pvedaemon

returns:

...
Jul 21 09:11:48 pve pvedaemon[191274]: <root@pam> successful auth for user 'root@pam'
Jul 21 09:11:55 pve pvedaemon[192394]: starting termproxy UPID:pve:0002EF8A:002A3230:60F7D6CB:vncshell::root@pam:
Jul 21 09:11:55 pve pvedaemon[191276]: <root@pam> starting task UPID:pve:0002EF8A:002A3230:60F7D6CB:vncshell::root@pam:
Jul 21 09:12:05 pve pvedaemon[192394]: command '/usr/bin/termproxy 5900 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1
Jul 21 09:12:05 pve pvedaemon[191276]: <root@pam> end task UPID:pve:0002EF8A:002A3230:60F7D6CB:vncshell::root@pam: command '/usr/bin/termproxy 5900 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1
Jul 21 09:12:14 pve pvedaemon[192565]: starting vnc proxy UPID:pve:0002F035:002A39AA:60F7D6DE:vncproxy:102:root@pam:
Jul 21 09:12:14 pve pvedaemon[191276]: <root@pam> starting task UPID:pve:0002F035:002A39AA:60F7D6DE:vncproxy:102:root@pam:
Jul 21 09:12:29 pve pvedaemon[191276]: <root@pam> end task UPID:pve:0002F035:002A39AA:60F7D6DE:vncproxy:102:root@pam: OK
Jul 21 09:12:33 pve pvedaemon[192703]: starting lxc termproxy UPID:pve:0002F0BF:002A4103:60F7D6F1:vncproxy:202:root@pam:
Jul 21 09:12:33 pve pvedaemon[191274]: <root@pam> starting task UPID:pve:0002F0BF:002A4103:60F7D6F1:vncproxy:202:root@pam:
Jul 21 09:12:33 pve pvedaemon[191276]: <root@pam> successful auth for user 'root@pam'
...

NOTE: The vncproxy is failing.


Check if the websockify service is running

ps aux |grep websoc

NOTE: The socat package needs to be installed on the server.


Another Approach

Obtain a certificate to allow the Proxmox web interface to work over https.

Then, add this certificate to the list of trusted certificates on the remote PC being used to access Proxmox.

openssl s_client -showcerts -connect 192.168.1.95:8006 /dev/null | openssl x509 -outform PEM > pve.pem

NOTE: Where:

  • 192.168.1.95:8006 is the address of the web interface of the Proxmox hypervisor.

  • pve.pem is the output file of the certificate.

Then just add this certificate and set the rights to it Always trust.

Reload the Proxmox web page and access to the console should work.

  • #1

Every time im trying to open the Webconsole/Webshell to one of my VM’s, I get the same error message:

For the Shells its:
Undefined Code: 1006

And for the Consoles its:
Failed to connect to server

You can look see them both in the screenshots I uploaded.
This is what I found in the logs:
failed waiting for client: timed out
TASK ERROR: command ‘/usr/bin/termproxy 5902 —path /vms/104 —perm VM.Console — /usr/bin/dtach -A /var/run/dtach/vzctlconsole104 -r winch -z lxc-attach —clear-env -n 104’ failed: exit code 1

This all started about a week ago. Before that everything was working just fine.

Im thankful for all answers!

  • error.PNG

    error.PNG

    10.4 KB

    · Views: 38

  • error2.PNG

    error2.PNG

    22.8 KB

    · Views: 34

oguz

oguz

Proxmox Retired Staff


  • #3

I didn’t change anything. This solution also didnt fix ist. Im thinking of reinstalling proxmox because i think my whole installation is messed up. I cant even update my node anymore!

oguz

oguz

Proxmox Retired Staff


  • #4

This solution also didnt fix ist.

can you ssh between the nodes normally?

I cant even update my node anymore!

what error do you get?

  • #5

can you ssh between the nodes normally?

what error do you get?

I get the same error as if im trying to open a normal console: The error says: Undefinded Code: 1006.

ph0x

Renowned Member


  • #6

Did you harden your ssh config in any way?

  • #7

Did you harden your ssh config in any way?

No. I only setup a homeassistant VM in the past week. Other from that I dont remember changing anything.

  • #8

Not even reinstalling works… Ive tried it with different versions of proxmox and used a CD and a USB Stick aswell…
Im getting really frustrated because I dont know what to do anymore…
I also can’t find a thread where someone had the same issue as I did.

  • #9

failed waiting for client: timed out
TASK ERROR: command ‘/usr/bin/termproxy 5900 —path /nodes/pve —perm Sys.Console — /bin/login -f root’ failed: exit code 1

oguz

oguz

Proxmox Retired Staff


  • #10

Not even reinstalling works… Ive tried it with different versions of proxmox and used a CD and a USB Stick aswell…
Im getting really frustrated because I dont know what to do anymore…
I also can’t find a thread where someone had the same issue as I did.

have you checked the thread i’ve linked in my previous post?

  • #11

have you checked the thread i’ve linked in my previous post?

Ive solved the problem already… ESET Security denied the connections and I only had to change one setting.
I was so frustrated but after remebering that I activated my ESET Security that day, everything was clear to me.
Thank you for your help!

Last edited: Aug 20, 2021

  • #12

Ive solved the problem already… ESET Security denied the connections and I only had to change one setting.
I was so frustrated but after remebering that I activated my ESET Security that day, everything was clear to me.
Thank you for your help!

I’m experiencing the same issue on a fresh installed Proxmox, and I run ESET Security, could you let me know what the one setting that needs changing in ESET is?

  • #13

  • B02B58BF-FC6E-4A7B-942D-004527C9723C.png

    B02B58BF-FC6E-4A7B-942D-004527C9723C.png

    525.3 KB

    · Views: 417

  • #14

I am having the same issue but only with one of my two servers and only using safari. I have easy workaround but would like to know what’s blocking me from using shell. Im not sure what ESET would translate to for a Mac user.
Thanks for the help in advance!

  • #15

Try manually importing the cert into the keychain and setting it to always trusted. It fixed it for me in Safari. I think my server updated it’s cert or something recently and Safari wouldn’t automatically trust the new certificate. I don’t think this would be an issue with a non-self signed cert.

  • #16

This happened to me also,
I installed Nginx-Proxy-Manager, and I tried to log in remotely. I had the same issue; The issue was corrected in my case by enabling Websockets Support, and that solved my problem; now I can connect remotely, no more code 1006.

  • #17

This happened to me also,
I installed Nginx-Proxy-Manager, and I tried to log in remotely. I had the same issue; The issue was corrected in my case by enabling Websockets Support, and that solved my problem; now I can connect remotely, no more code 1006.

I’m getting the same code 1006, and I’m also using Nginx-Proxy-Manager. But I’m fairly new, so can you please tell me how to enable the websocket support.

  • #18

I’m getting the same code 1006, and I’m also using Nginx-Proxy-Manager. But I’m fairly new, so can you please tell me how to enable the websocket support.

It’s on your Nginx-Proxy-Manger when you create a proxy, it gives you the option to enable WebSocket.

Понравилась статья? Поделить с друзьями:
  • Failed to configure ics you can connect to softap как исправить
  • Failed to compile stylesheet 1 error detected
  • Failed to clear bcb message failed to find misc partition как исправить
  • Failed to check for updates error 6 faceit
  • Failed to bind to port minecraft server как исправить