>From memory, some parts of AWT won't run in headless mode. I used to run an
x virtual frame buffer on servers that created graphics. It's a standard
package on most Linux distros. I forget if there was something special
needed to set it up, but might be worth looking into.




On Sun, Jan 17, 2010 at 4:41 PM, Tarandeep Singh <tarand...@gmail.com>wrote:

> Hi,
>
> I am running a MR job that requires usage of some java.awt.* classes, that
> can't be run in headless mode.
>
> Right now, I am running Hadoop in a single node cluster (my laptop) which
> has X11 server running. I have set up my ssh server and client to do X11
> forwarding.
>
> I ran the following java program to ensure that X11 forwarding is working-
>
> public class Test
>  throws Exception
> {
>  public static void main( String[] args)
>  {
>    Process p = runtime.getRuntime( ).exec( "/usr/bin/xterm");
>    p.waitFor( );
>  }
> }
>
> I ran it as-
> ssh localhost "java Test"
> and it worked confirming that X11 forwarding is working over SSH.
>
> However, when I run a Map Reduce program that uses java.awt.* classes
> (trying to create an object that extends Frame), I keep getting this error-
>
> java.lang.InternalError- Can't connect to X11 window server using
> 'localhost:10.0' as the value of the DISPLAY variable
>
> I printed the value of DISPLAY variable-
>
> echo $DISPLAY
> :0.0
> ssh localhost
> echo $DISPLAY
> localhost:10.0
>
> I understand this is more of a SSH and X11 related issue, but X11
> forwarding
> is working over SSH in my standalone programs, but not in MR program.
> That's
> why I am posting the problem here.
>
> Any help is greatly appreciated.
>
> Thanks,
> Tarandeep
>

Reply via email to