[GH-ISSUE #174] VNC Fullscreen and Send Keys not working #120

Closed
opened 2026-02-27 15:57:24 +03:00 by kerem · 30 comments
Owner

Originally created by @lord-kyron on GitHub (Aug 15, 2018).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/174

@catborise - after you changes didn't worked for me I was able to get the noVNC project from github and make it work in my setup. I have a separate "Send CtrlAltDel" button now, which is working, but the dropdown menu with the send alt+FN keys and fullscreen keys from the console-base.html are not working.
I guess it is something it they way those are being called from the html as I am getting:
referenceError: sendCtrlAltFN is not defined when I try to send alt+f2 for exmaple

Can you please tell me how those should look as I cannot find a solution for that?
Thank you!

Originally created by @lord-kyron on GitHub (Aug 15, 2018). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/174 @catborise - after you changes didn't worked for me I was able to get the noVNC project from github and make it work in my setup. I have a separate "Send CtrlAltDel" button now, which is working, but the dropdown menu with the send alt+FN keys and fullscreen keys from the console-base.html are not working. I guess it is something it they way those are being called from the html as I am getting: `referenceError: sendCtrlAltFN is not defined` when I try to send alt+f2 for exmaple Can you please tell me how those should look as I cannot find a solution for that? Thank you!
kerem closed this issue 2026-02-27 15:57:24 +03:00
Author
Owner

@catborise commented on GitHub (Aug 16, 2018):

i was working... okey i will check again

<!-- gh-comment-id:413452867 --> @catborise commented on GitHub (Aug 16, 2018): i was working... okey i will check again
Author
Owner

@lord-kyron commented on GitHub (Aug 16, 2018):

I made the fullscreen work but I had to move the fulscreen function from vnc lite file to yhe vnc base file script. However the same approach is not working with the function for the send ctrl alt fn krys as ot gives me that rfb is not defined when I move it in the vnc base. If I left them in vnc lite file they are not working at all.

<!-- gh-comment-id:413456465 --> @lord-kyron commented on GitHub (Aug 16, 2018): I made the fullscreen work but I had to move the fulscreen function from vnc lite file to yhe vnc base file script. However the same approach is not working with the function for the send ctrl alt fn krys as ot gives me that rfb is not defined when I move it in the vnc base. If I left them in vnc lite file they are not working at all.
Author
Owner

@catborise commented on GitHub (Aug 16, 2018):

okey i missed function keys to add for vnc.
it is working with spice but not vnc. i will correct it... thanks

<!-- gh-comment-id:413474370 --> @catborise commented on GitHub (Aug 16, 2018): okey i missed function keys to add for vnc. it is working with spice but not vnc. i will correct it... thanks
Author
Owner

@lord-kyron commented on GitHub (Aug 16, 2018):

Your latest chage uploaded some necessary files, but still when I clone your repo and try to use vnc I am getting:
Uncaught SyntaxError: The requested module '/static/js/novnc/core/rfb.js' does not provide an export named 'default'
in the browser console and the VNC screen is stuck on loading.
Fulscreen button is not doing anything again, but it is also not throwing any errors in the browser console.
Send ctrlAlt FN is again not working, but giving this error:
VM231:146 Uncaught ReferenceError: sendCtrlAltFN is not defined at HTMLLIElement.onclick (VM231:146)

Please, check!

<!-- gh-comment-id:413475132 --> @lord-kyron commented on GitHub (Aug 16, 2018): Your latest chage uploaded some necessary files, but still when I clone your repo and try to use vnc I am getting: Uncaught SyntaxError: The requested module '/static/js/novnc/core/rfb.js' does not provide an export named 'default' in the browser console and the VNC screen is stuck on loading. Fulscreen button is not doing anything again, but it is also not throwing any errors in the browser console.\ Send ctrlAlt FN is again not working, but giving this error: VM231:146 Uncaught ReferenceError: sendCtrlAltFN is not defined at HTMLLIElement.onclick (VM231:146) Please, check!
Author
Owner

@catborise commented on GitHub (Aug 16, 2018):

there is a problem with typescript 6 build operation. lite version of console access does not work. novnc suggest that compile files with npm for speed.. i did it but some other issues appeared. i am workin on it.

<!-- gh-comment-id:413526496 --> @catborise commented on GitHub (Aug 16, 2018): there is a problem with typescript 6 build operation. lite version of console access does not work. novnc suggest that compile files with npm for speed.. i did it but some other issues appeared. i am workin on it.
Author
Owner

@lord-kyron commented on GitHub (Aug 16, 2018):

Great, thank you! I will be waiting for the working version. I've downloaded and install with npm the latest version of noVNC from their repo already and it is working for me but after may tries I managed to make only the fulscreen button to work. The FN keys are still not working and I gave up on them, so I will be very grateful if you make it work out-of-the-box!
Thank you for the time you spend on this one!
Please, when you have some more time check on my request about the visual modifications that I suggested!

<!-- gh-comment-id:413528163 --> @lord-kyron commented on GitHub (Aug 16, 2018): Great, thank you! I will be waiting for the working version. I've downloaded and install with npm the latest version of noVNC from their repo already and it is working for me but after may tries I managed to make only the fulscreen button to work. The FN keys are still not working and I gave up on them, so I will be very grateful if you make it work out-of-the-box! Thank you for the time you spend on this one! Please, when you have some more time check on my request about the visual modifications that I suggested!
Author
Owner

@lord-kyron commented on GitHub (Aug 21, 2018):

@catborise - any success fixing the noVNC issues?

<!-- gh-comment-id:414590927 --> @lord-kyron commented on GitHub (Aug 21, 2018): @catborise - any success fixing the noVNC issues?
Author
Owner

@catborise commented on GitHub (Aug 27, 2018):

it is fixed. it takes time to fix because of vacation. sorry.
for now it should work.

<!-- gh-comment-id:416221778 --> @catborise commented on GitHub (Aug 27, 2018): it is fixed. it takes time to fix because of vacation. sorry. for now it should work.
Author
Owner

@lord-kyron commented on GitHub (Aug 27, 2018):

Still not working for me for some reason. I will explain the case to you - I am using nginx as reverse proxy to get access to vns websocket over port 443. It is working with the initial old verision fo the retspen repo. It was even working when your first commit was borken and I used the novnc git version. But now after your commit from today it is not working. I did not changed anything it the way I am reverse proxying the websockets, it just wont work this time. I left with ome feeling that the novc app itself is not working as expected as the message this time is 1006 - connection closed. all times.
I am running over https strictly as I cannot test over port 80 http but I think it will be the same.
I order to reverse proxy the websockets I am injecting a location into the vnc url to active the proxy. This was working util today. However, I cannot see where the problem can be with nginx or even with the URL. Can you please double check if have not forget to commit something or add some files like last time? Are you able to test the VNC is working on your side also?

<!-- gh-comment-id:416340043 --> @lord-kyron commented on GitHub (Aug 27, 2018): Still not working for me for some reason. I will explain the case to you - I am using nginx as reverse proxy to get access to vns websocket over port 443. It is working with the initial old verision fo the retspen repo. It was even working when your first commit was borken and I used the novnc git version. But now after your commit from today it is not working. I did not changed anything it the way I am reverse proxying the websockets, it just wont work this time. I left with ome feeling that the novc app itself is not working as expected as the message this time is 1006 - connection closed. all times. I am running over https strictly as I cannot test over port 80 http but I think it will be the same. I order to reverse proxy the websockets I am injecting a location into the vnc url to active the proxy. This was working util today. However, I cannot see where the problem can be with nginx or even with the URL. Can you please double check if have not forget to commit something or add some files like last time? Are you able to test the VNC is working on your side also?
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

there is nothing much changed. novnc version is same like git version. i only add sending ctrl alt fn function...

you should check error with chrome tools(open vnc console page and right click to inspect) If there is an error it shows.
Did you reload all javascripts with ctrl-f5 ?

<!-- gh-comment-id:416458056 --> @catborise commented on GitHub (Aug 28, 2018): there is nothing much changed. novnc version is same like git version. i only add sending ctrl alt fn function... you should check error with chrome tools(open vnc console page and right click to inspect) If there is an error it shows. Did you reload all javascripts with ctrl-f5 ?
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

Yes already checked with console of chrome. It gives several warnings but the only error is 1006 connection closed. I am able to telenet to port 6080 of the localhost which means that novnc is maybe running there but it wont open. Before I made my two rows of modifications to inject a location into the url for the proxying it was giving me error that cannot connect to this url and stuff, but after I did those same modifications I was using before it seems like connecting and being closed immediately.

<!-- gh-comment-id:416459597 --> @lord-kyron commented on GitHub (Aug 28, 2018): Yes already checked with console of chrome. It gives several warnings but the only error is 1006 connection closed. I am able to telenet to port 6080 of the localhost which means that novnc is maybe running there but it wont open. Before I made my two rows of modifications to inject a location into the url for the proxying it was giving me error that cannot connect to this url and stuff, but after I did those same modifications I was using before it seems like connecting and being closed immediately.
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

can you please run the "novncd" with --debug --verbose..
firstly, stop novncd which is run with webvirtcloud . (kill it)
then start it with specified parameters.
example;
/srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd -d -v

then try to open console with web browser. check output of novncd, if there is anything unusual

<!-- gh-comment-id:416467544 --> @catborise commented on GitHub (Aug 28, 2018): can you please run the "novncd" with --debug --verbose.. firstly, stop novncd which is run with webvirtcloud . (kill it) then start it with specified parameters. example; /srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd -d -v then try to open console with web browser. check output of novncd, if there is anything unusual
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

`/srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd -d -v
2018-08-28 07:16:28,244 - websocket.type - INFO : WebSocket server settings:
2018-08-28 07:16:28,244 - websocket.type - INFO : - Listen on 0.0.0.0:6080
2018-08-28 07:16:28,244 - websocket.type - INFO : - Flash security policy server
2018-08-28 07:16:28,245 - websocket.type - INFO : - SSL/TLS support
2018-08-28 07:16:28,245 - websocket.type - INFO : - proxying from 0.0.0.0:6080 to ignore:ignore
2018-08-28 07:16:55,892 - websocket.type - DEBUG : 192.168.1.125: new handler Process
2018-08-28 07:16:55,899 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] "GET /novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee HTTP/1.1" 101 -
2018-08-28 07:16:55,901 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] 192.168.1.125: Plain non-SSL (ws://) WebSocket connection
2018-08-28 07:16:55,902 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] 192.168.1.125: Version hybi-13, base64: 'False'
2018-08-28 07:16:55,903 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] 192.168.1.125: Path: '/novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee'
2018-08-28 07:16:55,922 - root - DEBUG : Connection infos :

  • connhost : 'localhost'
  • connport : '22'
  • connuser : 'qemu'
  • conntype : '1'
  • console_host : '127.0.0.1'
  • console_port : '5901'
  • console_socket : 'None'

2018-08-28 07:16:55,923 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] Need a tunnel to access console but can't mount one because it's not a SSH host
2018-08-28 07:16:55,924 - websocket.type - INFO : handler exception: <bound method NovaProxyRequestHandler.msg of <main.NovaProxyRequestHandler object at 0x7f76e808ff90>>
2018-08-28 07:16:55,924 - websocket.type - DEBUG : exception
Traceback (most recent call last):
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 930, in top_new_client
client = self.do_handshake(startsock, address)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 860, in do_handshake
self.RequestHandlerClass(retsock, address, self)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 114, in init
SimpleHTTPRequestHandler.init(self, req, addr, server)
File "/usr/lib/python2.7/SocketServer.py", line 652, in init
self.handle()
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 581, in handle
SimpleHTTPRequestHandler.handle(self)
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 543, in do_GET
if not self.handle_websocket():
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 531, in handle_websocket
self.new_websocket_client()
File "/srv/webvirtcloud/console/novncd", line 222, in new_websocket_client
self._new_client(daemon, socket_factory)
File "/srv/webvirtcloud/console/novncd", line 162, in _new_client
raise Exception(self.msg)
Exception: <bound method NovaProxyRequestHandler.msg of <main.NovaProxyRequestHandler object at 0x7f76e808ff90>>
2018-08-28 07:16:55,928 - websocket.type - DEBUG : Ignoring interrupted syscall
2018-08-28 07:16:56,524 - websocket.type - DEBUG : 192.168.1.125: new handler Process
2018-08-28 07:16:56,530 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] "GET /novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee HTTP/1.1" 101 -
2018-08-28 07:16:56,532 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] 192.168.1.125: Plain non-SSL (ws://) WebSocket connection
2018-08-28 07:16:56,533 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] 192.168.1.125: Version hybi-13, base64: 'False'
2018-08-28 07:16:56,535 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] 192.168.1.125: Path: '/novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee'
2018-08-28 07:16:56,553 - root - DEBUG : Connection infos :

  • connhost : 'localhost'
  • connport : '22'
  • connuser : 'qemu'
  • conntype : '1'
  • console_host : '127.0.0.1'
  • console_port : '5901'
  • console_socket : 'None'

2018-08-28 07:16:56,555 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] Need a tunnel to access console but can't mount one because it's not a SSH host
2018-08-28 07:16:56,555 - websocket.type - INFO : handler exception: <bound method NovaProxyRequestHandler.msg of <main.NovaProxyRequestHandler object at 0x7f76e808ff90>>
2018-08-28 07:16:56,555 - websocket.type - DEBUG : exception
Traceback (most recent call last):
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 930, in top_new_client
client = self.do_handshake(startsock, address)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 860, in do_handshake
self.RequestHandlerClass(retsock, address, self)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 114, in init
SimpleHTTPRequestHandler.init(self, req, addr, server)
File "/usr/lib/python2.7/SocketServer.py", line 652, in init
self.handle()
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 581, in handle
SimpleHTTPRequestHandler.handle(self)
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 543, in do_GET
if not self.handle_websocket():
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 531, in handle_websocket
self.new_websocket_client()
File "/srv/webvirtcloud/console/novncd", line 222, in new_websocket_client
self._new_client(daemon, socket_factory)
File "/srv/webvirtcloud/console/novncd", line 162, in _new_client
raise Exception(self.msg)
Exception: <bound method NovaProxyRequestHandler.msg of <main.NovaProxyRequestHandler object at 0x7f76e808ff90>>
2018-08-28 07:16:56,558 - websocket.type - DEBUG : Ignoring interrupted syscall`

this is all. It seems there is some problem, but I don't get what.

<!-- gh-comment-id:416477670 --> @lord-kyron commented on GitHub (Aug 28, 2018): `/srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd -d -v 2018-08-28 07:16:28,244 - websocket.type - INFO : WebSocket server settings: 2018-08-28 07:16:28,244 - websocket.type - INFO : - Listen on 0.0.0.0:6080 2018-08-28 07:16:28,244 - websocket.type - INFO : - Flash security policy server 2018-08-28 07:16:28,245 - websocket.type - INFO : - SSL/TLS support 2018-08-28 07:16:28,245 - websocket.type - INFO : - proxying from 0.0.0.0:6080 to ignore:ignore 2018-08-28 07:16:55,892 - websocket.type - DEBUG : 192.168.1.125: new handler Process 2018-08-28 07:16:55,899 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] "GET /novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee HTTP/1.1" 101 - 2018-08-28 07:16:55,901 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] 192.168.1.125: Plain non-SSL (ws://) WebSocket connection 2018-08-28 07:16:55,902 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] 192.168.1.125: Version hybi-13, base64: 'False' 2018-08-28 07:16:55,903 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] 192.168.1.125: Path: '/novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee' 2018-08-28 07:16:55,922 - root - DEBUG : Connection infos : - connhost : 'localhost' - connport : '22' - connuser : 'qemu' - conntype : '1' - console_host : '127.0.0.1' - console_port : '5901' - console_socket : 'None' 2018-08-28 07:16:55,923 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:55] Need a tunnel to access console but can't mount one because it's not a SSH host 2018-08-28 07:16:55,924 - websocket.type - INFO : handler exception: <bound method NovaProxyRequestHandler.msg of <__main__.NovaProxyRequestHandler object at 0x7f76e808ff90>> 2018-08-28 07:16:55,924 - websocket.type - DEBUG : exception Traceback (most recent call last): File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 930, in top_new_client client = self.do_handshake(startsock, address) File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 860, in do_handshake self.RequestHandlerClass(retsock, address, self) File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 114, in __init__ SimpleHTTPRequestHandler.__init__(self, req, addr, server) File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__ self.handle() File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 581, in handle SimpleHTTPRequestHandler.handle(self) File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle self.handle_one_request() File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request method() File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 543, in do_GET if not self.handle_websocket(): File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 531, in handle_websocket self.new_websocket_client() File "/srv/webvirtcloud/console/novncd", line 222, in new_websocket_client self._new_client(daemon, socket_factory) File "/srv/webvirtcloud/console/novncd", line 162, in _new_client raise Exception(self.msg) Exception: <bound method NovaProxyRequestHandler.msg of <__main__.NovaProxyRequestHandler object at 0x7f76e808ff90>> 2018-08-28 07:16:55,928 - websocket.type - DEBUG : Ignoring interrupted syscall 2018-08-28 07:16:56,524 - websocket.type - DEBUG : 192.168.1.125: new handler Process 2018-08-28 07:16:56,530 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] "GET /novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee HTTP/1.1" 101 - 2018-08-28 07:16:56,532 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] 192.168.1.125: Plain non-SSL (ws://) WebSocket connection 2018-08-28 07:16:56,533 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] 192.168.1.125: Version hybi-13, base64: 'False' 2018-08-28 07:16:56,535 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] 192.168.1.125: Path: '/novncd/:443/websockify?token=1-75cb7be4-0dd4-4e7a-a56f-918b25ef9eee' 2018-08-28 07:16:56,553 - root - DEBUG : Connection infos : - connhost : 'localhost' - connport : '22' - connuser : 'qemu' - conntype : '1' - console_host : '127.0.0.1' - console_port : '5901' - console_socket : 'None' 2018-08-28 07:16:56,555 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] Need a tunnel to access console but can't mount one because it's not a SSH host 2018-08-28 07:16:56,555 - websocket.type - INFO : handler exception: <bound method NovaProxyRequestHandler.msg of <__main__.NovaProxyRequestHandler object at 0x7f76e808ff90>> 2018-08-28 07:16:56,555 - websocket.type - DEBUG : exception Traceback (most recent call last): File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 930, in top_new_client client = self.do_handshake(startsock, address) File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 860, in do_handshake self.RequestHandlerClass(retsock, address, self) File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 114, in __init__ SimpleHTTPRequestHandler.__init__(self, req, addr, server) File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__ self.handle() File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 581, in handle SimpleHTTPRequestHandler.handle(self) File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle self.handle_one_request() File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request method() File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 543, in do_GET if not self.handle_websocket(): File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/websockify/websocket.py", line 531, in handle_websocket self.new_websocket_client() File "/srv/webvirtcloud/console/novncd", line 222, in new_websocket_client self._new_client(daemon, socket_factory) File "/srv/webvirtcloud/console/novncd", line 162, in _new_client raise Exception(self.msg) Exception: <bound method NovaProxyRequestHandler.msg of <__main__.NovaProxyRequestHandler object at 0x7f76e808ff90>> 2018-08-28 07:16:56,558 - websocket.type - DEBUG : Ignoring interrupted syscall` this is all. It seems there is some problem, but I don't get what.
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

does webvirtcloud run on a kvm host?

<!-- gh-comment-id:416482611 --> @catborise commented on GitHub (Aug 28, 2018): does webvirtcloud run on a kvm host?
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

expected output example(webvirtcloud run on a vm);

/srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd -d -v
2018-08-28 10:33:43,621 - websocket.type - INFO : WebSocket server settings:
2018-08-28 10:33:43,621 - websocket.type - INFO : - Listen on 0.0.0.0:6080
2018-08-28 10:33:43,621 - websocket.type - INFO : - Flash security policy server
2018-08-28 10:33:43,621 - websocket.type - INFO : - No SSL/TLS support (no cert file)
2018-08-28 10:33:43,622 - websocket.type - INFO : - proxying from 0.0.0.0:6080 to ignore:ignore
2018-08-28 10:33:58,216 - websocket.type - DEBUG : 192.168.192.6: new handler Process
2018-08-28 10:33:58,309 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] "GET /websockify?token=4-2b1f7b9e-f95a-4e52-b997-e69fc6611131 HTTP/1.1" 101 -
2018-08-28 10:33:58,310 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] 192.168.192.6: Plain non-SSL (ws://) WebSocket connection
2018-08-28 10:33:58,310 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] 192.168.192.6: Version hybi-13, base64: 'False'
2018-08-28 10:33:58,311 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] 192.168.192.6: Path: '/websockify?token=4-2b1f7b9e-f95a-4e52-b997-e69fc6611131'
2018-08-28 10:33:58,339 - root - DEBUG : Connection infos :

  • connhost : '10.20.30.108'
  • connport : '22'
  • connuser : 'webvirtmgr'
  • conntype : '1'
  • console_host : '0.0.0.0'
  • console_port : '5911'
  • console_socket : 'None'

