Monday, September 23, 2013

Fixing X issues with jconsole and jvisualvm under ubuntu

This is merely a technical post describing how to solve the issues with running the aforementioned jdk tools on ubuntu without X servers installed.

It is sometimes possible that you need to run X based apps on ubuntu servers that do not have graphical libraries no GUI installed.

The easy way to check whether your ubuntu server is missing any libraries is to run the command recommended on

jvisualvm -J-Dnetbeans.logger.console=true

This command will output names of shared libraries that are required to run the command but are missing. For example these libraries could be: libxrender1, libxtst6, libxi6. Their names can be printed also with .so. suffixes, like so:

In order to install them you can run:

sudo apt-get install libxrender1
sudo apt-get install libxtst6
sudo apt-get install libxi6

After installing a library keep running the jvisualvm command above to see if there are any libraries still missing.

If all libraries are in order the jvisualvm should start given that you have connected to your ubuntu server with ssh -X command line parameter which will stream the graphical command's GUI output to your client machine.

Have fun monitoring!


m.overmeyer said...

I also had the same issue on CentOS.
I was missing the same libraries.

Here is the command I ran to get them:

yum install libXrender libXi libXtst

Thanks for writing this up!

Dmitry Kan said...

you are welcome, m.overmeyer !