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

210 天前
 gweipingzhang
帮忙解决了的话,报我支付宝,我给你转钱( 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.
861 次点击
所在节点    问与答
5 条回复
imzcg2
210 天前
https://github.com/alibaba/arthas/issues/2169 issue 说是防火墙问题,请注意
imzcg2
210 天前
https://github.com/alibaba/arthas/issues/2255 这个也有可能,需要注意
gweipingzhang
210 天前
@imzcg2 我是能启动成功过的,如果是防火墙的问题,那通过 as.sh 去选进程的时候,就不应该成功。但是我是成功了的。
imzcg2
210 天前
hahaha121
210 天前
有没有可能是启动了 10434 之后端口占用了, 进入 10434 之后 stop 再进 10323 看看?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1035955

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX