Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Exceptions while running jconsole in Fedroa linux

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 9625
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ajay Vikas
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9625
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is an option to do so , but i am interested to do in Linux as standalone VM reading.
 
Ajay Vikas
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just interested to run as in Windows. Also there is any possibility to do so.
 
Joe Ess
Bartender
Posts: 9625
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 23517
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic