I had a similar problem when using jps/jstat and finally I found someone advising to use -J-Djava.io.tmpdir option. It worked for me, try adding -J-Djava.io.tmpdir when calling visualvm
________________________________________ De : Howard W. Smith, Jr. [smithh032...@gmail.com] Envoyé : mardi 23 juillet 2013 00:55 À : Tomcat Users List Objet : Re: Local VisualVM connection to Tomcat On Mon, Jul 22, 2013 at 3:10 PM, honyk <j.tosov...@email.cz> wrote: > On 2013-06-28 Christopher Schultz wrote: > > On 6/27/13 5:17 PM, honyk wrote: > > > I realized that my tomcat runs as a service but I am logged as an > > > user and in this case the tomcat is not visible to me. I'll test it > > > differently tomorrow. > > > > Try running VisualVM as an administrator. > > I've found the problem, but I have no remedy for it yet. > https://java.net/projects/visualvm/lists/users/archive/2013-07/message/2 > > Briefly, the service uses the TMP environment variable as it is specified > for the given user, but when that user is logged remotely, the suffix > \<session_number> is added at the end of this path so these both do not > match and VisualVM doesn't detect my tomcat/JVM as expected. > > I know Chris bashed me for this earlier (on this list), politely, and/or recommended or said something about not to login via administrator into my Windows Server 2008 R2 web app server running TomEE (tomcat7), but... in response to this thread, I login to my Windows SErver 2008 R2 web app server, always, as administrator, and yes (confirmed as Chuck mentioned earlier in this thread), > The possibility of services interacting with the desktop disappeared some time ago. so, I just specify a JMX port in my java settings for my TomEE (tomcat7) running as windows service, and specify the JMX port in Java Visual VM, and voila, I think this is saved to Windows registry (or somewhere), and I always see my TomEE (tomcat7) instance when I run Java Visual VM. Of course, the JMX port is not opened on the firewall/router. i just login remotely via remote desktop connection and do what I need to do (stop tomcat7 service, update my app in tomee/webapps, and start tomcat7 service). Others may disagree, but i have found this to be quite secure and as it was said earlier in this thread... a piece of cake. :) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org