I am having a problem connecting to Tomcat 6 running as a service on Windows Server 2008 R2. Here are the details of my setup.
32 Bit JDK 1.6._23 64 Bit Windows Server 2008 R2
My jakarta service log shows that I am setting the jvm properties to turn on jmx remote access to the JVM
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6] -Dcom.sun.management.jmxremote
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7] -Dcom.sun.management.jmxremote.port=8999
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8] -Dcom.sun.management.jmxremote.ssl=false
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9] -Dcom.sun.management.jmxremote.authenticate=false
I am running jconsole on the same machine that is running tomcat so I am not trying 开发者_开发问答to connect remotely and should not have any problems with ports I even turned off the windows firewall on the machine to make sure it was not getting in the way
systernals tcpview shows that tomact6.exe is listening on port 8999
I am running tomact6 service as the user pmtomact
I am running jconsole as the user Administrator
on the jconsole I tried localhost:8999 and it tries to connect for a while then reports that it can can not connect.
I tried running tomcat as user administrator just starting from the startup.bat with the proper jmx paramters and it does not work either.
I tried running jconsole as pmtomcat user still no luck connecting
I tried creating a directory under C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that the directory was writable by the pmtomcat user still it does not work.
Any ideas of how I can troubleshoot this problem, it is driving me crazy?
A bit more googling led me this problem repot http://tai-dev.blog.co.uk/2010/03/26/glassfish-jmx-and-windows-web-server-2008-can-play-together-with-a-few-tweaks-here-s-how-plus-bonus-jconsole-config-info-8251001/
and the fix was to add -Djava.rmi.server.hostname=127.0.0.1 to my command line options for the service. I have no idea why this setting fixes the problem but it does.
精彩评论