Back    
Priority:
Type:
State:
Assignee:
Subsystem:
Affected versions:
Fixed in:

TW-858

Agent fails if it can​'​t connect to X display

0
I ssh into a remote machine and start an agent.
At this point everything runs OK because ssh is set up to do X forwarding, so any process that needs an X server can use my local machine.
I then put the agent process into the background and log out of my remote session. The agent can no longer connect to my X server on my local machine.

Now I get an error whenever I try to run an Inspections build. I attach the log.
Looks the same as TW-773

Environment: RH Linux on headless machine

Issue wasresolved
Comments (6)
History (1)
Anna Kozlova Anna Kozlova 27 Sep 2006 15:52 (2 years ago)
This is a bug in jdk. It creates toolkit and after that checks if it is headless environment. We need to instantiate our event queue thus we need default toolkit. We will do our best to provide a workaround but not in IDEA 6.0 unfortunately.
Sorry for inconvenience.
Thank you.
Tim McNerney Tim McNerney 10 Oct 2006 18:01 (2 years ago)
Can you start up the agent with the argument:

  • Djava.awt.headless=true


to fix this?

Other possibility, you can run Xvfb, which is a virtual frame buffer. We run it with:

/usr/X11R6/bin/Xvfb :0 -screen 0 1600x1024x16

and have a display to point to at :0.
Gibson Gibson 10 Oct 2006 19:13 (2 years ago)
The -Djava.awt.headless=true doesn't work because the agent is looking for a display (unfortunately).
I'll try and find Xvfb and give it a go.
Gibson Gibson 10 Oct 2006 19:55 (2 years ago)
It seems that running the inspection "needs" to have a proper display, since I am prompted to give a value for my path variables (output directory is defined as a path variable in my module definitions).

Inspections should be able to run completely headlessly - if it needs path variables and they haven't been defined in the build configuration it should just crash giving the name of the variable to define. In my case it's doubly annoying because the output directory is specified as part of the build.
Anna Kozlova Anna Kozlova 10 Oct 2006 20:02 (2 years ago)
I am fixing this step by step. Sorry for inconvenience. Thank you
Gibson Gibson 11 Oct 2006 11:11 (2 years ago)
See also TW-946