2018-08-28 10:33:58,340 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] connecting to: 10.20.30.108:5911

Traffic Legend:
} - Client receive
}. - Client receive partial
{ - Target receive

>  - Target send
>. - Target send partial
<  - Client send
<. - Client send partial
<!-- gh-comment-id:416483301 --> @catborise commented on GitHub (Aug 28, 2018): expected output example(webvirtcloud run on a vm); /srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd -d -v 2018-08-28 10:33:43,621 - websocket.type - INFO : WebSocket server settings: 2018-08-28 10:33:43,621 - websocket.type - INFO : - Listen on 0.0.0.0:6080 2018-08-28 10:33:43,621 - websocket.type - INFO : - Flash security policy server 2018-08-28 10:33:43,621 - websocket.type - INFO : - No SSL/TLS support (no cert file) 2018-08-28 10:33:43,622 - websocket.type - INFO : - proxying from 0.0.0.0:6080 to ignore:ignore 2018-08-28 10:33:58,216 - websocket.type - DEBUG : 192.168.192.6: new handler Process 2018-08-28 10:33:58,309 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] "GET /websockify?token=4-2b1f7b9e-f95a-4e52-b997-e69fc6611131 HTTP/1.1" 101 - 2018-08-28 10:33:58,310 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] 192.168.192.6: Plain non-SSL (ws://) WebSocket connection 2018-08-28 10:33:58,310 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] 192.168.192.6: Version hybi-13, base64: 'False' 2018-08-28 10:33:58,311 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] 192.168.192.6: Path: '/websockify?token=4-2b1f7b9e-f95a-4e52-b997-e69fc6611131' 2018-08-28 10:33:58,339 - root - DEBUG : Connection infos : - connhost : '10.20.30.108' - connport : '22' - connuser : 'webvirtmgr' - conntype : '1' - console_host : '0.0.0.0' - console_port : '5911' - console_socket : 'None' 2018-08-28 10:33:58,340 - websocket.type - INFO : 192.168.192.6 - - [28/Aug/2018 10:33:58] connecting to: 10.20.30.108:5911 Traffic Legend: } - Client receive }. - Client receive partial { - Target receive > - Target send >. - Target send partial < - Client send <. - Client send partial
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

Yes it is running on the KVM host and I even have some VMs with VNC ports there.
Strange is when I deploy the original retspen version of vnc the same config with the same proxing over 443 is working fine and the console is opening fine.

<!-- gh-comment-id:416486295 --> @lord-kyron commented on GitHub (Aug 28, 2018): Yes it is running on the KVM host and I even have some VMs with VNC ports there. Strange is when I deploy the original retspen version of vnc the same config with the same proxing over 443 is working fine and the console is opening fine.
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

yes, strange it is.
i made tests with two different webvirtcloud installation, there is not any problem. it is working smootly.

problem key statement is: websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] Need a tunnel to access console but can't mount one because it's not a SSH host

