2014-03-04 38 views
2

我們目前在我們的Cent OS機器上與Tomcat 6和Java 7一起在Prepare for Profiling"模式下使用JProfiler 8.0.4。我們使用帶有浮動許可證的JProfiler。我們在遠程服務器上解壓JProfiler Linux Archive。帶有ID和配置參數的JProfiler代理程序問題

Tomcat由Tanuki Wrapper管理。這裏是我們的配置

wrapper.java.additional.101=-agentpath:${jprofiler.path}/bin/linux-x64/libjprofilerti.so=port=8849,nowait 

這種運作良好,並在啓動時,我們發現這在日誌

INFO | jvm 1 | main | 2014/03/04 10:06:41.872 | JProfiler> Don't wait for frontend to connect. 
INFO | jvm 1 | main | 2014/03/04 10:06:41.872 | JProfiler> Protocol version 38 
INFO | jvm 1 | main | 2014/03/04 10:06:41.872 | JProfiler> Using JVMTI 
INFO | jvm 1 | main | 2014/03/04 10:06:41.872 | JProfiler> JVMTI version 1.1 detected. 
INFO | jvm 1 | main | 2014/03/04 10:06:41.873 | JProfiler> 64-bit library 
INFO | jvm 1 | main | 2014/03/04 10:06:41.873 | JProfiler> Starting up without initial configuration. 
INFO | jvm 1 | main | 2014/03/04 10:06:41.873 | JProfiler> Listening on port: 8849. 
INFO | jvm 1 | main | 2014/03/04 10:06:41.873 | JProfiler> Instrumenting native methods. 
INFO | jvm 1 | main | 2014/03/04 10:06:41.873 | JProfiler> Can retransform classes. 
INFO | jvm 1 | main | 2014/03/04 10:06:41.873 | JProfiler> Can retransform any class. 
INFO | jvm 1 | main | 2014/03/04 10:06:41.873 | JProfiler> Native library initialized 
INFO | jvm 1 | main | 2014/03/04 10:06:42.074 | JProfiler> VM initialized 

最後,我們正在與我們的JProfiler的客戶端連接到代理和萬物的罰款。

1

提到的,它也可以追加,配置= [配置文件]和,ID = [ID]參數指示剖析代理從在特定會話採取剖析設置一個特定的配置文件。如果您使用相同的分析設置進行連接,則不需要重新轉換類。

,但如果我們增加配置和id這樣 wrapper.java.additional.101 = -agentpath:$ {} jprofiler.path /bin/linux-x64/libjprofilerti.so=port=8849,nowait, id = $ {jprofiler.id},config = $ {jprofiler.config.path}由於JProfiler要求許可證,VM無法啓動。

INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Don't wait for frontend to connect. 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Protocol version 38 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Using JVMTI 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> JVMTI version 1.1 detected. 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> 64-bit library 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Using config file /path/to/config/jprofiler-config.xml (id: 100) 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Listening on port: 8849. 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Instrumenting native methods. 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Can retransform classes. 
INFO | jvm 5 | main | 2014/03/04 10:05:30.475 | JProfiler> Can retransform any class. 
INFO | jvm 5 | main | 2014/03/04 10:05:30.476 | JProfiler> Native library initialized 
ERROR | wrapper | main | 2014/03/04 10:05:30.614 | JVM exited while loading the application. 
INFO | jvm 5 | main | 2014/03/04 10:05:30.614 | JProfiler> VM initialized 
INFO | jvm 5 | main | 2014/03/04 10:05:30.614 | JProfiler> Using dynamic instrumentation 
INFO | jvm 5 | main | 2014/03/04 10:05:30.615 | JProfiler> Time measurement: elapsed time 
INFO | jvm 5 | main | 2014/03/04 10:05:30.615 | JProfiler> CPU profiling enabled 
INFO | jvm 5 | main | 2014/03/04 10:05:30.615 | JProfiler> ERROR: Invalid license key. 

這裏是我的問題:

  1. 任何人知道如何告訴許可代理?
  2. 任何人在生產設置中使用過這些設置?

問候,

安德烈亞斯

回答

1

此限制實際上是不必要的,並且將在JProfiler的8.1被移除。

從8.0開始,如果指定了config參數,許可證密鑰必須位於配置文件中。您可以從%USERPROFILER.jprofiler8 \ config.xml或$ HOME/.jprofiler8/config.xml複製整個配置文件,而不是導出它,然後許可證密鑰可供代理使用。

+0

謝謝你Ingo!有用!我只是提取許可證部分,並將其插入到服務器配置文件中。 –