带有id和config参数的JProfiler代理问题

时间:2014-03-04 10:06:08

标签: java tomcat jprofiler

我们目前在Cent OS计算机上以Prepare for Profiling"模式使用JProfiler 8.0.4以及Tomcat 6和Java 7.我们使用具有浮动许可证的JProfiler。我们在远程服务器上提取了JProfiler Linux Archive。

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

中所述
  

,还可以附加config = [config file]和id = [id]参数,以指示性能分析代理从特定配置文件中的特定会话中获取性能分析设置。如果使用相同的分析设置进行连接,则不必重新转换任何类。

但如果我们像这样添加配置和ID wrapper.java.additional.101 = -agentpath:$ {jprofiler.path} /bin/linux-x64/libjprofilerti.so=port=8849,nowait,id = $ {jprofiler.id},配置= $ {jprofiler.config .path} VM无法启动,因为JProfiler要求许可。

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. 是否有人在生产设置中使用此设置?
  3. 此致

    安德烈亚斯

1 个答案:

答案 0 :(得分:1)

此限制实际上是不必要的,将在JProfiler 8.1中删除。

从8.0开始,如果指定了config参数,则许可证密钥必须位于配置文件中。您可以从%USERPROFILER.jprofiler8 \ config.xml或$ HOME / .jprofiler8 / config.xml复制整个配置文件,而不是将其导出,然后许可证密钥将可供代理使用。