windows客戶端jprofiler連線遠端Linux Tomcat出現的破解身份驗證問題
jprofiler監控Tomcat,連線時出現錯誤提示:
The JVM might have terminated unexpectedly.
If the JVM has crashed,please try the following strategies:
* Reduce the -Xmx value of the profiled application
* Change your profiling settings(e.g. from dynamic instrumentation to sampling)
I tried for a long time not depriving the line,
Later, it found a close look at Terminal prompt "Invalid license key".
JProfiler> Protocol version 25
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 32-bit library
JProfiler> Listening on port: 31757.
JProfiler> Instrumenting native methods.
JProfiler> Native library initialized
JProfiler> Waiting for a connection from the JProfiler GUI ...
JProfiler> Using sampling (5 ms)
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
JProfiler> ERROR: Invalid license key. Aborting.
JProfiler> Disconnected.
Modify the registration code, finally started normally.
Normal start of the Terminal display:
JProfiler> Protocol version 25
JProfiler> Using JVMTI
JProfiler> JVMTI version 1.1 detected.
JProfiler> 32-bit library
JProfiler> Listening on port: 31759.
JProfiler> Instrumenting native methods.
JProfiler> Native library initialized
JProfiler> Waiting for a connection from the JProfiler GUI ...
JProfiler> Using sampling (5 ms)
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
JProfiler> Hotspot compiler enabled
JProfiler> Starting com / lizongbo / smpp / server / Main ...
Listening on port a 5435
References:
JProfiler Java server performance tracking to solve the original: http://www.blogjava.net/anymobile/articles/28248.html
(Reprinted: http://www.duduwolf.com/wiki/2007/311.html)
解決辦法
1、在windows端找到“C:\Users\xxx\.jprofiler7\config.xml” ,開啟此檔案
找到“<licenseKey name="lych" company="hkrt" key="[email protected]#24777-1i8da63tvtyl2#1119" />”拷貝到
linux環境中的目錄 \root\.jprofiler7\config.xml檔案中
找到改行<licenseKey name="" company="" key="" />
將此行改為: <licenseKey name="lych" company="hkrt" key="
2、修改TOMCAT啟動檔案catalina.sh,
新增:
JAVA_OPTS="$JAVA_OPTS -server -Xms2048m -Xmx2048m -XX:PermSize=256m -XX:MaxNewSize=512m -XX:MaxPermSize=512m -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -agentlib:jprofilerti=port=8849
config=/root/.jprofiler7/config.xml
3.重啟tomcat
4.windows jprofiler客戶端 重新連線linux ,成功!