<!-- gh-comment-id:416487940 --> @catborise commented on GitHub (Aug 28, 2018): yes, strange it is. i made tests with two different webvirtcloud installation, there is not any problem. it is working smootly. problem key statement is: websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 07:16:56] Need a tunnel to access console but can't mount one because it's not a SSH host
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

could you check it with spice?

open virt-manager. select any vm, enter configuration.
image

change vnc to spice server.
make video vga
(it is required shutdown vm and start it again after changes)

<!-- gh-comment-id:416488891 --> @catborise commented on GitHub (Aug 28, 2018): could you check it with spice? open virt-manager. select any vm, enter configuration. ![image](https://user-images.githubusercontent.com/1725643/44709101-7d204400-aab1-11e8-9b5c-db1d139d1fbf.png) change vnc to spice server. make video vga (it is required shutdown vm and start it again after changes)
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

I will try but I need some more time to set it up.
However - I think for some reason despite starting the novnc with /srv/webvirtcloud/console/novncd it is not taking the settings there.
I've made a test and changed some setting in this file - like connhost and cert and other and despite I've changed it it is still starting with the same settings as before and obviously not working as expected.
Example is that I've changed connhost which is set to be the same as WS_HOST directly to "0.0.0.0" but it is still telling me that connhost is "localhost" not 0.0.0.0

`2018-08-28 08:02:19,641 - root - DEBUG : Connection infos :

  • connhost : 'localhost'
  • connport : '22'
  • connuser : 'qemu'
  • conntype : '1'
  • console_host : '127.0.0.1'
  • console_port : '5901'
  • console_socket : 'None'`

But when the console is started on the other side, I get:
2018-08-28 08:17:24,115 - websocket.type - INFO : WebSocket server settings: 2018-08-28 08:17:24,115 - websocket.type - INFO : - Listen on 0.0.0.0:6080 2018-08-28 08:17:24,115 - websocket.type - INFO : - Flash security policy server 2018-08-28 08:17:24,116 - websocket.type - INFO : - SSL/TLS support 2018-08-28 08:17:24,116 - websocket.type - INFO : - proxying from 0.0.0.0:6080 to ignore:ignore
It seems the problem is when it tries to connect.

Also another strange thing - it is telling me:
2018-08-28 08:02:19,097 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 08:02:19] 192.168.1.125: Plain no n-SSL (ws://) WebSocket connection
which is not true. I have configured a local certificate which I am using both for nginx httpsd and for the VNC connection encryption and it is configured in all config files where it needs to be. Even in /srv/webvirtcloud/console/novncd on the top.

<!-- gh-comment-id:416491056 --> @lord-kyron commented on GitHub (Aug 28, 2018): I will try but I need some more time to set it up. However - I think for some reason despite starting the novnc with /srv/webvirtcloud/console/novncd it is not taking the settings there. I've made a test and changed some setting in this file - like connhost and cert and other and despite I've changed it it is still starting with the same settings as before and obviously not working as expected. Example is that I've changed connhost which is set to be the same as WS_HOST directly to "0.0.0.0" but it is still telling me that connhost is "localhost" not 0.0.0.0 `2018-08-28 08:02:19,641 - root - DEBUG : Connection infos : - connhost : 'localhost' - connport : '22' - connuser : 'qemu' - conntype : '1' - console_host : '127.0.0.1' - console_port : '5901' - console_socket : 'None'` But when the console is started on the other side, I get: `2018-08-28 08:17:24,115 - websocket.type - INFO : WebSocket server settings: 2018-08-28 08:17:24,115 - websocket.type - INFO : - Listen on 0.0.0.0:6080 2018-08-28 08:17:24,115 - websocket.type - INFO : - Flash security policy server 2018-08-28 08:17:24,116 - websocket.type - INFO : - SSL/TLS support 2018-08-28 08:17:24,116 - websocket.type - INFO : - proxying from 0.0.0.0:6080 to ignore:ignore` It seems the problem is when it tries to connect. Also another strange thing - it is telling me: `2018-08-28 08:02:19,097 - websocket.type - INFO : 192.168.1.125 - - [28/Aug/2018 08:02:19] 192.168.1.125: Plain no n-SSL (ws://) WebSocket connection` which is not true. I have configured a local certificate which I am using both for nginx httpsd and for the VNC connection encryption and it is configured in all config files where it needs to be. Even in /srv/webvirtcloud/console/novncd on the top.
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

I think this guy is describing something similar but there is no fix described:
https://github.com/retspen/webvirtmgr/issues/595

<!-- gh-comment-id:416492997 --> @lord-kyron commented on GitHub (Aug 28, 2018): I think this guy is describing something similar but there is no fix described: https://github.com/retspen/webvirtmgr/issues/595
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

I've made it work, but I have a strange behaviour now.
The VM xml was configure to listen for VNC to 127.0.0.1
I've changed that to 0.0.0.0 and it worked and now it is opening the console.
It is just strange as it is opening like 2 console windows in the same html page one under the another.
I am attaching a picture to get what I am saying. I've zoomed out the browser so that the two windows can be visible.
screenshot from 2018-08-28 11-40-35
DO you have any idea why this is hapnening and how can it be fixed? Something in the HTML or?
Everything else, like FN keys and fullscreen is working fine now!

<!-- gh-comment-id:416500803 --> @lord-kyron commented on GitHub (Aug 28, 2018): I've made it work, but I have a strange behaviour now. The VM xml was configure to listen for VNC to 127.0.0.1 I've changed that to 0.0.0.0 and it worked and now it is opening the console. It is just strange as it is opening like 2 console windows in the same html page one under the another. I am attaching a picture to get what I am saying. I've zoomed out the browser so that the two windows can be visible. ![screenshot from 2018-08-28 11-40-35](https://user-images.githubusercontent.com/39150122/44711592-5fee7400-aab7-11e8-933d-2d27f21011c3.png) DO you have any idea why this is hapnening and how can it be fixed? Something in the HTML or? Everything else, like FN keys and fullscreen is working fine now!
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

i think i find your error is related with console_host.
your "console_host" = 127.0.0.1 and it causes that error.
you can change it from vm xml (127.0.0.1 -> 0.0.0.0)
or enable vnc listen from:
/etc/libvirt/qemu.conf
vnc_listen = "0.0.0.0"
spice_listen = "0.0.0.0"
sed -i 's/#vnc_listen/vnc_listen/g' /etc/libvirt/qemu.conf
sed -i 's/#spice_listen/spice_listen/g' /etc/libvirt/qemu.conf
then restart libvirt(it is safe to restart)

// https://github.com/retspen/webvirtmgr/issues/595
i think it is resolved with console/view.py modification of specified issue
ws_port = console_websocket_port if console_websocket_port else WS_PORT ws_host = WS_PUBLIC_HOST if WS_PUBLIC_HOST else request.get_host()

in the view.py it tries to get websocket port from vm config. if it is not specified with vm config it sets default one which is 6080(settings.py)

(you write before me :) )

