[alibaba/arthas]Springboot集成arthas,使用arthas-tunnel-serverl连接时报错

2021-12-05 819 views
5
环境信息
  • arthas-tunnel-server-3.5.4-fatjar.jar
  • Arthas 版本: 3.5.4
  • 操作系统版本: windows11
  • 目标进程的JVM版本: jdk8
重现问题的步骤
  1. Springboot集成引入jar包

        <dependency>
            <groupId>com.taobao.arthas</groupId>
            <artifactId>arthas-spring-boot-starter</artifactId>
            <version>3.5.4</version>
        </dependency>
  2. Springboot application-properties加入配置

    arthas.agent-id=hsehdfsfghhwertyfad8082888
    arthas.tunnel-server=ws://localhost:7777/ws
  3. java -jar arthas-tunnel-server-3.5.4-fatjar.jar正常启动

  4. 打开localhost:8080 tunnel页面,输入ip,port、agent-id点击connect

  5. tennel界面变成黑色,不显示任何信息

  6. tunnel后台日志提示报错

期望的结果

期望正常连接能监控Springboot程序

实际运行的结果

Springboot日志没有任何打印,报错日志在点击连接时 tunnel里显示以下报错

警告:An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception
java.lang.IllegalArgumentException: WebSocket close status code does NOT comply with RFC-6455: 2000

回答

2

Springboot中只配置arthas.app-name去掉agent-id,之后用localhost:8080/apps.html也是识别不到的。不清楚是不是Springboot中被限制了,还是我配置arthas有问题

4

debug tunnel-server代码,com.alibaba.arthas.tunnel.server.TunnelServer#addAgent 包括上游代码进行断点。启动引入arthas的服务,并没有进入断点。不太清楚是不是问题服务配置的问题,还是有其他配置影响了整合arthas。

3

使用3.5.5版本没有出现问题

9

遇到类似的问题 不过我这边检查到有其他配置(spring.arthas.enabled=false)影响导致