Operating System - HP-UX
1748195 Members
4035 Online
108759 Solutions
New Discussion юеВ

Re: DRD commands fail when using X11 forwarding

 
SOLVED
Go to solution
ABC Unix
Frequent Advisor

DRD commands fail when using X11 forwarding

I recently noticed an interesting problem when trying to secure my X Window.

When I run "drd runcmd swinstall" on my 11.31 host I get the following error:


# drd runcmd swinstall

======= 02/03/11 08:37:46 MST BEGIN Executing Command On Inactive System
Image (user=root) (jobid=testserver1)

* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Locating Inactive System Image
* Accessing Inactive System Image for Command Execution
* Setting Up Environment For Command Execution
* Executing Command On Inactive System Image
* Using unsafe patch list version 20080324
* Starting swagentd for drd runcmd
* Starting fsdaemon for drd runcmd
* Executing command: "/usr/sbin/swinstall"
NOTE: The interactive UI was invoked, since no software was
specified.

Xlib: connection to "localhost:13.0" refused by server
Xlib: PuTTY X11 proxy: MIT-MAGIC-COOKIE-1 data did not match

The DISPLAY environment variable is set to "localhost:13.0", but
the current configuration won't allow swinstall to run on that display.

The DISPLAY environment variable may be incorrect, or, if you are
running swinstall remotely, you may need to allow the remote system
to access your local X server by typing

/usr/bin/X11/xhost +testserver1

on your local machine.

Do you want to proceed using the terminal version of swinstall?
(yes or no) [yes] no
ERROR: The interactive UI failed to start. If you wish to run
non-interactively, you must specify some software as part of
the swinstall command.
* Stopping swagentd for drd runcmd
* Stopping fsdaemon for drd runcmd
ERROR: Command executed on inactive system image returned an error
- The command "/usr/sbin/swinstall" failed with 1.
* Executing Command On Inactive System Image failed with 1 error.
* Cleaning Up After Command Execution On Inactive System Image

======= 02/03/11 08:38:48 MST END Executing Command On Inactive System Image failed with 1 error.




**However, when I run just a simple "swinstall" I get the GUI as expected.

When I turn off X11 forwarding and run "xhost +testserver1" then the drd runcmd swinstall works properly.

Any ideas?

Thanks!
13 REPLIES 13
Steven E. Protter
Exalted Contributor
Solution

Re: DRD commands fail when using X11 forwarding

Shalom,

Generally, though I'm two weeks into hands on with DRD I do:

drd runcmd swinstall -s

I believe the GUI output and X are functioning normally base on your post. Your forwarding is redirecting your display.

DRD at least so far IMO is a tool best used non interactively.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
ABC Unix
Frequent Advisor

Re: DRD commands fail when using X11 forwarding

Thanks for the response Steven,

I typically run it non-interactively as well but by random chance just noticed this anomaly. Running non-interactively is a good workaround for this for sure but I'd like to know the cause as well.

The X traffic isn't being forwarded properly, for whatever reason I get a "refused by server" error ($DISPLAY is set to localhost, but the traffic should be forwarded through my ssh connection to my desktop) when I run swinstall through drd.
When I run swinstall by itself (not through drd), X traffic is forwarded properly to my desktop and I see the swinstall GUI.
Steven E. Protter
Exalted Contributor

Re: DRD commands fail when using X11 forwarding



I think this is a security feature.

Does the xhost +testserver1 work even with X11 forwarding?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: DRD commands fail when using X11 forwarding

I think the problem might be the X server running on your PC doesn't allow the hpux host to send the display.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
ABC Unix
Frequent Advisor

Re: DRD commands fail when using X11 forwarding

Technically yes, but I would have to change my DISPLAY variable to the X server hostname, thus bypassing X11 forwarding entirely and allowing anyone with access to "testserver1" to connect to my x server.
ABC Unix
Frequent Advisor

Re: DRD commands fail when using X11 forwarding

Oops that last reply was to Steven

@Torsten: I'm not sure what you mean. But when I run "swinstall" I get the interactive GUI to display on my X server properly.
Torsten.
Acclaimed Contributor

Re: DRD commands fail when using X11 forwarding

The message

"connection to "localhost:13.0" refused by server"

normally means the client (swinstall) cannot connect to the Xserver (your PC). The question is why this is set to localhost now.

Maybe there is a wrong setting in your Xserver (whatever you use).

Strange ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
ABC Unix
Frequent Advisor

Re: DRD commands fail when using X11 forwarding

I'm using Cygwin/X. I have a feeling it's something to do with the drd wrapper of swinstall and its interaction with my ssh program (PuTTY).

I wouldn't quote me on this, but under normal conditions when X11 forwarding is enabled the HP-UX server is fooled into thinking that it is displaying X applications to a directly connected console (hence why $DISPLAY is set to localhost). PuTTY then forwards the X traffic through SSH to my Cygwin/X server (workstation).
Because swinstall/xclock/etc all work from the same host I'm pretty sure my X server and tunneling are setup correctly so the only variable I can think of here is the effect drd is having on the swinstall command.
Torsten.
Acclaimed Contributor

Re: DRD commands fail when using X11 forwarding

I would try another ssh/Xserver combination to rule this out.
I really like "mobaxterm"; this is a combination of several cygwin/X components in a single EXE file.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!