<!-- gh-comment-id:416502148 --> @catborise commented on GitHub (Aug 28, 2018): i think i find your error is related with console_host. your "console_host" = 127.0.0.1 and it causes that error. you can change it from vm xml (127.0.0.1 -> 0.0.0.0) or enable vnc listen from: /etc/libvirt/qemu.conf vnc_listen = "0.0.0.0" spice_listen = "0.0.0.0" `sed -i 's/#vnc_listen/vnc_listen/g' /etc/libvirt/qemu.conf` `sed -i 's/#spice_listen/spice_listen/g' /etc/libvirt/qemu.conf` then restart libvirt(it is safe to restart) // https://github.com/retspen/webvirtmgr/issues/595 i think it is resolved with console/view.py modification of specified issue `ws_port = console_websocket_port if console_websocket_port else WS_PORT ws_host = WS_PUBLIC_HOST if WS_PUBLIC_HOST else request.get_host()` in the view.py it tries to get websocket port from vm config. if it is not specified with vm config it sets default one which is 6080(settings.py) (you write before me :) )
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

Yes, great! It solves the issue. I just need to set my VMs to listen to 0.0.0.0 in xml!
And what about the two console screens in the html that are opening?
I've attached a screenshot above.

<!-- gh-comment-id:416504266 --> @lord-kyron commented on GitHub (Aug 28, 2018): Yes, great! It solves the issue. I just need to set my VMs to listen to 0.0.0.0 in xml! And what about the two console screens in the html that are opening? I've attached a screenshot above.
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

whats that :))))))))))))))))) mine is like that. i havent noticed before 👍
i am checking now :) it is hillarious

<!-- gh-comment-id:416505557 --> @catborise commented on GitHub (Aug 28, 2018): whats that :))))))))))))))))) mine is like that. i havent noticed before 👍 i am checking now :) it is hillarious
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

by the way, can you please check vnc console from instance details i add full vnc console option to vm.
enter instance detail -> access -> console-dropdown -> console-full

<!-- gh-comment-id:416507351 --> @catborise commented on GitHub (Aug 28, 2018): by the way, can you please check vnc console from instance details i add full vnc console option to vm. enter instance detail -> access -> console-dropdown -> console-full
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

I cannot see such option in my setup. But my setup is kind of a big mix. However, I am using your HTMLs for console, but I am not sure I use them for instance details.
Can you give me refenrece where the change is

<!-- gh-comment-id:416515129 --> @lord-kyron commented on GitHub (Aug 28, 2018): I cannot see such option in my setup. But my setup is kind of a big mix. However, I am using your HTMLs for console, but I am not sure I use them for instance details. Can you give me refenrece where the change is
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

@catborise I was able to find the html where you expose this functionality and added it to my setup but full console is opening and not working.
It gives me failed to connect to server.

<!-- gh-comment-id:416525954 --> @lord-kyron commented on GitHub (Aug 28, 2018): @catborise I was able to find the html where you expose this functionality and added it to my setup but full console is opening and not working. It gives me failed to connect to server.
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

