aspose file tools*
The moose likes Performance and the fly likes Exceptions while running jconsole in Fedroa linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Exceptions while running jconsole in Fedroa linux" Watch "Exceptions while running jconsole in Fedroa linux" New topic
Author

Exceptions while running jconsole in Fedroa linux

Ajay Vikas
Ranch Hand

Joined: Nov 08, 2006
Posts: 66
Hi All,

I am experiencing following exceptions while running jconsole over Linux. I believe i might have missed some settings. Please help me over this.

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:406)
at java.awt.Frame.<init>(Frame.java:402)
at javax.swing.JFrame.<init>(JFrame.java:207)
at sun.tools.jconsole.JConsole.<init>(JConsole.java:96)
at sun.tools.jconsole.JConsole$6.run(JConsole.java:746)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Thank you!!!

Regards,
Ajay Vikas.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

HeadlessException is caused by running an application which requires a GUI rendering feature (including functionality like printing or creating images on the fly) on a platform which does not have a graphical interface (like Xwindows). Since jconsole is a GUI program, I can't imagine why you'd be trying to run it on a headless platform. If you are trying to monitor a server application, you should set up your application for remote monitoring and run jconsole on a workstation.
Using Jconsole to Monitor Applications


[How To Ask Questions On JavaRanch]
Ajay Vikas
Ranch Hand

Joined: Nov 08, 2006
Posts: 66
Thank you Joe. URL you posted is useful.

MY query is is how can i run jconsole over Linux. I need to view VM statistics of my tomcat server and its consumption of memory.
Please help me over this.

Thank you !!!

--
Ajay Vikas.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

JConsole can monitor a VM remotely. I think this is what you have to do since you have a headless Linux server.
Ajay Vikas
Ranch Hand

Joined: Nov 08, 2006
Posts: 66
There is an option to do so , but i am interested to do in Linux as standalone VM reading.
Ajay Vikas
Ranch Hand

Joined: Nov 08, 2006
Posts: 66
Just interested to run as in Windows. Also there is any possibility to do so.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

Originally posted by Ajay Vikas:
There is an option to do so , but i am interested to do in Linux as standalone VM reading.


Jconsole is a GUI program. You can't run it on a headless server.

Originally posted by Ajay Vikas:

Just interested to run as in Windows. Also there is any possibility to do so.

Are you asking if you can monitor a Linux server using JConsole on a Windows computer? The answer is yes.
Ajay Vikas
Ranch Hand

Joined: Nov 08, 2006
Posts: 66
Thank you Joe. I got my replies what i need exactly. Ok i shall monitor Linux java VM from windows.

Thank you for your time.

--
Ajay Vikas.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

You don't have to monitor from Windows, you just have to monitor from a machine that's running a GUI. X for Linux would do just as well.

All "headless" operation is is operating without a display head - which is to say, a windowing system. Servers will usually operate more efficiently that way, since the GUI overhead is easily 100MB or more of RAM these days, but without the GUI, all you can do is work with text.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exceptions while running jconsole in Fedroa linux