本文介绍了在Apache DolphinScheduler中嵌入Arthas的方法,以实现对接口调用的监控。Arthas是一款强大的 Java诊断工具,能够帮助开发者实时查看应用程序的运行状态、性能瓶颈和方法调用情况。在DolphinScheduler中集成Arthas,可以方便地捕获任务调度时的关键调用信息,及时发现并解决性能问题,提高系统的稳定性。本文将详细说明如何在DolphinScheduler环境下启动Arthas,监控特定接口的调用,并分析收集到的性能数据,从而提升任务调度的可靠性和可维护性。
手动安装
https://arthas.aliyun.com/download/latest_version?mirror=aliyun
arthas-packaging-3.7.2-bin.zip
cp arthas-packaging-3.7.2-bin.zip /opt/arthas
cd /opt/arthas
unzip arthas-packaging-3.7.2-bin.zip
java -jar arthas-boot.jar
选择对应的进程号
报错解决
报错1
[ERROR] Start arthas failed, exception stack trace:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:106)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:78)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:250)
at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:102)
at com.taobao.arthas.core.Arthas.<init>(Arthas.java:27)
at com.taobao.arthas.core.Arthas.main(Arthas.java:161)
解决 :
进入 ${DOLPINSCHEUDLER_HOME}/api-server/bin下,在 jvm_args_env.sh 中添加如下 :
-XX:+StartAttachListener
报错2
Picked up JAVA_TOOL_OPTIONS:
java.io.IOException: well-known file /tmp/.java_pid731688 is not secure: file should be owned by

最低0.47元/天 解锁文章
230

被折叠的 条评论
为什么被折叠?