@catborise man. it is working. My mistake - I've fogot to add the value for the proxy path to the URL of the full vnc html file. I've done this and it is working like a charm now.
So - the only problem here is to fix the two screens in the vnc lite html
Found anything related to it?

P.S. - and wanted to ask you is there a way (or if it is already possible - how?) to get the URL for the console so that I can open it with some desktop application, not only from web?

<!-- gh-comment-id:416527855 --> @lord-kyron commented on GitHub (Aug 28, 2018): @catborise man. it is working. My mistake - I've fogot to add the value for the proxy path to the URL of the full vnc html file. I've done this and it is working like a charm now. So - the only problem here is to fix the two screens in the vnc lite html Found anything related to it? P.S. - and wanted to ask you is there a way (or if it is already possible - how?) to get the URL for the console so that I can open it with some desktop application, not only from web?
Author
Owner

@catborise commented on GitHub (Aug 28, 2018):

because of specified script it calls a function twice. so it produces two same console app.
loader.src = "{% static "js/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js" %}";

in vnc-lite.html, specified script statement should be true...

i am committing now.

<!-- gh-comment-id:416573031 --> @catborise commented on GitHub (Aug 28, 2018): because of specified script it calls a function twice. so it produces two same console app. loader.src = "{% static "js/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js" %}"; in vnc-lite.html, specified script statement should be true... <script type="module"> window._noVNC_has_module_support = false;</script> i am committing now.
Author
Owner

@lord-kyron commented on GitHub (Aug 28, 2018):

@catborise - you are great man!
Thanks, everything is working as expected now!
I guess you can open a merge request to the master repo now!
I am closing the issue!

<!-- gh-comment-id:416598204 --> @lord-kyron commented on GitHub (Aug 28, 2018): @catborise - you are great man! Thanks, everything is working as expected now! I guess you can open a merge request to the master repo now! I am closing the issue!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#120
No description provided.