Bug 1099432

Summary: noVNC client doesn't work: Server disconnected (code: 1006)
Product: [Retired] oVirt Reporter: Sandro Bonazzola <sbonazzo>
Component: ovirt-engine-webadminAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.5CC: acathrow, bugs, ecohen, fromani, gklein, iheim, mgoldboi, michal.skrivanek, ofrenkel, sbonazzo, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-23 11:42:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1073943    
Attachments:
Description Flags
screenshot none

Description Sandro Bonazzola 2014-05-20 10:03:43 UTC
Just installed a fresh nightly as candidate for 3.5.0 alpha: changed console to 
- VNC
- noVNC
- Map control-alt-del shortcut to ctrl+alt+end

Connected to: https://dellserver.home/ovirt-engine/services/novnc-main.html?host=dellserver.home&port=6100

it says:
Server disconnected (code: 1006)

# rpm -qa |egrep "^(ovirt-engine-3|vdsm-4|libvirt-daemon-1|novnc)"
ovirt-engine-3.5.0-0.0.master.20140519181226.gitc6324d4.fc19.noarch
libvirt-daemon-1.1.3.2-1.fc19.x86_64
novnc-0.4-7.fc19.noarch
vdsm-4.14.1-339.gitedb07b8.fc19.x86_64

# iptables-save 
# Generated by iptables-save v1.4.18 on Tue May 20 12:01:32 2014
*filter
:INPUT ACCEPT [353880:5463037375]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [352087:5468108777]
COMMIT
# Completed on Tue May 20 12:01:32 2014

# service ovirt-websocket-proxy status
Redirecting to /bin/systemctl status  ovirt-websocket-proxy.service
ovirt-websocket-proxy.service - oVirt Engine websockets proxy
   Loaded: loaded (/usr/lib/systemd/system/ovirt-websocket-proxy.service; enabled)
   Active: active (running) since mar 2014-05-20 11:36:02 CEST; 26min ago
 Main PID: 16675 (ovirt-websocket)
   CGroup: name=systemd:/system/ovirt-websocket-proxy.service
           └─16675 /usr/bin/python /usr/share/ovirt-engine/services/ovirt-websocket-proxy/ovirt-websocket-proxy.py --systemd=notify start

mag 20 11:36:02 dellserver.home systemd[1]: Started oVirt Engine websockets proxy.
mag 20 11:56:20 dellserver.home ovirt-websocket-proxy.py[16675]: WebSocket server settings:
mag 20 11:56:20 dellserver.home ovirt-websocket-proxy.py[16675]: - Listen on *:6100
mag 20 11:56:20 dellserver.home ovirt-websocket-proxy.py[16675]: - Flash security policy server
mag 20 11:56:20 dellserver.home ovirt-websocket-proxy.py[16675]: - SSL/TLS support
mag 20 11:56:20 dellserver.home ovirt-websocket-proxy.py[16675]: - Deny non-SSL/TLS connections
mag 20 11:56:20 dellserver.home ovirt-websocket-proxy.py[16675]: - proxying from *:6100 to targets in /dummy
mag 20 11:56:20 dellserver.home ovirt-websocket-proxy.py[16675]: 1: handler exception: [Errno 1] _ssl.c:1419: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
mag 20 11:56:51 dellserver.home ovirt-websocket-proxy.py[16675]: 2: handler exception: [Errno 1] _ssl.c:1419: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca


# service ovirt-engine status
Redirecting to /bin/systemctl status  ovirt-engine.service
ovirt-engine.service - oVirt Engine
   Loaded: loaded (/usr/lib/systemd/system/ovirt-engine.service; enabled)
   Active: active (running) since mar 2014-05-20 11:25:35 CEST; 37min ago
 Main PID: 13557 (ovirt-engine.py)
   CGroup: name=systemd:/system/ovirt-engine.service
           ├─13557 /usr/bin/python /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.py --redirect-output --systemd=notify start
           └─13604 ovirt-engine -server -XX:+TieredCompilation -Xms1g -Xmx1g -XX:PermSize=256m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server...

mag 20 11:25:35 dellserver.home systemd[1]: Started oVirt Engine.


# service httpd status
Redirecting to /bin/systemctl status  httpd.service
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: active (running) since mar 2014-05-20 11:25:36 CEST; 37min ago
 Main PID: 13688 (httpd)
   Status: "Total requests: 1341; Current requests/sec: 0.3; Current traffic: 1.5KB/sec"
   CGroup: name=systemd:/system/httpd.service
           ├─13688 /usr/sbin/httpd -DFOREGROUND
           ├─13689 /usr/sbin/httpd -DFOREGROUND
           ├─13690 /usr/sbin/httpd -DFOREGROUND
           ├─13691 /usr/sbin/httpd -DFOREGROUND
           ├─14763 /usr/sbin/httpd -DFOREGROUND
           ├─14765 /usr/sbin/httpd -DFOREGROUND
           ├─15611 /usr/sbin/httpd -DFOREGROUND
           ├─15616 /usr/sbin/httpd -DFOREGROUND
           ├─15618 /usr/sbin/httpd -DFOREGROUND
           ├─18292 /usr/sbin/httpd -DFOREGROUND
           └─18332 /usr/sbin/httpd -DFOREGROUND

mag 20 11:25:36 dellserver.home systemd[1]: Started The Apache HTTP Server.

Comment 1 Michal Skrivanek 2014-05-22 10:04:27 UTC
(In reply to Sandro Bonazzola from comment #0)
and did you import CA? as described at the console client resources page

Comment 2 Sandro Bonazzola 2014-05-22 11:24:29 UTC
(In reply to Michal Skrivanek from comment #1)
> (In reply to Sandro Bonazzola from comment #0)
> and did you import CA? as described at the console client resources page

No, I've not seen any reference to the need of importing CA in any page or dialog I've seen while testing it.
Can you point me to where such instructions are?

Comment 3 Michal Skrivanek 2014-05-22 11:50:23 UTC
http://www.ovirt.org/Console_Client_Resources

there's a link to it at:
 - landing page (new section)
 - (basic) user portal right-hand (details) pane
 - console options dialog

please confirm it resolves your problem

Comment 4 Sandro Bonazzola 2014-05-23 08:28:49 UTC
Created attachment 898583 [details]
screenshot

(In reply to Michal Skrivanek from comment #3)
> http://www.ovirt.org/Console_Client_Resources
> 
> there's a link to it at:
>  - landing page (new section)
ok

>  - (basic) user portal right-hand (details) pane
ok

>  - console options dialog
ok

I think that on the landing page saying the server is disconnected it would be useful having a note saying to import the certificate and a link to the certificate.

> 
> please confirm it resolves your problem

It doesn't solve.
I still have: Server disconnected (code: 1006)
but if I refresh the page after above error, I've an empty page, see attached screenshot.

Comment 5 Michal Skrivanek 2014-05-23 08:38:20 UTC
I'd suggest to check how the CA was imported… an you give it a try with spice_html5 instead (it has a debug output in UI)?

Comment 6 Sandro Bonazzola 2014-05-23 11:42:55 UTC
(In reply to Michal Skrivanek from comment #5)
> I'd suggest to check how the CA was imported… an you give it a try with
> spice_html5 instead (it has a debug output in UI)?

Sorry, I've found that websocket proxy service was down. After CA import everything is ok. Closing as not a bug.
Please consider adding a note saying to import the certificate and a link to the certificate on the Server disconnected (code: 1006) page.
Maybe also a note about contacting the administrator for checking websocke proxy service status may help.