Bug 1130159

Summary: No clear error when viewing VM console when hypervisor hostname doesn't resolve
Product: Red Hat Satellite Reporter: David Juran <djuran>
Component: Compute ResourcesAssignee: Dominic Cleal <dcleal>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, bkearney, cwelton, dcleal, djuran, pgervase
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/7117
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-05 19:14:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1139277    
Attachments:
Description Flags
domain XML none

Description David Juran 2014-08-14 13:03:24 UTC
Description of problem:
after creating a host configured with a spice console on a libvirt computer provider, if I try to view the console from the satellite 6, I only get a red banner with the text " Error: Unexpected protocol mismatch"

Version-Release number of selected component (if applicable):
satellite 6.0.3

How reproducible:
Every time

Steps to Reproduce:
1. try to view the console of a host on libvirt configured with spice

Comment 1 RHEL Program Management 2014-08-14 13:23:02 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Bryan Kearney 2014-08-15 20:22:19 UTC
Created redmine issue http://projects.theforeman.org/issues/7117 from this bug

Comment 4 Dominic Cleal 2014-08-18 07:56:10 UTC
Edit the libvirt domain XML, if you have something similar to this:

    <graphics type='spice' autoport='yes'/>

Then change it to:

    <graphics type='spice' autoport='yes' listen='0.0.0.0'/>

Otherwise Foreman won't be able to connect to the console on your libvirt hypervisor.  The default is to listen to 127.0.0.1 only.

Comment 5 David Juran 2014-08-18 13:29:06 UTC
That is how my XML looks, the machine was created from the Sat6 compute provider.
Domain XML attached

Comment 6 David Juran 2014-08-18 13:30:28 UTC
Created attachment 927896 [details]
domain XML

Comment 7 Dominic Cleal 2014-08-18 13:41:07 UTC
Thanks, looks OK.  Do you have any firewalls on the Sat6 server, or between your browser and it?  Is SELinux enforcing?

Check that when you view the console page, "ps auxww | grep [w]ebsockify" shows up a process, please paste the output.  Check the hostname in the last argument of the command line resolves (this is supplied by libvirt and may indicate a misconfiguration if incorrect).

Comment 8 David Juran 2014-08-18 14:44:30 UTC
No firewall on satellite host and AFAIK, no firewall between my browser and the satellite.
SELinux is Permissive and no AVC:s at the time I try to connect.


ps auxww | grep [w]ebsockify
foreman   5911  0.5  0.1 156176 12104 ?        S    16:35   0:00 /usr/bin/python /usr/share/foreman/extras/noVNC/websockify.py --daemon --idle-timeout=120 --timeout=120 5910 localhost.localdomain:5901

Also, tcpdump on the satelite show there is traffic comming from my laptop to port 5010.

Comment 9 Dominic Cleal 2014-08-18 16:05:32 UTC
Is the libvirt compute resource on the same system that runs Satellite 6, or is it different?

If it's different, then it has an identity issue as the "localhost.localdomain" is what libvirt's giving as the hypervisor FQDN.  I've seen this a lot before, but I don't know precisely which config drives it, so would double check the usual "hostname -f" resolution etc.

Comment 10 David Juran 2014-08-19 11:49:38 UTC
Uhm, yes, the compute provider (libvirt host)is different from the satellite. And yes, it did have hostname set to localhost )-:  And fixing that solved the issue.

So would it be possible to somehow make the error message a bit more verbose? If not, feel free to close the bug. And thanks for the help (-:

Comment 12 Bryan Kearney 2015-08-25 18:00:08 UTC
Upstream bug component is Compute Resources

Comment 13 Bryan Kearney 2017-01-05 19:14:37 UTC
This is an older bug which I do not envision being fixed in the near term. I am closing this out. If you belive doing so is an issue, please feel free to re-open and provide additional business information. Thank you.