I want to submit a job to my own Gridengine cluster that runs a perl script which does various things including forking to run a small java program which, amongst other things, draws graphs to a png.
Everything works fine until the java tries to output the png. Then I get the following error message.
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.Class.forName0(Native Method)
I have tried setting DISPLAY to various values with no success. I understand that qsub does not submit to an interactive queue, but the java is headless - all it needs is to access the X11 terminal, I presume, to access the graphic variables/libraries.
Am I missing some libraries or settings?
Is it possible to access the X term using qsub? If not what is the solution?
BTW - the code works fine if not queued on Gridengine.
Thanks for any help or advice.