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 1248983 - SPICE-XPI: Spice fails when using proxy
Summary: SPICE-XPI: Spice fails when using proxy
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-xpi
Version: 6.7
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Christophe Fergeau
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-31 09:21 UTC by Martin
Modified: 2015-08-03 11:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-03 11:19:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin 2015-07-31 09:21:44 UTC
Description of problem:
When launching a spice session using a spice proxy, the connection fails with error message "unable to connect to graphics server".

Version-Release number of selected component (if applicable):
spice-xpi-2.7-27.el6.x86_64


How reproducible:
You will need a spice proxy

Steps to Reproduce:
1. Launch firefox 38.1.0 with the environment variable SPICE_PROXY set
2. Connect to a VM through rhev using spice

Actual results:
Error popup showing "could not connect to graphic server"

Additional info:

I have managed to get around this issue by downgrading spice-xpi to spice-xpi-2.7-25.el6.x86_64 and reopening firefox. 

when using spice-xpi-2.7-27 the ~.spicec/spice-xpi log shows the following:

2015-07-31 11:16:38,349 INFO  nsPluginInstance::Connect: SPICE_XPI_SOCKET: /tmp/spicec-Fuf4P5/spice-xpi
2015-07-31 11:16:38,349 INFO  nsPluginInstance::Connect: SPICE_PROXY unset
2015-07-31 11:16:38,349 INFO  nsPluginInstance::Connect: SPICE_FOREIGN_MENU_SOCKET: /tmp/spicec-Fuf4P5/spice-foreign
2015-07-31 11:16:38,350 INFO  nsPluginInstance::Connect: Launching /usr/libexec/spice-xpi-client 
2015-07-31 11:16:40,356 INFO  nsPluginInstance::Connect: Initiating connection with controller
2015-07-31 11:16:51,537 ERROR nsPluginInstance::CallOnDisconnected: could not get browser window, when trying to call OnDisconnected

When using spice-xpi-2.7-25:
2015-07-31 10:55:39,198 INFO  nsPluginInstance::Connect: SPICE_XPI_SOCKET: /tmp/spicec-aGgDDf/spice-xpi
2015-07-31 10:55:39,198 INFO  nsPluginInstance::Connect: SPICE_FOREIGN_MENU_SOCKET: /tmp/spicec-aGgDDf/spice-foreign
2015-07-31 10:55:39,199 INFO  nsPluginInstance::Connect: Launching /usr/libexec/spice-xpi-client 
2015-07-31 10:55:41,201 INFO  nsPluginInstance::Connect: Initiating connection with controller
2015-07-31 10:55:57,887 ERROR nsPluginInstance::CallOnDisconnected: could not get browser window, when trying to call OnDisconnected

