This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 820949 - [remote-viewer]keyboard/mouse can't worked when add secure channel in guest xml
[remote-viewer]keyboard/mouse can't worked when add secure channel in guest xml
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.3
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-11 08:09 EDT by zhe peng
Modified: 2012-05-24 07:18 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-24 07:18:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
guest xml file (3.47 KB, text/plain)
2012-05-11 08:11 EDT, zhe peng
no flags Details
script to config spice tls on host (1.54 KB, text/plain)
2012-05-11 08:12 EDT, zhe peng
no flags Details
--spice-debug log file (19.76 KB, text/plain)
2012-05-11 08:17 EDT, zhe peng
no flags Details
--spice-debug --debug output file (59.74 KB, text/plain)
2012-05-14 23:29 EDT, zhe peng
no flags Details

  None (edit)
Description zhe peng 2012-05-11 08:09:52 EDT
Description of problem:
keyboard/mouse can't worked when add secure channel in guest xml 

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-8.el6.x86_64
libvirt-0.9.10-18.el6.x86_64
spice-server-0.10.1-7.el6.x86_64
spice-gtk-0.11-8.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1.create a spice guest 
2.config tls on host(script in attachment)
3.edit graphics element
<graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
      <channel name='main' mode='secure'/>
      <channel name='inputs' mode='insecure'/>
    </graphics>
  
4: start the guest
5: use remote-viewer to connect the guest
#remote-viewer spice://$hostIP/?tls-port=5904 --spice-host-subject="C=IL,L=Raanana,O=Red Hat,CN=my server" --spice-ca-file='/etc/pki/libvirt-spice/ca-cert.pem'

Actual results:
remote-viewer will open a graphic console,but the keyboard and mouse all can't worked.

got error msg:
(remote-viewer:24967): GSpice-WARNING **: PulseAudio context failed Connection refused

(remote-viewer:24967): GSpice-WARNING **: pa_context_connect() failed: Connection refused

(remote-viewer:24967): GSpice-WARNING **: inputs-3:0: spice_channel_recv_link_msg: unhandled error 6

(remote-viewer:24771): GSpice-CRITICAL **: spice_inputs_key_press: assertion `SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed

(remote-viewer:24771): GSpice-CRITICAL **: spice_inputs_key_press: assertion `SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed

(remote-viewer:24771): GSpice-CRITICAL **: spice_inputs_key_release: assertion `SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed

full log msg please see attachment.

Expected results:
keyboard and mouse worked well.

Additional info:
when use virt-viewer to connect the guest ,keyboard and mouse all worked.
# virt-viewer rhel6.3 --spice-host-subject="C=IL,L=Raanana,O=Red Hat,CN=my server" --spice-ca-file='/etc/pki/libvirt-spice/ca-cert.pem'

use spice-clent, also worked.

if remove
      <channel name='main' mode='secure'/>
      <channel name='inputs' mode='insecure'/> 
from guest xml ,then restart the guest ,all worked well.
Comment 1 zhe peng 2012-05-11 08:11:44 EDT
Created attachment 583819 [details]
guest xml file
Comment 2 zhe peng 2012-05-11 08:12:52 EDT
Created attachment 583820 [details]
script to config spice tls on host
Comment 3 zhe peng 2012-05-11 08:17:05 EDT
Created attachment 583821 [details]
--spice-debug log file
Comment 5 Daniel Berrange 2012-05-14 06:59:52 EDT
> (remote-viewer:24967): GSpice-WARNING **: inputs-3:0:
> spice_channel_recv_link_msg: unhandled error 6

This is an interested warning. Error code 6 translates to

  SPICE_LINK_ERR_NEED_UNSECURED

which seems to suggest that virt-viewer is trying to use a secure connection for input, where-as the server is configured to require an insecure connection.
Comment 6 Daniel Berrange 2012-05-14 07:01:44 EDT
You have provided the debug output from '--spice-debug', but I need to see the virt-viewer debug info too. Can you re-try and pass the following args to get a log file which contains all debug info

  virt-viewer --spice-debug --debug ...other args...
Comment 7 zhe peng 2012-05-14 23:29:38 EDT
Created attachment 584517 [details]
--spice-debug --debug output file
Comment 8 Daniel Berrange 2012-05-15 07:22:32 EDT
> use remote-viewer to connect the guest
> #remote-viewer spice://$hostIP/?tls-port=5904

You haven't told spice what the non-TLS port is, to it can't run the keyboard of the non-TLS channel as the guest XML requires. Please re-try with

   spice://$HostIP/?port=NNNN&tls-port=MMMM
Comment 9 RHEL Product and Program Management 2012-05-19 00:04:11 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 10 zhe peng 2012-05-24 07:18:00 EDT
thanks,Daniel, i use command remote-viewer spice://$hostip/?port=NNNN\&tls-port=MMMM,the keyboard and mouse worked well,so , i think this bug can be closed.

Note You need to log in before you can comment on or make changes to this bug.