Java local processes are gray when trying to connect via JMX

I am running several java processes on a professional Windows XP machine. When I try to connect to these processes through the local JConsole, the processes turn gray.

However, I can run the same processes on another computer and connect through the local JConsole on that computer.

Both machines run java 1.6 for processes and jconsole.

Any ideas why these processes are grayed out?

+6
source share
6 answers

I am currently struggling with this problem, and I found out about this:

You can change the user's local temporary directory to what they can definitely get (for example, D: \ temp). Be sure to do this for the process you are trying to control and the jconsole process.

Another thing that may seem to be causing problems is usernames with capital letters in them. The directory will always be created with all lowercase letters, but just rename it exactly as shown in the task manager, and all problems will disappear: http://planeofthought.com/wp/?p=75

+16
source

if the processes run as different users (for example, if you start them as services), then you will not be able to connect to them. also, if they work under older jvm, you most likely will not be able to talk to them.

in some cases, the local jmx communication mechanism uses the local file system and may have problems if permissions are not defined correctly. maybe you are running any of these processes on network file systems (nfs, samba)?

+2
source

From http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html :

Applications that cannot be attached when the management agent is disabled. These include applications running on the J2SE 1.4.2 platform or running on the J2SE 5.0 platform without the -Dcom.sun.management.jmxremote or com.sun.management.jmxremote.port parameters. These applications are grayed out in the table, and JConsole cannot connect to them. In the example connection dialog box, shown in Figure 3-1, Anagrams was launched from the J2SE 5.0 platform virtual VM without any management properties to enable the JMX agent and therefore is grayed out and cannot be selected.

Figure 3-1. Creating a connection to the local process http://download.oracle.com/javase/6/docs/technotes/guides/management/figures/connect.gif

Despite what is written in the documentation, most likely your process is running under a different user. You can run jconsole as an administrator and then try.

+2
source

Say that your Windows username that you use to launch your Java application visible in the task manager is YOUR_USER_NAME. Please check the folder whose name looks like hsperfdata_XXXXX (XXXXX should be your username) in your temp folder and make sure YOUR_USER_NAME and XXXXX are exactly the same (be careful with upper and lower case).

+2
source

Here is what worked for me. I changed the environment variables %TEMP% and %TMP% to point to the folder created in my location %HOME% (for example, C:\Users\[YOUR_NAME]\Temp ). As soon as I did this, all the problems disappeared.

+1
source

Change the TEMP paths in the environment variables to something like D: \ temp, as this may be a permission issue. Fixed bug for me

0
source

Source: https://habr.com/ru/post/887851/


All Articles