Could not map vmid to user Name
Hi Guys,
I am running jdk1.5.0_06 on Linux. I have added the system property com.sun.management.jmxremote for my Java Application, but when I run jconsole <pid> it gives me the error:
Unable to attach to 25837: Could not map vmid to user Name
here 25837 is the PID of my Java Application. I am trying to monitor my application Locally. What am I missing?
TIA
# 2
> Is the target VM running with a different uid/gid?
>
Can you elaborate on how to exactly find this? When I do ps for the application, I see the username is myself
> Another possibility is that /tmp is full.
>
No it is not
> Is your application's PID listed by jps?
>
> $ jps -mlv
>
No, it is not listed
> Regards,
> Luis
# 3
The UID of a process is the user ID of the user causing its execution.
The GID of a process is the group ID of the user causing its execution.
Use the id command to find out your UID/GID.
JConsole requires to be run with the same UID/GID as the process to
be monitored in oder to be able to connect to it. But I don't think this is
the root cause of your problem.
Please post the output of the jps -mlv command?
If the output is empty please verify that you have readwrite access in the
directory /tmp/hsperfdata_<loginname> which is where the JVM stores
all the jvmstat information for a given java process.
IF the problem still persists have a look at the JConsole FAQ to see if you
can find the answer to your problem:
http://java.sun.com/javase/6/docs/technotes/guides/management/faq.html
Regards,
Luis
# 4
> The UID of a process is the user ID of the user
> causing its execution.
> The GID of a process is the group ID of the user
> causing its execution.
>
> Use the id command to find out your UID/GID.
>
> JConsole requires to be run with the same UID/GID as
> the process to
> be monitored in oder to be able to connect to it. But
> I don't think this is
> the root cause of your problem.
>
If I run the id command, it gives the uid/gid for me, how do I know the uid/gid of the Java Application? I know that when I do ps -aef | grep <my application>, it lists my username.
> Please post the output of the jps -mlv
> command?
>
jps -mlv
2911 sun.tools.jps.Jps -mlv -Denv.class.path=<my class path> -Dapplication.home=<my JAVA_HOME> -Xms8m
Now, if I run jconsole in the background and then do jps -mlv, it shows two lines:
2989 sun.tools.jps.Jps -mlv -Denv.class.path=<my class path> -Dapplication.home=<my JAVA_HOME> -Xms8m
2962 sun.tools.jconsole.JConsole -Denv.class.path=<my class path> -Dapplication.home=<My JAVA_HOME>
> If the output is empty please verify that you have
> readwrite access in the
> directory /tmp/hsperfdata_<loginname> which is where
> the JVM stores
> all the jvmstat information for a given java
> process.
>
> IF the problem still persists have a look at the
> JConsole FAQ to see if you
> can find the answer to your problem:
>
> http://java.sun.com/javase/6/docs/technotes/guides/man
> agement/faq.html
>
> Regards,
> Luis