问题
I have a JBoss server installed as a service on Windows Server 2008 with Local System as the Log On user.
I want to be able to run visualgc on the JBoss server, and prior to Server 2008 I was able to directly connect to the PID (i.e. visualgc [PID]). Based on what I've read, my only solution in Server 2008 is to install jstatd as a service using the same credentials in order to run visualgc remotely (i.e. visualgc [PID]@localhost:1099).
So, I got jstatd running as a service under the Local System account (granted AllPermissions in policy file and set the java.io.tmpdir since it had problems with that as well) and verified that both java processes are running under the same user and session ID in task manager, however jps rmi://localhost:1099 returns nothing and visualgc pid@localhost:1099 says "[PID] not found".
Interestingly, if I switch the log on user of both the JBoss and jstatd services to Administrator, visualgc works fine. Also interestingly, on a Windows 7 Ultimate box I can install both services as Local System and it works fine there.
The fact that it works in Windows 7 as Local System gives me hope that there's something I can do on Server 2008 to make it work too. If not, I can try falling back to installing the services with Log On as Administrator, but I'm not sure what implications that would have (if any) on my application.
I am using the same Java HotSpot(TM) 64-Bit Server VM version 1.6.0_10 for both JBoss and jstatd, and I am running visualgc from jvmstat 3.0.
Anyone else run into this problem or have any suggestions of things I can try?
来源:https://stackoverflow.com/questions/6293335/windows-server-2008-and-jstatd-as-a-service