V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
gweipingzhang
V2EX  ›  问与答

[有偿] Arthas 启动报错,请教各位大佬。

  •  
  •   gweipingzhang · 238 天前 · 907 次点击
    这是一个创建于 238 天前的主题,其中的信息可能已经有所发展或是发生改变。
    帮忙解决了的话,报我支付宝,我给你转钱( 50 )

    用 java -jar arthas-boot PID 来进入,


    报错信息如下:
    [INFO] arthas-boot version: 3.5.3
    [INFO] arthas home: /root/.arthas/lib/3.7.2/arthas
    [INFO] Try to attach process 10434
    [INFO] Found java home from System Env JAVA_HOME: /root/ncc1911pro/home/ufjdk
    [INFO] Attach process 10434 success.
    [INFO] arthas-client connect 127.0.0.1 3658
    Connect to telnet server error: 127.0.0.1 3658
    java.net.ConnectException: Connection refused (Connection refused)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:607)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:188)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:209)
    at com.taobao.arthas.client.TelnetConsole.process(TelnetConsole.java:306)
    at com.taobao.arthas.client.TelnetConsole.main(TelnetConsole.java:166)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.taobao.arthas.boot.Bootstrap.main(Bootstrap.java:615)






    后面去社区查了下,发现说用 as.sh 来启动看看。

    然后用 as.sh 选第一个 10434 是可以进入的,但是选择第二个 10323 缺不行了。一样报的
    java.net.ConnectException: Connection refused (Connection refused)

    [root@cnncc arthas]# ./as.sh
    Arthas script version: 3.7.2
    [INFO] JAVA_HOME: /root/n1911pro/home/ufjdk
    Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
    * [1]: 10434 nc.bs.mw.start.AloneBootstrap
    [2]: 10323 nc.bs.mw.start.AloneBootstrap
    [3]: 10471 nc.bs.mw.start.AloneBootstrap
    [4]: 10328 nc.bs.mw.start.AloneBootstrap
    [5]: 10281 nc.bs.mw.start.AloneBootstrap
    [6]: 10395 nc.bs.mw.start.AloneBootstrap
    1
    Arthas home: /root/n1911pro/home/test/arthas
    Calculating attach execution time...
    Attaching to 10434 using version /root/n1911pro/home/test/arthas...

    real 0m0.938s
    user 0m0.276s
    sys 0m0.053s
    Attach success.
    telnet connecting to arthas server... current timestamp is 1714118425
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.
    ,---. ,------. ,--------.,--. ,--. ,---. ,---.
    / O \ | .--. ''--. .--'| '--' | / O \ ' .-'
    | .-. || '--'.' | | | .--. || .-. |`. `-.
    | | | || |\ \ | | | | | || | | |.-' |
    `--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'

    wiki https://arthas.aliyun.com/doc
    tutorials https://arthas.aliyun.com/doc/arthas-tutorials.html
    version 3.7.2
    main_class
    pid 10434
    time 2024-04-26 16:00:25


    贴下 arthas log

    [root@cnncc arthas]# tail -n 20 ~/logs/arthas/arthas.log
    2024-04-26 15:39:57 [arthas-NettyWebsocketTtyBootstrap-4-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0xfe2f7d4e] REGISTERED
    2024-04-26 15:39:57 [arthas-NettyWebsocketTtyBootstrap-4-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0xfe2f7d4e] BIND: /127.0.0.1:8563
    2024-04-26 15:39:57 [arthas-NettyWebsocketTtyBootstrap-4-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0xfe2f7d4e, L:/127.0.0.1:8563] ACTIVE
    2024-04-26 15:39:57 [arthas-NettyWebsocketTtyBootstrap-4-2] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x50d6d13e] REGISTERED
    2024-04-26 15:39:57 [arthas-NettyWebsocketTtyBootstrap-4-2] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x50d6d13e] BIND: local:arthas-netty-localaddress
    2024-04-26 15:39:57 [arthas-NettyWebsocketTtyBootstrap-4-2] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x50d6d13e, L:local:arthas-netty-localaddress] ACTIVE
    2024-04-26 15:39:57 [arthas-binding-thread] INFO c.t.a.core.server.ArthasBootstrap -as-server listening on network=127.0.0.1;telnet=3658;http=8563;timeout=6000;
    2024-04-26 15:39:57 [arthas-binding-thread] INFO c.t.a.core.server.ArthasBootstrap -as-server started in 570 ms
    2024-04-26 15:39:57 [arthas-NettyHttpTelnetBootstrap-3-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x843c239d, L:/127.0.0.1:3658] READ: [id: 0x062f1aef, L:/127.0.0.1:3658 - R:/127.0.0.1:36958]
    2024-04-26 15:39:57 [arthas-NettyHttpTelnetBootstrap-3-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x843c239d, L:/127.0.0.1:3658] READ COMPLETE
    2024-04-26 15:39:57 [arthas-NettyHttpTelnetBootstrap-3-2] INFO c.t.a.core.shell.term.impl.Helper -Loaded arthas keymap file from com/taobao/arthas/core/shell/term/readline/inputrc
    2024-04-26 15:40:09 [arthas-command-execute] INFO c.t.arthas.core.advisor.Enhancer -Success to reset classes: []
    2024-04-26 15:40:09 [arthas-NettyHttpTelnetBootstrap-3-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x843c239d, L:/127.0.0.1:3658] INACTIVE
    2024-04-26 15:40:09 [arthas-NettyHttpTelnetBootstrap-3-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x843c239d, L:/127.0.0.1:3658] UNREGISTERED
    2024-04-26 15:40:09 [arthas-NettyWebsocketTtyBootstrap-4-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0xfe2f7d4e, L:/127.0.0.1:8563] CLOSE
    2024-04-26 15:40:09 [arthas-NettyWebsocketTtyBootstrap-4-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0xfe2f7d4e, L:/127.0.0.1:8563] INACTIVE
    2024-04-26 15:40:09 [arthas-NettyWebsocketTtyBootstrap-4-1] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0xfe2f7d4e, L:/127.0.0.1:8563] UNREGISTERED
    2024-04-26 15:40:09 [arthas-NettyWebsocketTtyBootstrap-4-2] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x50d6d13e, L:local:arthas-netty-localaddress] INACTIVE
    2024-04-26 15:40:09 [arthas-NettyWebsocketTtyBootstrap-4-2] INFO c.a.a.d.i.n.h.logging.LoggingHandler -[id: 0x50d6d13e, L:local:arthas-netty-localaddress] UNREGISTERED
    2024-04-26 15:40:09 [arthas-command-execute] INFO c.t.a.core.server.ArthasBootstrap -as-server destroy completed.
    5 条回复    2024-04-26 21:39:38 +08:00
    imzcg2
        1
    imzcg2  
       238 天前
    https://github.com/alibaba/arthas/issues/2169 issue 说是防火墙问题,请注意
    imzcg2
        2
    imzcg2  
       238 天前
    https://github.com/alibaba/arthas/issues/2255 这个也有可能,需要注意
    gweipingzhang
        3
    gweipingzhang  
    OP
       238 天前
    @imzcg2 我是能启动成功过的,如果是防火墙的问题,那通过 as.sh 去选进程的时候,就不应该成功。但是我是成功了的。
    hahaha121
        5
    hahaha121  
       238 天前
    有没有可能是启动了 10434 之后端口占用了, 进入 10434 之后 stop 再进 10323 看看?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2937 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 08:25 · PVG 16:25 · LAX 00:25 · JFK 03:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.