RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 820949 - [remote-viewer]keyboard/mouse can't worked when add secure channel in guest xml
Summary: [remote-viewer]keyboard/mouse can't worked when add secure channel in guest xml
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-11 12:09 UTC by zhe peng
Modified: 2012-05-24 11:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-24 11:18:52 UTC
Target Upstream Version:
Embargoed:


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

Description zhe peng 2012-05-11 12:09:52 UTC
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 12:11:44 UTC
Created attachment 583819 [details]
guest xml file

Comment 2 zhe peng 2012-05-11 12:12:52 UTC
Created attachment 583820 [details]
script to config spice tls on host

Comment 3 zhe peng 2012-05-11 12:17:05 UTC
Created attachment 583821 [details]
--spice-debug log file

Comment 5 Daniel Berrangé 2012-05-14 10:59:52 UTC
> (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 Berrangé 2012-05-14 11:01:44 UTC
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-15 03:29:38 UTC
Created attachment 584517 [details]
--spice-debug --debug output file

Comment 8 Daniel Berrangé 2012-05-15 11:22:32 UTC
> 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 Program Management 2012-05-19 04:04:11 UTC
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 11:18:00 UTC
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.