mirror of
https://github.com/alibaba/arthas.git
synced 2026-10-21 12:32:38 +00:00
update doc
This commit is contained in:
@@ -18,7 +18,7 @@ If you have suggestions for the Web Console, please leave a message here: [https
|
||||
|
||||
#### Download and deploy arthas tunnel server
|
||||
|
||||
https://github.com/alibaba/arthas/releases
|
||||
[https://github.com/alibaba/arthas/releases](https://github.com/alibaba/arthas/releases)
|
||||
|
||||
Arthas tunnel server is a spring boot fat jar application, start with the `java -jar` command:
|
||||
|
||||
@@ -28,6 +28,16 @@ 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`.
|
||||
|
||||
Once started, you can go to [http://localhost:8080/](http://localhost:8080/) and connect to the registered arthas agent via `agentId`.
|
||||
|
||||
Through Spring Boot's Endpoint, you can view the specific connection information: [http://localhost:8080/actuator/arthas](http://localhost:8080/actuator/arthas), the login user name is `arthas`, and the password can be found in the log of arthas tunnel server, for example:
|
||||
|
||||
```
|
||||
32851 [main] INFO o.s.b.a.s.s.UserDetailsServiceAutoConfiguration
|
||||
|
||||
Using generated security password: f1dca050-3777-48f4-a577-6367e55a78a2
|
||||
```
|
||||
|
||||
#### Connecting to the tunnel server when starting arthas
|
||||
|
||||
|
||||
@@ -37,6 +47,8 @@ When starting arthas, you can use the `--tunnel-server` parameter, for example:
|
||||
as.sh --tunnel-server 'ws://47.75.156.201:7777/ws'
|
||||
```
|
||||
|
||||
* You can specify the agentId by the `--agent-id` parameter. By default, a random ID is generated.
|
||||
|
||||
After Arthas attach succeeds, the agentId will be printed, such as:
|
||||
|
||||
```bash
|
||||
@@ -68,7 +80,16 @@ If the connection is not connected to the tunnel server at startup, you can also
|
||||
```
|
||||
|
||||
|
||||
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.
|
||||
For the above example, go to [http://47.75.156.201:8080/](http://47.75.156.201:8080/) in the browser and input the `agentId` to connect to arthas on remote machine.
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
#### How arthas tunnel server works
|
||||
|
||||
```
|
||||
browser <-> arthas tunnel server <-> arthas tunnel client <-> arthas agent
|
||||
```
|
||||
|
||||
[https://github.com/alibaba/arthas/blob/master/tunnel-server/README.md](https://github.com/alibaba/arthas/blob/master/tunnel-server/README.md)
|
||||
@@ -24,7 +24,7 @@ Arthas目前支持Web Console,用户在attach成功之后,可以直接访问
|
||||
|
||||
#### 下载部署arthas tunnel server
|
||||
|
||||
https://github.com/alibaba/arthas/releases
|
||||
[https://github.com/alibaba/arthas/releases](https://github.com/alibaba/arthas/releases)
|
||||
|
||||
Arthas tunnel server是一个spring boot fat jar应用,直接`java -jar`启动:
|
||||
|
||||
@@ -34,6 +34,16 @@ java -jar arthas-tunnel-server.jar
|
||||
|
||||
默认情况下,arthas tunnel server的web端口是`8080`,arthas agent连接的端口是`7777`。
|
||||
|
||||
启动之后,可以访问 [http://localhost:8080/](http://localhost:8080/) ,再通过`agentId`连接到已注册的arthas agent上。
|
||||
|
||||
通过Spring Boot的Endpoint,可以查看到具体的连接信息: [http://localhost:8080/actuator/arthas](http://localhost:8080/actuator/arthas) ,登陆用户名是`arthas`,密码在arthas tunnel server的日志里可以找到,比如:
|
||||
|
||||
```
|
||||
32851 [main] INFO o.s.b.a.s.s.UserDetailsServiceAutoConfiguration
|
||||
|
||||
Using generated security password: f1dca050-3777-48f4-a577-6367e55a78a2
|
||||
```
|
||||
|
||||
#### 启动arthas时连接到tunnel server
|
||||
|
||||
在启动arthas,可以传递`--tunnel-server`参数,比如:
|
||||
@@ -42,6 +52,8 @@ java -jar arthas-tunnel-server.jar
|
||||
as.sh --tunnel-server 'ws://47.75.156.201:7777/ws'
|
||||
```
|
||||
|
||||
* 如果有特殊需求,可以通过`--agent-id`参数里指定agentId。默认情况下,会生成随机ID。
|
||||
|
||||
attach成功之后,会打印出agentId,比如:
|
||||
|
||||
```bash
|
||||
@@ -73,7 +85,16 @@ id URJZ5L48RPBR2ALI5K4V
|
||||
```
|
||||
|
||||
|
||||
以上面的为例,在浏览器里访问 http://47.75.156.201:8080/ ,输入 `agentId`,就可以连接到本机上的arthas了。
|
||||
以上面的为例,在浏览器里访问 [http://47.75.156.201:8080/](http://47.75.156.201:8080/) ,输入 `agentId`,就可以连接到本机上的arthas了。
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
#### Arthas tunnel server的工作原理
|
||||
|
||||
```
|
||||
browser <-> arthas tunnel server <-> arthas tunnel client <-> arthas agent
|
||||
```
|
||||
|
||||
[https://github.com/alibaba/arthas/blob/master/tunnel-server/README.md](https://github.com/alibaba/arthas/blob/master/tunnel-server/README.md)
|
||||
Reference in New Issue
Block a user