mirror of https://github.com/alibaba/arthas.git
add tunnel server docs
parent
582eca9e5a
commit
f10d24a3b6
Binary file not shown.
After Width: | Height: | Size: 150 KiB |
@ -1,11 +1,74 @@
|
|||||||
Web Console
|
Web Console
|
||||||
===
|
===
|
||||||
|
|
||||||
|
|
||||||
|
### Connect arthas through the browser
|
||||||
|
|
||||||
Arthas supports the Web Console. After attach success, the user can access: [http://127.0.0.1:8563/](http://127.0.0.1:8563/).
|
Arthas supports the Web Console. After attach success, the user can access: [http://127.0.0.1:8563/](http://127.0.0.1:8563/).
|
||||||
|
|
||||||
The user can fill in the IP and connect the remote arthas on other machines.
|
The user can fill in the IP and connect the remote arthas on other machines.
|
||||||
|
|
||||||
![web console](_static/web-console-local.png)
|
![](_static/web-console-local.png)
|
||||||
|
|
||||||
|
> By default, arthas only listens to `127.0.0.1`, so if you want to connect from a remote, you can use the `--target-ip` parameter to specify the IP. See the help description for `-h` for more information.
|
||||||
|
|
||||||
|
If you have suggestions for the Web Console, please leave a message here: [https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15)
|
||||||
|
|
||||||
|
### Connect remote arthas through arthas tunnel server
|
||||||
|
|
||||||
|
#### Download and deploy arthas tunnel server
|
||||||
|
|
||||||
|
https://github.com/alibaba/arthas/releases
|
||||||
|
|
||||||
|
Arthas tunnel server is a spring boot fat jar application, start with the `java -jar` command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
java -jar arthas-tunnel-server.jar
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, the web port of the arthas tunnel server is `8080`, and the port connected by the arthas agent is `7777`.
|
||||||
|
|
||||||
|
#### Connecting to the tunnel server when starting arthas
|
||||||
|
|
||||||
|
|
||||||
|
When starting arthas, you can use the `--tunnel-server` parameter, for example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
as.sh --tunnel-server 'ws://47.75.156.201:7777/ws'
|
||||||
|
```
|
||||||
|
|
||||||
|
After Arthas attach succeeds, the agentId will be printed, such as:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
,---. ,------. ,--------.,--. ,--. ,---. ,---.
|
||||||
|
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
|
||||||
|
| .-. || '--'.' | | | .--. || .-. |`. `-.
|
||||||
|
| | | || |\ \ | | | | | || | | |.-' |
|
||||||
|
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'
|
||||||
|
|
||||||
|
|
||||||
|
wiki https://alibaba.github.io/arthas
|
||||||
|
tutorials https://alibaba.github.io/arthas/arthas-tutorials
|
||||||
|
version 3.1.2
|
||||||
|
pid 86183
|
||||||
|
time 2019-08-30 15:40:53
|
||||||
|
id URJZ5L48RPBR2ALI5K4V
|
||||||
|
```
|
||||||
|
|
||||||
|
If the connection is not connected to the tunnel server at startup, you can also obtain the agentId through the `session` command after reconnection succeeds:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
[arthas@86183]$ session
|
||||||
|
Name Value
|
||||||
|
-----------------------------------------------------
|
||||||
|
JAVA_PID 86183
|
||||||
|
SESSION_ID f7273eb5-e7b0-4a00-bc5b-3fe55d741882
|
||||||
|
AGENT_ID URJZ5L48RPBR2ALI5K4V
|
||||||
|
TUNNEL_SERVER ws://47.75.156.201:7777/ws
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
For the above example, go to http://47.75.156.201:8080/ in the browser and input the `agentId` to connect to arthas on remote machine.
|
||||||
|
|
||||||
|
|
||||||
If you have suggestions for the Web Console, please leave a message here: [https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15)
|
![](_static/arthas-tunnel-server.png)
|
Loading…
Reference in New Issue