简单的 Jprofiler 设置不起作用

发布于 2024-11-02 06:18:33 字数 761 浏览 0 评论 0原文

我正在尝试启动并运行 JProfiler 的简单本地主机会话。我已经创建了会话,主机是127.0.0.1,端口是默认的8849,并且我已将启动/关闭命令指向我的本地tomcat安装startup.sh/shutdown.sh。我单击“确定”,然后收到“正在连接到 127.0.0.1:8849”,150 秒后(我修改了超时)它超时并显示:

无法连接到 127.0.0.1:8849。请确保远程地址正确、远程程序正常启动、网络路由允许socket连接。

地址不可能是错误的,并且我已经验证(ps -ef | grep tomcat)该进程已启动,并且还检查了tomcat日志并且它正在等待请求:

INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 15, 2011 7:49:13 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 15, 2011 7:49:13 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/21  config=null
Apr 15, 2011 7:49:13 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 47312 ms

是否还有其他我需要做的事情才能打开港口?例如,我应该修改传递给 tomcat 的 JAVA_OPTS 吗?

I'm trying to get a simple, localhost session of JProfiler up and running. I've created the session, the host is 127.0.0.1, the port is the default 8849, and I've pointed the startup/shutdown commands to my local tomcat installation startup.sh/shutdown.sh. I click OK and I get "Connecting to 127.0.0.1:8849" and after 150 seconds (I modified the timeout) it times out and says:

Could not connect to 127.0.0.1:8849. Please make sure that the remote address is correct, the remote program is started properly, and the network route allows socket connections.

The address can't possibly be wrong, and I've verified (ps -ef|grep tomcat) that the process is up, and also checked the tomcat log and it's waiting for requests:

INFO: Starting Coyote HTTP/1.1 on http-8080
Apr 15, 2011 7:49:13 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 15, 2011 7:49:13 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/21  config=null
Apr 15, 2011 7:49:13 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 47312 ms

Is there something else I need to do to open the port? For instance am I supposed to modify the JAVA_OPTS that get passed to tomcat?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

把昨日还给我 2024-11-09 06:18:33

是的。
你需要这样的东西(对于 OS X)

export JAVA_OPTS="-agentlib:jprofilerti=port=8849  \
   -Xbootclasspath/a:/Applications/jprofiler5/bin/agent.jar"

export DYLD_LIBRARY_PATH=/Applications/jprofiler5/bin/macos

通常当你通过 JProfiler 中的向导配置新会话时,它会告诉你需要输入的确切参数。

对我来说,这个向导是 StartCenter -> 。新建会话,然后选择“新建远程集成”。
然后,这将询问本地/远程、启动模式、jvm 类型、分析端口,第 6 页显示“执行所需的修改”并列出了这些内容。

或者,您可以从菜单栏中选择“集成向导”。

Yes.
you need something like this (for OS X)

export JAVA_OPTS="-agentlib:jprofilerti=port=8849  \
   -Xbootclasspath/a:/Applications/jprofiler5/bin/agent.jar"

export DYLD_LIBRARY_PATH=/Applications/jprofiler5/bin/macos

Usually when you configure a new session through the wizard in JProfiler, it will tell you those exact parameters that you need to put in.

For me this wizard is StartCenter -> New Session , then select "New remote integration".
This will then ask local/remote , startup mode, jvm type, profiling port and on page 6 says "Perform required modifications" and it lists those.

Alternatively you can select "Integration wizard" from the menu bar.

夜灵血窟げ 2024-11-09 06:18:33

第 1 步:在 Linux 计算机中,打开 /root 目录中的 .bash_profile 文件。
在此处输入代码.bash_profile 文件中输入 jprofiller 位置(使用下面的命令导出)

export LD_LIBRARY_PATH=/dsvol/jprofiler6/bin/linux-x86

第 2 步: 进入 Tomcat 安装目录。从 bin 文件夹中打开 catalina.sh 文件
catalina.sh 文件中输入以下详细信息(默认情况下,在 catalina.sh 文件中只能找到红色信息和黑色信息)

export JPROFILER_HOME
JAVA_OPTS="-Xms768m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -agentpath:/opt/Performance/jprofiler7/bin/linux-x86/libjprofilerti.so=port=8849 $CATALINA_OPTS"

第 3 步: 通过执行 starup.sh 命令从 bin 文件夹启动服务器

Step 1: In Linux machine open .bash_profile file from /root directory.
Enter jprofiller location (using below command export) in enter code here.bash_profile file

export LD_LIBRARY_PATH=/dsvol/jprofiler6/bin/linux-x86

Step 2: Go into Tomcat installation directory. Open catalina.sh file from bin folder
Enter the below details in catalina.sh file (only red color information and black color you can find by default in catalina.sh file)

export JPROFILER_HOME
JAVA_OPTS="-Xms768m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -agentpath:/opt/Performance/jprofiler7/bin/linux-x86/libjprofilerti.so=port=8849 $CATALINA_OPTS"

Step 3: Start the server from bin folder by executing the starup.sh command

挖个坑埋了你 2024-11-09 06:18:33

最简单的配置方法是按照此处描述的 JProfiler 提供的向导进行操作,还有非常方便的非 GUI 向导:

http://resources.ej-technologies。 com/jprofiler/help/doc/indexRedirect.html?http&&&resources.ej-technologies.com/jprofiler/help/doc/sessions/remote.html

例如,对于 Tomcat,将自动插入以下内容进入Tomcat的startup.sh脚本,这意味着你不必猜测:


# The following lines have been added by the
# application server integration wizard of JProfiler

CATALINA_OPTS="-agentpath:/local/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849,nowait $CATALINA_OPTS"
export CATALINA_OPTS

# end of modifications

exec "$PRGDIR"/"$EXECUTABLE" run "$@"

祝你好运

The easiest way to configure would be to follow the wizards provided by JProfiler which is described here, there are also non-GUI wizards which are very handy:

http://resources.ej-technologies.com/jprofiler/help/doc/indexRedirect.html?http&&&resources.ej-technologies.com/jprofiler/help/doc/sessions/remote.html

For example for Tomcat the following is automatically inserted into Tomcat's startup.sh script, which means you don't have to guess:


# The following lines have been added by the
# application server integration wizard of JProfiler

CATALINA_OPTS="-agentpath:/local/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849,nowait $CATALINA_OPTS"
export CATALINA_OPTS

# end of modifications

exec "$PRGDIR"/"$EXECUTABLE" run "$@"

Good luck

给我一枪 2024-11-09 06:18:33
-agentpath:/Applications/JProfiler.app/Contents/Resources/app/bin/macos/libjprofilerti.jnilib  -Xbootclasspath/a:/Applications/JProfiler.app/Contents/Resources/app/bin/agent.jar

这对我有用,JProfiler 9.1.1;操作系统 10.11.3

-agentpath:/Applications/JProfiler.app/Contents/Resources/app/bin/macos/libjprofilerti.jnilib  -Xbootclasspath/a:/Applications/JProfiler.app/Contents/Resources/app/bin/agent.jar

This is working for me, JProfiler 9.1.1; OSX 10.11.3

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文