<div dir="ltr"><div><br></div><div>Attached Firefox and Chrome screenshots of Certificates.<br></div><div>errors thrown by websockify<br>Firefox: 1: handler exception: [Errno 1] _ssl.c:1359: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca<br>
</div><div>Chrome: 11: handler exception: WSRequestHandler instance has no attribute &#39;last_code&#39;<br><br></div><div>For Firefox it looks like firefox needs a bit of proding to get it to accept the Websocket CA Cert:<br>
<a href="https://github.com/kanaka/websockify/issues/34">https://github.com/kanaka/websockify/issues/34</a><br><br></div><div>The error generated by chrome seems to be a websockify issue: <br><a href="https://github.com/kanaka/noVNC/issues/86">https://github.com/kanaka/noVNC/issues/86</a><br>
<a href="https://github.com/kanaka/websockify/issues/22#issuecomment-3263065">https://github.com/kanaka/websockify/issues/22#issuecomment-3263065</a><br><a href="https://github.com/kanaka/noVNC/issues/177">https://github.com/kanaka/noVNC/issues/177</a><br>
<br></div><div>In
 any event I got both Chrome and Firefox working by manually browsing 
to: <a href="https://ENGINEFQDN:6100">https://ENGINEFQDN:6100</a> and accepting the self signed cert<br></div><div><br>Not pretty but it worked.<br></div><div><br></div>- DHC</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Aug 1, 2013 at 2:08 PM, Alon Bar-Lev <span dir="ltr">&lt;<a href="mailto:alonbl@redhat.com" target="_blank">alonbl@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Dead Horse&quot; &lt;<a href="mailto:deadhorseconsulting@gmail.com">deadhorseconsulting@gmail.com</a>&gt;<br>
</div><div class="im">&gt; To: &quot;Alon Bar-Lev&quot; &lt;<a href="mailto:alonbl@redhat.com">alonbl@redhat.com</a>&gt;<br>
&gt; Cc: &quot;users&quot; &lt;<a href="mailto:users@ovirt.org">users@ovirt.org</a>&gt;<br>
&gt; Sent: Thursday, August 1, 2013 9:59:14 PM<br>
&gt; Subject: Re: [Users] Questions on ovirt 3.3 browser based spice/novnc working<br>
&gt;<br>
&gt; That did the trick for getting the websocket proxy configured ( i backed<br>
&gt; out all my changes prior to running engine-setup). I do notice that it<br>
&gt; still seems to leave the ovirt-websocket-proxy.conf in it&#39;s default state<br>
&gt; and makes no dedications to it. Instead it generated<br>
&gt; /etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf<br>
&gt;<br>
&gt; I also noted engine setup generated:<br>
&gt; /etc/pki/ovirt-engine/certs/websocket-proxy.cer<br>
&gt; /etc/pki/ovirt-engine/keys/websocket-proxy.p12<br>
&gt; /etc/pki/ovirt-engine/keys/websocket-proxy.key.nopass<br>
&gt; /etc/pki/ovirt-engine/requests/websocket-proxy.req<br>
&gt;<br>
&gt; None the less still neither spice nor novnc will connect. I tried changing<br>
&gt; Engine:6100 to EngineIP:6100 so that IP would be used instead. However<br>
&gt; using either the FQDN or IP still yielded the same results.<br>
<br>
</div>You should not touch anything... all should be configured...<br>
Make sure your browser trust the *CA* of the engine and not the engine certificate directly.<br>
And try to open vnc console via webadmin.<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; There was nothing interesting in the logs either. I do notice that whilst<br>
&gt; the websocket-proxy service is running I never see an websockify processes<br>
&gt; but instead in /var/log/messages I see:<br>
&gt; Aug  1 13:44:10 ovirtfoo ovirt-websocket-proxy.py[435]: 11: handler<br>
&gt; exception: [Errno 1] _ssl.c:1359: error:14094418:SSL<br>
&gt; routines:SSL3_READ_BYTES:tlsv1 alert unknown ca<br>
&gt;<br>
&gt; Thus I changed SSL_ONLY=True to SSL_ONLY=False in<br>
&gt; /etc/ovirt-engine/ovirt-websocket-proxy.conf.d/10-setup.conf and restarted<br>
&gt; engine and websocket-proxy<br>
&gt; No dice it still generated the same error as above during an attempted<br>
&gt; connection to /var/log/messages<br>
&gt;<br>
&gt; I also not the following error message at VM power off (albeit I am<br>
&gt; guessing it has nothing to do with this issue):<br>
&gt; 2013-08-01 13:41:03,742 ERROR<br>
&gt; [org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand] (pool-6-thread-50)<br>
&gt; [304efb3e] VDS::destroy Failed destroying vm<br>
&gt; fec3260c-871a-4fbe-a006-9eee4fbfbbcc in vds =<br>
&gt; 5713e5c8-6252-4bce-a3f6-bbd8e1e6eb57 : ovirtnodefoo, error =<br>
&gt; org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException:<br>
&gt; VDSGenericException: VDSErrorException: Failed to DestroyVDS, error =<br>
&gt; Unexpected exception<br>
&gt;<br>
&gt; - DHC<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Aug 1, 2013 at 1:07 PM, Alon Bar-Lev &lt;<a href="mailto:alonbl@redhat.com">alonbl@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; If you install the proxy on the engine machine you just need:<br>
&gt; &gt;<br>
&gt; &gt; # yum install ovirt-engine-websocket-proxy<br>
&gt; &gt; # engine-setup<br>
&gt; &gt;<br>
&gt; &gt; then answer yes when prompt if you like to configure websocket proxy.<br>
&gt; &gt;<br>
&gt; &gt; you can execute engine-setup again even if you already installed.<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; From: &quot;Dead Horse&quot; &lt;<a href="mailto:deadhorseconsulting@gmail.com">deadhorseconsulting@gmail.com</a>&gt;<br>
&gt; &gt; &gt; To: &quot;&lt;<a href="mailto:users@ovirt.org">users@ovirt.org</a>&gt;&quot; &lt;<a href="mailto:users@ovirt.org">users@ovirt.org</a>&gt;<br>
&gt; &gt; &gt; Sent: Thursday, August 1, 2013 9:01:47 PM<br>
&gt; &gt; &gt; Subject: [Users] Questions on ovirt 3.3 browser based spice/novnc working<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; After Referencing:<br>
&gt; &gt; &gt; <a href="http://www.ovirt.org/Features/noVNC_console" target="_blank">http://www.ovirt.org/Features/noVNC_console</a><br>
&gt; &gt; &gt; <a href="http://www.ovirt.org/Features/SpiceHTML5" target="_blank">http://www.ovirt.org/Features/SpiceHTML5</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; and looking at some of the related engine code.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I am still attempting to get the spice/novnc browser based consoles to<br>
&gt; &gt; work.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I am working from a build from master yesterday I used to upgrade over a<br>
&gt; &gt; &gt; previous 3.3 master build from about a month back.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; VDSM version on host is 4.12.0 built minutes ago.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I have installed and configured the websocket proxy like so:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Set WebSocketProxy to engine ENGINEIP port 6100<br>
&gt; &gt; &gt; engine-config -s WebSocketProxy=ENGINEIP:6100<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; /usr/share/ovirt-engine/bin/pki-enroll-pkcs12.sh --name=websocket-proxy<br>
&gt; &gt; &gt; --password=install --subject=&quot;/C=US/O=DHC/CN=ENGINEFQDN&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; This generates:<br>
&gt; &gt; &gt; /etc/pki/ovirt-engine/keys/websocket-proxy.p12<br>
&gt; &gt; &gt; /etc/pki/ovirt-engine/certs/websocket-proxy.cer<br>
&gt; &gt; &gt; /etc/pki/ovirt-engine/requests/websocket-proxy.req<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; However it does not generate the key that websockify wants so we do:<br>
&gt; &gt; &gt; openssl pkcs12 -in websocket-proxy.p12 -nocerts -nodes -out<br>
&gt; &gt; &gt; /etc/pki/ovirt-engine/keys/websocket-proxy.key<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The configuration of ovirt-websocket-proxy:<br>
&gt; &gt; &gt; PROXY_HOST=*<br>
&gt; &gt; &gt; PROXY_PORT=6100<br>
&gt; &gt; &gt; SOURCE_IS_IPV6=False<br>
&gt; &gt; &gt; SSL_CERTIFICATE=/etc/pki/ovirt-engine/certs/websocket-proxy.cer<br>
&gt; &gt; &gt; SSL_KEY=/etc/pki/ovirt-engine/keys/websocket-proxy.key<br>
&gt; &gt; &gt; FORCE_DATA_VERIFICATION=False<br>
&gt; &gt; &gt; CERT_FOR_DATA_VERIFICATION=/etc/pki/ovirt-engine/certs/engine.cer<br>
&gt; &gt; &gt; SSL_ONLY=True<br>
&gt; &gt; &gt; TRACE_ENABLE=False<br>
&gt; &gt; &gt; TRACE_FILE=<br>
&gt; &gt; &gt; ENGINE_USR=&quot;/usr/share/ovirt-engine&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Install spice-html5<br>
&gt; &gt; &gt; git clone <a href="http://anongit.freedesktop.org/git/spice/spice-html5.git" target="_blank">http://anongit.freedesktop.org/git/spice/spice-html5.git</a><br>
&gt; &gt; &gt; mv spice-html5 /usr/share<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Test spice:<br>
&gt; &gt; &gt; In Webadmin UI we set create a VM, set display as spice, start it and set<br>
&gt; &gt; &gt; it&#39;s console to spice-html5.<br>
&gt; &gt; &gt; Result spice-html client opens in a new tab but does not connect.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; From engine.log:<br>
&gt; &gt; &gt; 2013-08-01 12:49:52,352 INFO<br>
&gt; &gt; [org.ovirt.engine.core.bll.SetVmTicketCommand]<br>
&gt; &gt; &gt; (ajp--127.0.0.1-8702-9) Running command: SetVmTicketCommand internal:<br>
&gt; &gt; false.<br>
&gt; &gt; &gt; Entities affected : ID: fec3260c-871a-4fbe-a006-9eee4fbfbbcc Type: VM<br>
&gt; &gt; &gt; 2013-08-01 12:49:52,371 INFO<br>
&gt; &gt; &gt; [org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand]<br>
&gt; &gt; &gt; (ajp--127.0.0.1-8702-9) START, SetVmTicketVDSCommand(HostName =<br>
&gt; &gt; &gt; ovirtnodefoo, HostId = 5713e5c8-6252-4bce-a3f6-bbd8e1e6eb57,<br>
&gt; &gt; &gt; vmId=fec3260c-871a-4fbe-a006-9eee4fbfbbcc, ticket=TKfzUQJLLrUI,<br>
&gt; &gt; &gt; validTime=120,m userName=admin@internal,<br>
&gt; &gt; &gt; userId=fdfc627c-d875-11e0-90f0-83df133b58cc), log id: 5d258049<br>
&gt; &gt; &gt; 2013-08-01 12:49:52,445 INFO<br>
&gt; &gt; &gt; [org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand]<br>
&gt; &gt; &gt; (ajp--127.0.0.1-8702-9) FINISH, SetVmTicketVDSCommand, log id: 5d258049<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Test novnc:<br>
&gt; &gt; &gt; In Webadmin UI we set create a VM, set display as VNC, start it and set<br>
&gt; &gt; it&#39;s<br>
&gt; &gt; &gt; console to novnc.<br>
&gt; &gt; &gt; Result novnc client opens in a new tab but does not connect, but does<br>
&gt; &gt; display<br>
&gt; &gt; &gt; error: &quot;Server disconnected (code: 1006)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; From engine.log:<br>
&gt; &gt; &gt; 2013-08-01 12:50:44,800 INFO<br>
&gt; &gt; [org.ovirt.engine.core.bll.SetVmTicketCommand]<br>
&gt; &gt; &gt; (ajp--127.0.0.1-8702-9) Running command: SetVmTicketCommand internal:<br>
&gt; &gt; false.<br>
&gt; &gt; &gt; Entities affected : ID: fec3260c-871a-4fbe-a006-9eee4fbfbbcc Type: VM<br>
&gt; &gt; &gt; 2013-08-01 12:50:44,833 INFO<br>
&gt; &gt; &gt; [org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand]<br>
&gt; &gt; &gt; (ajp--127.0.0.1-8702-9) START, SetVmTicketVDSCommand(HostName =<br>
&gt; &gt; &gt; ovirtnodefoo, HostId = 5713e5c8-6252-4bce-a3f6-bbd8e1e6eb57,<br>
&gt; &gt; &gt; vmId=fec3260c-871a-4fbe-a006-9eee4fbfbbcc, ticket=IPWOWh6U9erd,<br>
&gt; &gt; &gt; validTime=120,m userName=admin@internal,<br>
&gt; &gt; &gt; userId=fdfc627c-d875-11e0-90f0-83df133b58cc), log id: bff6161<br>
&gt; &gt; &gt; 2013-08-01 12:50:44,917 INFO<br>
&gt; &gt; &gt; [org.ovirt.engine.core.vdsbroker.vdsbroker.SetVmTicketVDSCommand]<br>
&gt; &gt; &gt; (ajp--127.0.0.1-8702-9) FINISH, SetVmTicketVDSCommand, log id: bff6161<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I verified connection of both the spice/vnc console directly at the host<br>
&gt; &gt; &gt; level with a quick connect via virt-viewer.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; A quick scan with nmap of engine and host to verify sockets are open:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Nmap scan report for engine<br>
&gt; &gt; &gt; Host is up (0.0042s latency).<br>
&gt; &gt; &gt; Not shown: 995 closed ports<br>
&gt; &gt; &gt; PORT STATE SERVICE<br>
&gt; &gt; &gt; 22/tcp open ssh<br>
&gt; &gt; &gt; 80/tcp open http<br>
&gt; &gt; &gt; 111/tcp open rpcbind<br>
&gt; &gt; &gt; 443/tcp open https<br>
&gt; &gt; &gt; 6100/tcp open synchronet-db<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Nmap scan report for host<br>
&gt; &gt; &gt; Host is up (0.0045s latency).<br>
&gt; &gt; &gt; Not shown: 997 closed ports<br>
&gt; &gt; &gt; PORT STATE SERVICE<br>
&gt; &gt; &gt; 22/tcp open ssh<br>
&gt; &gt; &gt; 111/tcp open rpcbind<br>
&gt; &gt; &gt; 5900/tcp open vnc<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; For grins I stopped the websocket proxy and manually started a websockify<br>
&gt; &gt; &gt; like so:<br>
&gt; &gt; &gt; websockify <a href="http://3.57.111.11:6100" target="_blank">3.57.111.11:6100</a> <a href="http://3.57.111.12:5900" target="_blank">3.57.111.12:5900</a><br>
&gt; &gt; &gt; --cert=/etc/pki/ovirt-engine/certs/websocket-proxy.cer<br>
&gt; &gt; &gt; --key=/etc/pki/ovirt-engine/keys/websocket-proxy.key<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; WARNING: no &#39;numpy&#39; module, HyBi protocol is slower or disabled<br>
&gt; &gt; &gt; WebSocket server settings:<br>
&gt; &gt; &gt; - Listen on ENGINEIP:6100<br>
&gt; &gt; &gt; - Flash security policy server<br>
&gt; &gt; &gt; - SSL/TLS support<br>
&gt; &gt; &gt; - proxying from ENGINEIP:6100 to HOSTIP:5900<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Attempting another connection via<br>
&gt; &gt; &gt; <a href="https://ENGINEFQDN//ovirt-engine-novnc-main.html?host=ENGINEIP&amp;port=6100" target="_blank">https://ENGINEFQDN//ovirt-engine-novnc-main.html?host=ENGINEIP&amp;port=6100</a><br>
&gt; &gt; &gt; results in:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 1: handler exception: [Errno 1] _ssl.c:1359: error:14094418:SSL<br>
&gt; &gt; &gt; routines:SSL3_READ_BYTES:tlsv1 alert unknown ca<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I should also note in case it matters that the SSLEnabled=false, and<br>
&gt; &gt; &gt; EnableSpiceRootCertificateValidation are both set as false are set in my<br>
&gt; &gt; &gt; engine options.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Am I doing something wrong here, I don&#39;t see any reason this should not<br>
&gt; &gt; work?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; - DHC<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Users mailing list<br>
&gt; &gt; &gt; <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
&gt; &gt; &gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>