Arthas 是Alibaba开源的Java诊断工具。排查问题的神兵利器
具体的使用方法参见官方教程:https://arthas.aliyun.com/doc/quick-start.html
http://okami.top:8888/arthas/arthas-tunnel-server-3.6.0-fatjar.jar
java -jar arthas-tunnel-server*.jar
web端口是8080
,arthas agent连接的端口是7777
。
<dependency> <groupId>com.taobao.arthas</groupId> <artifactId>arthas-spring-boot-starter</artifactId> <version>${arthas.version}</version> </dependency>
arthas: #agent-id: hsehdfsfghhwertyfad # web console中通过agentId连接进程 tunnel-server: ws://127.0.0.1:7777/ws # arthas tunnel server的地址 app-name: ${spring.application.name} # 服务名称,如果有了agentId的话,无效。可以在webConsole/apps.html中看到现有的app #如果是防止一个机器上启动多个 arthas端口冲突。可以配置为随机端口(配置为0),或者配置为 -1,并且通过tunnel server来使用arthas。 telnet-port: -1 http-port: -1