Comment 1 Christophe Fergeau 2015-07-31 09:27:52 UTC
(In reply to Martin from comment #0)
> Description of problem:
> When launching a spice session using a spice proxy, the connection fails
> with error message "unable to connect to graphics server".
> 
> Version-Release number of selected component (if applicable):
> spice-xpi-2.7-27.el6.x86_64
> 
> 
> How reproducible:
> You will need a spice proxy
> 
> Steps to Reproduce:
> 1. Launch firefox 38.1.0 with the environment variable SPICE_PROXY set

Setting SPICE_PROXY should not be needed, there is a checkbox in RHEV console options to indicate whether a proxy should be used or not for the SPICE connection. Is the "Use SPICE proxy" checkbox checked in RHEV console options?

It's expected that the latest spice-xpi build clears the SPICE_PROXY variable  from the environment if SPICE proxy use is disabled in RHEV console options.

Comment 3 Martin 2015-07-31 10:05:12 UTC
(In reply to Christophe Fergeau from comment #1)
> (In reply to Martin from comment #0)
> > Description of problem:
> > When launching a spice session using a spice proxy, the connection fails
> > with error message "unable to connect to graphics server".
> > 
> > Version-Release number of selected component (if applicable):
> > spice-xpi-2.7-27.el6.x86_64
> > 
> > 
> > How reproducible:
> > You will need a spice proxy
> > 
> > Steps to Reproduce:
> > 1. Launch firefox 38.1.0 with the environment variable SPICE_PROXY set
> 
> Setting SPICE_PROXY should not be needed, there is a checkbox in RHEV
> console options to indicate whether a proxy should be used or not for the
> SPICE connection. Is the "Use SPICE proxy" checkbox checked in RHEV console
> options?
> 
> It's expected that the latest spice-xpi build clears the SPICE_PROXY
> variable  from the environment if SPICE proxy use is disabled in RHEV
> console options.

We are connecting to the RHEV through locally forwarded ports through a jumphost, so the SPICE_PROXY variable is set to http//localhost:<some random port> with the port number being randomized each time firefox is launched.

In order to select the SPICE proxy option in the RHEV console options I have to define a spice proxy on the rhev manager, and since the forwarded port is randomized each time the client launches firefox we have no way of telling the rhev manager what port to use other than through a client side environment variable.

So if I'm understanding you correctly it's not possible to use the SPICE_PROXY environment variable any more?

Comment 4 Christophe Fergeau 2015-07-31 16:06:26 UTC
(In reply to Martin from comment #3)
> (In reply to Christophe Fergeau from comment #1)
> > (In reply to Martin from comment #0)
> > > Description of problem:
> > > When launching a spice session using a spice proxy, the connection fails
> > > with error message "unable to connect to graphics server".
> > > 
> > > Version-Release number of selected component (if applicable):
> > > spice-xpi-2.7-27.el6.x86_64
> > > 
> > > 
> > > How reproducible:
> > > You will need a spice proxy
> > > 
> > > Steps to Reproduce:
> > > 1. Launch firefox 38.1.0 with the environment variable SPICE_PROXY set
> > 
> > Setting SPICE_PROXY should not be needed, there is a checkbox in RHEV
> > console options to indicate whether a proxy should be used or not for the
> > SPICE connection. Is the "Use SPICE proxy" checkbox checked in RHEV console
> > options?
> > 
> > It's expected that the latest spice-xpi build clears the SPICE_PROXY
> > variable  from the environment if SPICE proxy use is disabled in RHEV
> > console options.
> 
> We are connecting to the RHEV through locally forwarded ports through a
> jumphost, so the SPICE_PROXY variable is set to http//localhost:<some random
> port> with the port number being randomized each time firefox is launched.
> 
> In order to select the SPICE proxy option in the RHEV console options I have
> to define a spice proxy on the rhev manager, and since the forwarded port is
> randomized each time the client launches firefox we have no way of telling
> the rhev manager what port to use other than through a client side
> environment variable.
> 
> So if I'm understanding you correctly it's not possible to use the
> SPICE_PROXY environment variable any more?

Well, this variable is used by spice-xpi to enable/disable proxy as instructed by RHEV. Before spice-xpi-2.7-27.el6, the proxy could be set, but not unset (see bug #1049475), which is why in your case, setting SPICE_PROXY before starting firefox worked (the plugin never removed it from the environment).
Unsetting SPICE_PROXY is the only change between -26 and -27, so one option is to stay with that build.

A more future-proof option though could be to use update-alternatives to set a custom 'spice-xpi-client' which would be a simple shell-script setting SPICE_PROXY to the right value, and then starting remote-viewer, eg

#!/bin/sh
export SPICE_PROXY=xxxx
/usr/bin/remote-viewer $@

The SPICE_PROXY variable would be set after spice-xpi removes it from the environment, so remote-viewer would be able to use your custom SPICE_PROXY value
Could this work for you?

Comment 5 David Blechter 2015-07-31 17:39:19 UTC
(In reply to Martin from comment #0)
> Description of problem:
> When launching a spice session using a spice proxy, the connection fails
> with error message "unable to connect to graphics server".
> 
> Version-Release number of selected component (if applicable):
> spice-xpi-2.7-27.el6.x86_64
> 
> 
> How reproducible:
> You will need a spice proxy
> 
> Steps to Reproduce:
> 1. Launch firefox 38.1.0 with the environment variable SPICE_PROXY set
> 2. Connect to a VM through rhev using spice
> 
> Actual results:
> Error popup showing "could not connect to graphic server"
> 
> Additional info:
> 
> I have managed to get around this issue by downgrading spice-xpi to
> spice-xpi-2.7-25.el6.x86_64 and reopening firefox. 
> 
> when using spice-xpi-2.7-27 the ~.spicec/spice-xpi log shows the following:
> 
> 2015-07-31 11:16:38,349 INFO  nsPluginInstance::Connect: SPICE_XPI_SOCKET:
> /tmp/spicec-Fuf4P5/spice-xpi
> 2015-07-31 11:16:38,349 INFO  nsPluginInstance::Connect: SPICE_PROXY unset
> 2015-07-31 11:16:38,349 INFO  nsPluginInstance::Connect:
> SPICE_FOREIGN_MENU_SOCKET: /tmp/spicec-Fuf4P5/spice-foreign
> 2015-07-31 11:16:38,350 INFO  nsPluginInstance::Connect: Launching
> /usr/libexec/spice-xpi-client 
> 2015-07-31 11:16:40,356 INFO  nsPluginInstance::Connect: Initiating
> connection with controller
> 2015-07-31 11:16:51,537 ERROR nsPluginInstance::CallOnDisconnected: could
> not get browser window, when trying to call OnDisconnected
> 
> When using spice-xpi-2.7-25:
> 2015-07-31 10:55:39,198 INFO  nsPluginInstance::Connect: SPICE_XPI_SOCKET:
> /tmp/spicec-aGgDDf/spice-xpi
> 2015-07-31 10:55:39,198 INFO  nsPluginInstance::Connect:
> SPICE_FOREIGN_MENU_SOCKET: /tmp/spicec-aGgDDf/spice-foreign
> 2015-07-31 10:55:39,199 INFO  nsPluginInstance::Connect: Launching
> /usr/libexec/spice-xpi-client 
> 2015-07-31 10:55:41,201 INFO  nsPluginInstance::Connect: Initiating
> connection with controller
> 2015-07-31 10:55:57,887 ERROR nsPluginInstance::CallOnDisconnected: could
> not get browser window, when trying to call OnDisconnected

did you contact the customer support team prior to opening this BZ?

Comment 6 Martin 2015-08-03 07:46:31 UTC
(In reply to Christophe Fergeau from comment #4)
> (In reply to Martin from comment #3)
> > (In reply to Christophe Fergeau from comment #1)
> > > (In reply to Martin from comment #0)
> > > > Description of problem:
> > > > When launching a spice session using a spice proxy, the connection fails
> > > > with error message "unable to connect to graphics server".
> > > > 
> > > > Version-Release number of selected component (if applicable):
> > > > spice-xpi-2.7-27.el6.x86_64
> > > > 
> > > > 
> > > > How reproducible:
> > > > You will need a spice proxy
> > > > 
> > > > Steps to Reproduce:
> > > > 1. Launch firefox 38.1.0 with the environment variable SPICE_PROXY set
> > > 
> > > Setting SPICE_PROXY should not be needed, there is a checkbox in RHEV
> > > console options to indicate whether a proxy should be used or not for the
> > > SPICE connection. Is the "Use SPICE proxy" checkbox checked in RHEV console
> > > options?
> > > 
> > > It's expected that the latest spice-xpi build clears the SPICE_PROXY
> > > variable  from the environment if SPICE proxy use is disabled in RHEV
> > > console options.
> > 
> > We are connecting to the RHEV through locally forwarded ports through a
> > jumphost, so the SPICE_PROXY variable is set to http//localhost:<some random
> > port> with the port number being randomized each time firefox is launched.
> > 
> > In order to select the SPICE proxy option in the RHEV console options I have
> > to define a spice proxy on the rhev manager, and since the forwarded port is
> > randomized each time the client launches firefox we have no way of telling
> > the rhev manager what port to use other than through a client side
> > environment variable.
> > 
> > So if I'm understanding you correctly it's not possible to use the
> > SPICE_PROXY environment variable any more?
> 
> Well, this variable is used by spice-xpi to enable/disable proxy as
> instructed by RHEV. Before spice-xpi-2.7-27.el6, the proxy could be set, but
> not unset (see bug #1049475), which is why in your case, setting SPICE_PROXY
> before starting firefox worked (the plugin never removed it from the
> environment).
> Unsetting SPICE_PROXY is the only change between -26 and -27, so one option
> is to stay with that build.
> 
> A more future-proof option though could be to use update-alternatives to set
> a custom 'spice-xpi-client' which would be a simple shell-script setting
> SPICE_PROXY to the right value, and then starting remote-viewer, eg
> 
> #!/bin/sh
> export SPICE_PROXY=xxxx
> /usr/bin/remote-viewer $@
> 
> The SPICE_PROXY variable would be set after spice-xpi removes it from the
> environment, so remote-viewer would be able to use your custom SPICE_PROXY
> value
> Could this work for you?

Thank you, I will look into it. 

You may close this ticket.


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