add tunnel server docs

pull/853/head
hengyunabc 5 years ago
parent 582eca9e5a
commit f10d24a3b6

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

@ -11,13 +11,13 @@
Arthas开源交流钉钉群21965291 ,搜索群号即可加入。
![web console](_static/dingding_qr.jpg)
![](_static/dingding_qr.jpg)
### QQ群
Arthas开源交流QQ群916328269
![web console](_static/qqgroup_qr.jpg)
![](_static/qqgroup_qr.jpg)

@ -58,4 +58,4 @@ uptime 16020s busy
### 截图展示
![alt text](_static/dashboard.png "dashboard")
![](_static/dashboard.png "dashboard")

@ -3,7 +3,7 @@
## 下载全量包
最新版本,点击下载:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
最新版本,点击下载:[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
解压后,在文件夹里有`arthas-boot.jar`,直接用`java -jar`的方式启动:
@ -19,5 +19,5 @@ java -jar arthas-boot.jar -h
## 下载离线文档
下载文档:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
下载文档:[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)

@ -58,4 +58,4 @@ uptime 16020s busy
### Screenshot
![alt text](../_static/dashboard.png "dashboard")
![](../_static/dashboard.png "dashboard")

@ -3,7 +3,7 @@ Download
## Download full package
Latest Version, Click To Download: [![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
Latest Version, Click To Download: [![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
Download and unzip, find `arthas-boot.jar` in the directory. Start with `java` command:
@ -19,5 +19,5 @@ java -jar arthas-boot.jar -h
## Download Offline Help Documentation
Latest Version Documentation, Click To Download:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
Latest Version Documentation, Click To Download:[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)

@ -3,7 +3,7 @@ Arthas Documentation
**[中文文档/Chinese Documentation](https://alibaba.github.io/arthas/)**
![arthas](arthas.png)
![](arthas.png)
Arthas is a Java diagnostic tool open-sourced by Alibaba middleware team. It is widely adopted and popular among the developers inside Alibaba. Arthas helps developers in trouble-shooting issues in production environment for Java based applications without modifying code or restarting servers.
@ -44,6 +44,7 @@ Contents
* [Quick start](quick-start.md)
* [Advanced usage](advanced-use.md)
* [Commands](commands.md)
* [WebConsole](web-console.md)
* [Docker](docker.md)
* [User cases](https://github.com/alibaba/arthas/issues?q=label%3Auser-case)
* [Questions and answers](https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered)

@ -35,7 +35,7 @@ You can enter its interactive interface by executing `as.sh`, or execute `as.sh
## Full installation
Latest Version, Click To Download: [![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
Latest Version, Click To Download: [![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
Download and unzip, find `arthas-boot.jar` in the directory. Start with `java` command:
@ -80,7 +80,7 @@ as.sh
## Offline Help Documentation
Latest Version Documentation, Click To Download:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
Latest Version Documentation, Click To Download:[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
## Uninstall

@ -5,7 +5,7 @@ Manually Install Arthas
1. Download the latest version
**Latest version, Click To Download**: [![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
**Latest version, Click To Download**: [![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
If the download speed is slow, try to use [Ali cloud mirror repository](https://maven.aliyun.com/), for example, to download version `3.x.x` (you can replace `3.x.x` in the example URL if you want to download other version), the download URL is: https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/3.x.x/arthas-packaging-3.x.x-bin.zip
@ -51,7 +51,7 @@ You can enter its interactive interface by executing `as.sh`, or execute `as.sh
### Windows
Latest Version, Click To Download: [![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
Latest Version, Click To Download: [![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
Download and unzip, then find `as.bat` from 'bin' directory. For now this script will only take one argument `pid`, which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better :heart:)

@ -1,11 +1,74 @@
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/).
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)

@ -5,7 +5,7 @@ Arthas 用户文档
## Arthas阿尔萨斯 能为你做什么?
![arthas](arthas.png)
![](arthas.png)
`Arthas` 是Alibaba开源的Java诊断工具深受开发者喜爱。
@ -32,6 +32,7 @@ Contents
* [快速入门](quick-start.md)
* [进阶使用](advanced-use.md)
* [命令列表](commands.md)
* [WebConsole](web-console.md)
* [Docker](docker.md)
* [用户案例](https://github.com/alibaba/arthas/issues?q=label%3Auser-case)
* [常见问题](https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered)

@ -53,7 +53,7 @@ curl -L https://alibaba.github.io/arthas/install.sh | sh
## 全量安装
最新版本,点击下载:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
最新版本,点击下载:[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
解压后,在文件夹里有`arthas-boot.jar`,直接用`java -jar`的方式启动:
@ -103,7 +103,7 @@ as.sh
## 离线帮助文档
最新版本离线文档下载:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
最新版本离线文档下载:[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=doc&v=LATEST)
## 卸载

@ -6,7 +6,7 @@
1. 下载最新版本
**最新版本,点击下载**[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
**最新版本,点击下载**[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
如果下载速度比较慢,可以尝试用[阿里云的镜像仓库](https://maven.aliyun.com/),比如要下载`3.x.x`版本(替换`3.x.x`为最新版本下载的url是
@ -58,7 +58,7 @@ curl -L https://alibaba.github.io/arthas/install.sh | sh
### Windows
最新版本,点击下载:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
最新版本,点击下载:[![](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST)
下载解压后在bin目录有 `as.bat`。此脚本暂时只接受一个参数 pid即只能诊断本机上的 Java 进程。欢迎精通bat脚本的开发者改进

@ -1,10 +1,79 @@
Web Console
===
### 通过浏览器连接arthas
Arthas目前支持Web Console用户在attach成功之后可以直接访问[http://127.0.0.1:8563/](http://127.0.0.1:8563/)。
可以填入IP远程连接其它机器上的arthas。
![web console](_static/web-console-local.png)
![](_static/web-console-local.png)
> 默认情况下arthas只listen 127.0.0.1,所以如果想从远程连接,则可以使用 `--target-ip`参数指定listen的IP更多参考`-h`的帮助说明。
> 注意会有安全风险考虑下面的tunnel server的方案。
后续更多Web Console功能支持请到issue下留言[https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15)
### 使用arthas tunnel server连接远程arthas
#### 下载部署arthas tunnel server
https://github.com/alibaba/arthas/releases
Arthas tunnel server是一个spring boot fat jar应用直接`java -jar`启动:
```bash
java -jar arthas-tunnel-server.jar
```
默认情况下arthas tunnel server的web端口是`8080`arthas agent连接的端口是`7777`。
#### 启动arthas时连接到tunnel server
在启动arthas可以传递`--tunnel-server`参数,比如:
```bash
as.sh --tunnel-server 'ws://47.75.156.201:7777/ws'
```
attach成功之后会打印出agentId比如
```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
```
如果是启动时没有连接到 tunnel server也可以在后续自动重连成功之后通过 session命令来获取 agentId
```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
```
以上面的为例,在浏览器里访问 http://47.75.156.201:8080/ ,输入 `agentId`就可以连接到本机上的arthas了。
后续更多Web Console功能支持请到issue下留言[https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15)
![](_static/arthas-tunnel-server.png)
Loading…
Cancel
Save