From 328ac79bed1a6dfb55df3e0931d8083bd7408061 Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Tue, 9 Mar 2021 15:29:44 +0800 Subject: [PATCH] update doc --- README.html | 4 +- _sources/advanced-use.md.txt | 3 + _sources/auth.md.txt | 72 ++++++ _sources/commands.md.txt | 1 + _sources/faq.md.txt | 11 +- _sources/http-api.md.txt | 4 + _sources/tunnel.md.txt | 3 + _static/documentation_options.js | 2 +- advanced-use.html | 35 ++- advice-class.html | 4 +- agent.html | 13 +- arthas-properties.html | 13 +- arthas3.html | 4 +- arthas_3_0/new_feature.html | 4 +- async.html | 13 +- auth.html | 383 ++++++++++++++++++++++++++++ base64.html | 5 +- batch-support.html | 13 +- cat.html | 5 +- classloader.html | 5 +- commands.html | 6 +- contact-us.html | 4 +- dashboard.html | 5 +- docker.html | 4 +- download.html | 4 +- dump.html | 5 +- echo.html | 5 +- en/.buildinfo | 2 +- en/README.html | 4 +- en/_sources/advanced-use.md.txt | 4 + en/_sources/auth.md.txt | 69 +++++ en/_sources/commands.md.txt | 1 + en/_sources/faq.md.txt | 11 +- en/_sources/http-api.md.txt | 4 + en/_sources/tunnel.md.txt | 2 + en/_static/documentation_options.js | 2 +- en/advanced-use.html | 11 +- en/advice-class.html | 5 +- en/agent.html | 5 +- en/arthas-properties.html | 5 +- en/async.html | 5 +- en/auth.html | 378 +++++++++++++++++++++++++++ en/base64.html | 5 +- en/batch-support.html | 5 +- en/cat.html | 5 +- en/classloader.html | 5 +- en/commands.html | 6 +- en/contact-us.html | 4 +- en/dashboard.html | 5 +- en/docker.html | 4 +- en/download.html | 4 +- en/dump.html | 5 +- en/echo.html | 5 +- en/faq.html | 15 +- en/genindex.html | 4 +- en/getstatic.html | 5 +- en/grep.html | 5 +- en/groovy.html | 4 +- en/heapdump.html | 5 +- en/http-api.html | 11 +- en/idea-plugin.html | 4 +- en/index.html | 4 +- en/install-detail.html | 4 +- en/jad.html | 5 +- en/jvm.html | 5 +- en/keymap.html | 4 +- en/logger.html | 5 +- en/manual-install.html | 4 +- en/mbean.html | 5 +- en/mc.html | 5 +- en/monitor.html | 5 +- en/objects.inv | Bin 949 -> 954 bytes en/ognl.html | 5 +- en/options.html | 9 +- en/perfcounter.html | 5 +- en/profiler.html | 5 +- en/pwd.html | 9 +- en/quick-start.html | 4 +- en/redefine.html | 5 +- en/release-notes.html | 4 +- en/reset.html | 4 +- en/retransform.html | 5 +- en/save-log.html | 5 +- en/sc.html | 5 +- en/search.html | 4 +- en/searchindex.js | 2 +- en/sm.html | 5 +- en/spring-boot-starter.html | 4 +- en/stack.html | 5 +- en/start-arthas.html | 4 +- en/sysenv.html | 5 +- en/sysprop.html | 5 +- en/tee.html | 5 +- en/thread.html | 5 +- en/trace.html | 5 +- en/tt.html | 5 +- en/tunnel.html | 7 +- en/vmoption.html | 5 +- en/watch.html | 5 +- en/web-console.html | 4 +- faq.html | 27 +- genindex.html | 4 +- getstatic.html | 5 +- grep.html | 5 +- groovy.html | 4 +- heapdump.html | 5 +- http-api.html | 21 +- idea-plugin.html | 4 +- index.html | 4 +- install-detail.html | 4 +- jad.html | 5 +- jvm.html | 5 +- keymap.html | 4 +- logger.html | 5 +- manual-install.html | 4 +- mbean.html | 5 +- mc.html | 5 +- monitor.html | 5 +- objects.inv | Bin 1150 -> 1157 bytes ognl.html | 5 +- options.html | 9 +- perfcounter.html | 5 +- profiler.html | 5 +- pwd.html | 9 +- quick-start.html | 4 +- redefine.html | 5 +- release-notes.html | 4 +- reset.html | 4 +- retransform.html | 5 +- save-log.html | 13 +- sc.html | 5 +- search.html | 4 +- searchindex.js | 2 +- sm.html | 5 +- spring-boot-starter.html | 4 +- stack.html | 5 +- start-arthas.html | 4 +- sysenv.html | 5 +- sysprop.html | 5 +- tee.html | 5 +- thread.html | 5 +- trace.html | 5 +- tt.html | 5 +- tunnel.html | 7 +- vmoption.html | 5 +- watch.html | 5 +- web-console.html | 4 +- 147 files changed, 1388 insertions(+), 311 deletions(-) create mode 100644 _sources/auth.md.txt create mode 100644 auth.html create mode 100644 en/_sources/auth.md.txt create mode 100644 en/auth.html diff --git a/README.html b/README.html index 2a30692ff..055c20e15 100644 --- a/README.html +++ b/README.html @@ -8,7 +8,7 @@ - <no title> — Arthas 3.4.8 文档 + <no title> — Arthas 3.5.0 文档 @@ -72,7 +72,7 @@
- 3.4.8 + 3.5.0
diff --git a/_sources/advanced-use.md.txt b/_sources/advanced-use.md.txt index 27138c8bc..b5f72bfa6 100644 --- a/_sources/advanced-use.md.txt +++ b/_sources/advanced-use.md.txt @@ -64,6 +64,9 @@ * [profiler](profiler.md)--使用[async-profiler](https://github.com/jvm-profiling-tools/async-profiler)对应用采样,生成火焰图 +## 鉴权 + +* [auth](auth.md)--鉴权 ## options * [options](options.md)——查看或设置Arthas全局开关 diff --git a/_sources/auth.md.txt b/_sources/auth.md.txt new file mode 100644 index 000000000..739dab790 --- /dev/null +++ b/_sources/auth.md.txt @@ -0,0 +1,72 @@ +auth +=== + +> 验证当前会话 + +### 配置用户名和密码 + +在attach时,可以在命令行指定密码。比如: + +``` +java -jar arthas-boot.jar --password ppp +``` + +* 可以通过 `--username` 选项来指定用户,默认值是`arthas`。 +* 也可以在 `arthas.properties` 里中配置 username/password。命令行的优先级大于配置文件。 +* 如果只配置`username`,没有配置`password`,则会生成随机密码,打印在`~/logs/arthas/arthas.log`中 + + ``` + Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh + ``` + +### 在telnet console里鉴权 + +连接到arthas后,直接执行命令会提示需要鉴权: + +```bash +[arthas@37430]$ help +Error! command not permitted, try to use 'auth' command to authenticates. +``` + +使用`auth`命令来鉴权,成功之后可以执行其它命令。 + +``` +[arthas@37430]$ auth ppp +Authentication result: true +``` + +* 可以通过 `--username` 选项来指定用户,默认值是`arthas`。 + + +### Web console密码验证 + +打开浏览器,会有弹窗提示需要输入 用户名 和 密码。 + +成功之后,则可以直接连接上 web console。 + +### HTTP API 验证 + + +#### Authorization Header方式(推荐) +Arthas 采用的是 HTTP 标准的 Basic Authorization,客户端请求时增加对应的header即可。 + +* 参考:[https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication) + + +例如,用户名是:`admin`,密码是 `admin`,则组合为字符串: `admin:admin`,base64结果是: `YWRtaW46YWRtaW4=`,则HTTP 请求增加`Authorization` header: + +```bash +curl 'http://localhost:8563/api' \ + -H 'Authorization: Basic YWRtaW46YWRtaW4=' \ + --data-raw '{"action":"exec","command":"version"}' +``` + +#### URL 参数传递方式 + +为了方便各种特殊情况,支持了以 parameters 方式传递username和password。比如: + +```bash +curl 'http://localhost:8563/api?password=admin' \ + --data-raw '{"action":"exec","command":"version"}' +``` + diff --git a/_sources/commands.md.txt b/_sources/commands.md.txt index 7077aacfc..9a6e06b59 100644 --- a/_sources/commands.md.txt +++ b/_sources/commands.md.txt @@ -39,6 +39,7 @@ * [base64](base64.md) * [tee](tee.md) * [pwd](pwd.md) +* [auth](auth.md) * [options](options.md) ### Arthas 基础命令 diff --git a/_sources/faq.md.txt b/_sources/faq.md.txt index 1f27b32f3..6e5c73179 100644 --- a/_sources/faq.md.txt +++ b/_sources/faq.md.txt @@ -4,6 +4,10 @@ > 不在本列表里的问题,请到issue里搜索。 [https://github.com/alibaba/arthas/issues](https://github.com/alibaba/arthas/issues) + +##### 日志文件在哪里? + +日志文件路径: `~/logs/arthas/arthas.log` ##### Arthas attach之后对原进程性能有多大的影响 [https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44) @@ -16,6 +20,7 @@ com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: ta 1. 检查当前用户和目标java进程是否一致。如果不一致,则切换到同一用户。JVM只能attach同样用户下的java 进程。 2. 尝试使用 `jstack -l $pid`,如果进程没有反应,则说明进程可能假死,无法响应JVM attach信号。所以同样基于attach机制的Arthas无法工作。尝试使用`jmap` heapdump后分析。 3. 尝试按[quick-start](quick-start.md)里的方式attach arthas-demo。 +4. 更多情况参考: [https://github.com/alibaba/arthas/issues/347](https://github.com/alibaba/arthas/issues/347) ##### trace/watch等命令能否增强jdk里的类? 默认情况下会过滤掉`java.`开头的类,但可以通过参数开启。 @@ -73,4 +78,8 @@ watch demo.MathGame '{params,returnObj,throwExp}' -v -n 5 -x 3 '1==1' ##### Arthas能不能离线使用 -可以。下载全量包解压即可,参考: [下载](download.md)。 \ No newline at end of file +可以。下载全量包解压即可,参考: [下载](download.md)。 + +##### Attach docker/k8s 里的 pid 为 1 的进程失败 + +参考: [https://github.com/alibaba/arthas/issues/362#issuecomment-448185416](https://github.com/alibaba/arthas/issues/362#issuecomment-448185416) \ No newline at end of file diff --git a/_sources/http-api.md.txt b/_sources/http-api.md.txt index 4ff6e0ece..f092656ee 100644 --- a/_sources/http-api.md.txt +++ b/_sources/http-api.md.txt @@ -434,6 +434,10 @@ curl -Ss -XPOST http://localhost:8563/api -d ''' } ``` +### 鉴权 + +参考: [auth](auth.md) + ### Web UI ![](_static/arthas-web-ui.png "arthas web ui") diff --git a/_sources/tunnel.md.txt b/_sources/tunnel.md.txt index 782bd158d..95beb0a69 100644 --- a/_sources/tunnel.md.txt +++ b/_sources/tunnel.md.txt @@ -49,6 +49,7 @@ as.sh --tunnel-server 'ws://47.75.156.201:80/ws' * 如果有特殊需求,可以通过`--agent-id`参数里指定agentId。默认情况下,会生成随机ID。 + attach成功之后,会打印出agentId,比如: ```bash @@ -88,6 +89,8 @@ id URJZ5L48RPBR2ALI5K4V ### 最佳实践 +> 注意,agentId要保持唯一,否则会在tunnel server上冲突,不能正常工作。 + 如果 arthas agent配置了 `appName`,则生成的agentId会带上`appName`的前缀。 比如在加上启动参数:`as.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp` ,则生成的agentId可能是`demoapp_URJZ5L48RPBR2ALI5K4V`。 diff --git a/_static/documentation_options.js b/_static/documentation_options.js index 6ddebac69..f83333d0a 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '3.4.8', + VERSION: '3.5.0', LANGUAGE: 'zh_CN', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', diff --git a/advanced-use.html b/advanced-use.html index ed0a1fa7c..8b01c50d9 100644 --- a/advanced-use.html +++ b/advanced-use.html @@ -8,7 +8,7 @@ - 进阶使用 — Arthas 3.4.8 文档 + 进阶使用 — Arthas 3.5.0 文档 @@ -74,7 +74,7 @@
- 3.4.8 + 3.5.0
@@ -114,9 +114,10 @@
  • class/classloader相关
  • monitor/watch/trace相关
  • profiler/火焰图
  • +
  • 鉴权
  • options
  • -
  • 管道
  • -
  • 后台异步任务
  • +
  • 管道
  • +
  • 后台异步任务
  • Web Console @@ -130,8 +131,8 @@
  • as.sh 和 arthas-boot 技巧
  • -
  • 用户数据回报
  • -
  • 其他特性 diff --git a/en/.buildinfo b/en/.buildinfo index da2145160..5bd253040 100644 --- a/en/.buildinfo +++ b/en/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 70c5abd44e0a44a2e46cdd796f2fb499 +config: c412f8b78ac73ff175c959e5748e006c tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/en/README.html b/en/README.html index 532e5c35b..26d765200 100644 --- a/en/README.html +++ b/en/README.html @@ -8,7 +8,7 @@ - <no title> — Arthas 3.4.8 documentation + <no title> — Arthas 3.5.0 documentation @@ -71,7 +71,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/_sources/advanced-use.md.txt b/en/_sources/advanced-use.md.txt index 6464c02c0..608e181c1 100644 --- a/en/_sources/advanced-use.md.txt +++ b/en/_sources/advanced-use.md.txt @@ -55,6 +55,10 @@ Advanced Usage * [stack](stack.md) - display the stack trace for the specified class and method * [tt](tt.md) - time tunnel, record the arguments and returned value for the methods and replay +## authentication + +* [auth](auth.md) - authentication + ## options * [options](options.md) - check/set Arthas global options diff --git a/en/_sources/auth.md.txt b/en/_sources/auth.md.txt new file mode 100644 index 000000000..937e3aa9e --- /dev/null +++ b/en/_sources/auth.md.txt @@ -0,0 +1,69 @@ +auth +=== + +> Authenticates the current session + +### Configure username and password + +When attaching, you can specify a password on the command line. such as: + +``` +java -jar arthas-boot.jar --password ppp +``` + +* The user can be specified by the `--username` option, the default value is `arthas`. +* You can also configure username/password in `arthas.properties`. The priority of the command line is higher than that of the configuration file. +* If only `username` is configured and no `password` is configured, a random password will be generated and printed in `~/logs/arthas/arthas.log` + + ``` + Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh + ``` + +### Authenticate in the telnet console + +After connecting to arthas, directly executing the command will prompt for authentication: + +```bash +[arthas@37430]$ help +Error! command not permitted, try to use 'auth' command to authenticates. +``` + +Use the `auth` command to authenticate, and you can execute other commands after success. + +``` +[arthas@37430]$ auth ppp +Authentication result: true +``` + +* The user can be specified by the `--username` option, the default value is `arthas`. + +### Web console Authentication + +Open the browser, there will be a pop-up window prompting you to enter your username and password. + +After success, you can directly connect to the web console. + +### HTTP API Authentication + +#### HTTP Authorization Header(recommended) + +Arthas uses the HTTP standard Basic Authorization. + +* Reference: [https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication) + +For example, if the user name is: `admin` and the password is `admin`, the combination is a string: `admin:admin`, the base64 result is: `YWRtaW46YWRtaW4=`, then the HTTP request adds the `Authorization` header: + +```bash +curl 'http://localhost:8563/api' \ + -H 'Authorization: Basic YWRtaW46YWRtaW4=' \ + --data-raw '{"action":"exec","command":"version"}' +``` + +#### URL parameters + +It supports passing username and password in parameters. such as: + +```bash +curl 'http://localhost:8563/api?password=admin' \ + --data-raw '{"action":"exec","command":"version"}' +``` \ No newline at end of file diff --git a/en/_sources/commands.md.txt b/en/_sources/commands.md.txt index 13a35189c..e997ca785 100644 --- a/en/_sources/commands.md.txt +++ b/en/_sources/commands.md.txt @@ -39,6 +39,7 @@ All Commands * [base64](base64.md) * [tee](tee.md) * [pwd](pwd.md) +* [auth](auth.md) * [options](options.md) diff --git a/en/_sources/faq.md.txt b/en/_sources/faq.md.txt index 68d1bc48d..04d0c7c4e 100644 --- a/en/_sources/faq.md.txt +++ b/en/_sources/faq.md.txt @@ -3,6 +3,10 @@ > For questions that are not in this list, please search in issues. [https://github.com/alibaba/arthas/issues](https://github.com/alibaba/arthas/issues) + +##### Where is the log file? + +Log file path: `~/logs/arthas/arthas.log` ##### How much impact does Arthas attach have on the performance of the original process? [https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44) @@ -15,6 +19,7 @@ com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: ta 1. Check whether the current user and the target java process are consistent. If they are inconsistent, switch to the same user. JVM can only attach java processes under the same user. 2. Try to use `jstack -l $pid`. If the process does not respond, it means that the process may freeze and fail to respond to the JVM attach signal. So Arthas based on the attach mechanism cannot work. Try to use `jmap` heapdump to analyze. 3. Try to attach arthas-demo in [quick-start](quick-start.md). +4. For more information: [https://github.com/alibaba/arthas/issues/347](https://github.com/alibaba/arthas/issues/347) ##### Can commands such as trace/watch enhance the classes in jdk? @@ -74,4 +79,8 @@ For example: use skywalking V8.1.0 below [cannot trace, watch classes enhanced b ##### Can I use arthas offline? -Yes. Just download the full size package and unzip it, refer to: [Download](download.md). \ No newline at end of file +Yes. Just download the full size package and unzip it, refer to: [Download](download.md). + +##### Attach the process with pid 1 in docker/k8s failed + +Reference: [https://github.com/alibaba/arthas/issues/362#issuecomment-448185416](https://github.com/alibaba/arthas/issues/362#issuecomment-448185416) \ No newline at end of file diff --git a/en/_sources/http-api.md.txt b/en/_sources/http-api.md.txt index 4c95844b7..af386f35c 100644 --- a/en/_sources/http-api.md.txt +++ b/en/_sources/http-api.md.txt @@ -492,6 +492,10 @@ curl -Ss -XPOST http://localhost:8563/api -d ''' } ``` +### Authentication + +* Reference: [auth](auth.md) + ### Web UI ![](../_static/arthas-web-ui.png "arthas web ui") diff --git a/en/_sources/tunnel.md.txt b/en/_sources/tunnel.md.txt index 8d3277ebd..3318cea7b 100644 --- a/en/_sources/tunnel.md.txt +++ b/en/_sources/tunnel.md.txt @@ -90,6 +90,8 @@ For the above example, go to [http://47.75.156.201/arthas/?port=80](http://47.75 ### Best practices +> Note that the agentId must be unique, otherwise it will conflict on the tunnel server and not work properly. + If the arthas agent is configured with `appName`, the generated agentId will be prefixed with `appName`. For example, if you add the startup parameter `as.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp`, the generated agentId might be `demoapp_URJZ5L48RPBR2ALI5K4V`. diff --git a/en/_static/documentation_options.js b/en/_static/documentation_options.js index 41346a423..be8f90d86 100644 --- a/en/_static/documentation_options.js +++ b/en/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '3.4.8', + VERSION: '3.5.0', LANGUAGE: 'en', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', diff --git a/en/advanced-use.html b/en/advanced-use.html index 598e8bc03..41b6c1f70 100644 --- a/en/advanced-use.html +++ b/en/advanced-use.html @@ -8,7 +8,7 @@ - Advanced Usage — Arthas 3.4.8 documentation + Advanced Usage — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -108,6 +108,7 @@
  • JVM
  • class/classloader
  • monitor/watch/trace - related
  • +
  • authentication
  • options
  • profiler/flame graph
  • pipe
  • @@ -279,6 +280,12 @@
  • tt - time tunnel, record the arguments and returned value for the methods and replay

  • +
    +

    authentication

    +
      +
    • auth - authentication

    • +
    +

    options

      diff --git a/en/advice-class.html b/en/advice-class.html index 7c5b8e548..059d39d6c 100644 --- a/en/advice-class.html +++ b/en/advice-class.html @@ -8,7 +8,7 @@ - Fundamental Fields in Expressions — Arthas 3.4.8 documentation + Fundamental Fields in Expressions — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
      - 3.4.8 + 3.5.0
      @@ -146,6 +146,7 @@
    • base64
    • tee
    • pwd
    • +
    • auth
    • options
    • Basic Arthas Commands
    diff --git a/en/agent.html b/en/agent.html index d7cefc0f3..b2ee62c3f 100644 --- a/en/agent.html +++ b/en/agent.html @@ -8,7 +8,7 @@ - Start as a Java Agent — Arthas 3.4.8 documentation + Start as a Java Agent — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -108,6 +108,7 @@
  • JVM
  • class/classloader
  • monitor/watch/trace - related
  • +
  • authentication
  • options
  • profiler/flame graph
  • pipe
  • diff --git a/en/arthas-properties.html b/en/arthas-properties.html index 6f07f305d..84e712716 100644 --- a/en/arthas-properties.html +++ b/en/arthas-properties.html @@ -8,7 +8,7 @@ - Arthas Properties — Arthas 3.4.8 documentation + Arthas Properties — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -108,6 +108,7 @@
  • JVM
  • class/classloader
  • monitor/watch/trace - related
  • +
  • authentication
  • options
  • profiler/flame graph
  • pipe
  • diff --git a/en/async.html b/en/async.html index b769d39e8..00db72fff 100644 --- a/en/async.html +++ b/en/async.html @@ -8,7 +8,7 @@ - Arthas Async Jobs — Arthas 3.4.8 documentation + Arthas Async Jobs — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -108,6 +108,7 @@
  • JVM
  • class/classloader
  • monitor/watch/trace - related
  • +
  • authentication
  • options
  • profiler/flame graph
  • pipe
  • diff --git a/en/auth.html b/en/auth.html new file mode 100644 index 000000000..9293e52fd --- /dev/null +++ b/en/auth.html @@ -0,0 +1,378 @@ + + + + + + + + + + + auth — Arthas 3.5.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + + + +
    + +
    + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    + +
    +

    auth

    +
    +

    Authenticates the current session

    +
    +
    +

    Configure username and password

    +

    When attaching, you can specify a password on the command line. such as:

    +
    java -jar arthas-boot.jar --password ppp
    +
    +
      +
    • The user can be specified by the --username option, the default value is arthas.

    • +
    • You can also configure username/password in arthas.properties. The priority of the command line is higher than that of the configuration file.

    • +
    • If only username is configured and no password is configured, a random password will be generated and printed in ~/logs/arthas/arthas.log

      +
      Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
      +
      +
    • +
    +
    +
    +

    Authenticate in the telnet console

    +

    After connecting to arthas, directly executing the command will prompt for authentication:

    +
    [arthas@37430]$ help
    +Error! command not permitted, try to use 'auth' command to authenticates.
    +
    +

    Use the auth command to authenticate, and you can execute other commands after success.

    +
    [arthas@37430]$ auth ppp
    +Authentication result: true
    +
    +
      +
    • The user can be specified by the --username option, the default value is arthas.

    • +
    +
    +
    +

    Web console Authentication

    +

    Open the browser, there will be a pop-up window prompting you to enter your username and password.

    +

    After success, you can directly connect to the web console.

    +
    +
    +

    HTTP API Authentication

    + +
    +

    URL parameters

    +

    It supports passing username and password in parameters. such as:

    +
    curl 'http://localhost:8563/api?password=admin' \
    +  --data-raw '{"action":"exec","command":"version"}' 
    +
    +
    +
    +
    + + +
    + +
    + + +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/base64.html b/en/base64.html index ac99839f3..cb9f4d09d 100644 --- a/en/base64.html +++ b/en/base64.html @@ -8,7 +8,7 @@ - base64 — Arthas 3.4.8 documentation + base64 — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -143,6 +143,7 @@
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/batch-support.html b/en/batch-support.html index 5ce4b1ee9..5adfef8fb 100644 --- a/en/batch-support.html +++ b/en/batch-support.html @@ -8,7 +8,7 @@ - Batch Processing — Arthas 3.4.8 documentation + Batch Processing — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -108,6 +108,7 @@
  • JVM
  • class/classloader
  • monitor/watch/trace - related
  • +
  • authentication
  • options
  • profiler/flame graph
  • pipe
  • diff --git a/en/cat.html b/en/cat.html index 527dbe08b..6c3dab517 100644 --- a/en/cat.html +++ b/en/cat.html @@ -8,7 +8,7 @@ - cat — Arthas 3.4.8 documentation + cat — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -137,6 +137,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/classloader.html b/en/classloader.html index df421ca1c..cd2719852 100644 --- a/en/classloader.html +++ b/en/classloader.html @@ -8,7 +8,7 @@ - classloader — Arthas 3.4.8 documentation + classloader — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -149,6 +149,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/commands.html b/en/commands.html index af21a76ba..3fd6ed6fa 100644 --- a/en/commands.html +++ b/en/commands.html @@ -8,7 +8,7 @@ - All Commands — Arthas 3.4.8 documentation + All Commands — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -137,6 +137,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • @@ -255,6 +256,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • diff --git a/en/contact-us.html b/en/contact-us.html index 0eed9c31f..9ff70cf5c 100644 --- a/en/contact-us.html +++ b/en/contact-us.html @@ -8,7 +8,7 @@ - Contact Us — Arthas 3.4.8 documentation + Contact Us — Arthas 3.5.0 documentation @@ -72,7 +72,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/dashboard.html b/en/dashboard.html index a17495d59..6395b1141 100644 --- a/en/dashboard.html +++ b/en/dashboard.html @@ -8,7 +8,7 @@ - dashboard — Arthas 3.4.8 documentation + dashboard — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -146,6 +146,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/docker.html b/en/docker.html index 18a2380fc..493e8af19 100644 --- a/en/docker.html +++ b/en/docker.html @@ -8,7 +8,7 @@ - Docker — Arthas 3.4.8 documentation + Docker — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/download.html b/en/download.html index c6d4008f5..e7e7bd0df 100644 --- a/en/download.html +++ b/en/download.html @@ -8,7 +8,7 @@ - Download — Arthas 3.4.8 documentation + Download — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/dump.html b/en/dump.html index b69fa6567..0ae290a5c 100644 --- a/en/dump.html +++ b/en/dump.html @@ -8,7 +8,7 @@ - dump — Arthas 3.4.8 documentation + dump — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -141,6 +141,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/echo.html b/en/echo.html index 49231e6d3..0405f0f48 100644 --- a/en/echo.html +++ b/en/echo.html @@ -8,7 +8,7 @@ - echo — Arthas 3.4.8 documentation + echo — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -137,6 +137,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/faq.html b/en/faq.html index 242090fa0..944aa3360 100644 --- a/en/faq.html +++ b/en/faq.html @@ -8,7 +8,7 @@ - FAQ — Arthas 3.4.8 documentation + FAQ — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -113,6 +113,7 @@
  • IDEA Plugin
  • User cases
  • FAQ
  • Star me at GitHub
  • @@ -200,6 +202,10 @@

    For questions that are not in this list, please search in issues. https://github.com/alibaba/arthas/issues

    +
    +

    Where is the log file?

    +

    Log file path: ~/logs/arthas/arthas.log

    +

    How much impact does Arthas attach have on the performance of the original process?

    https://github.com/alibaba/arthas/issues/44

    @@ -211,6 +217,7 @@
  • Check whether the current user and the target java process are consistent. If they are inconsistent, switch to the same user. JVM can only attach java processes under the same user.

  • Try to use jstack -l $pid. If the process does not respond, it means that the process may freeze and fail to respond to the JVM attach signal. So Arthas based on the attach mechanism cannot work. Try to use jmap heapdump to analyze.

  • Try to attach arthas-demo in quick-start.

  • +
  • For more information: https://github.com/alibaba/arthas/issues/347

  • @@ -256,6 +263,10 @@

    Can I use arthas offline?

    Yes. Just download the full size package and unzip it, refer to: Download.

    +
    +

    Attach the process with pid 1 in docker/k8s failed

    +

    Reference: https://github.com/alibaba/arthas/issues/362#issuecomment-448185416

    +
    diff --git a/en/genindex.html b/en/genindex.html index 1d97f8109..5f68bab42 100644 --- a/en/genindex.html +++ b/en/genindex.html @@ -9,7 +9,7 @@ - Index — Arthas 3.4.8 documentation + Index — Arthas 3.5.0 documentation @@ -72,7 +72,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/getstatic.html b/en/getstatic.html index 4dc21f42f..b745d85fd 100644 --- a/en/getstatic.html +++ b/en/getstatic.html @@ -8,7 +8,7 @@ - getstatic — Arthas 3.4.8 documentation + getstatic — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -141,6 +141,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/grep.html b/en/grep.html index faa5a857d..9327b7b54 100644 --- a/en/grep.html +++ b/en/grep.html @@ -8,7 +8,7 @@ - grep — Arthas 3.4.8 documentation + grep — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -137,6 +137,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/groovy.html b/en/groovy.html index a2f98c194..4f89be0e5 100644 --- a/en/groovy.html +++ b/en/groovy.html @@ -8,7 +8,7 @@ - groovy — Arthas 3.4.8 documentation + groovy — Arthas 3.5.0 documentation @@ -71,7 +71,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/heapdump.html b/en/heapdump.html index 5fdf38ebe..22d8431db 100644 --- a/en/heapdump.html +++ b/en/heapdump.html @@ -8,7 +8,7 @@ - heapdump — Arthas 3.4.8 documentation + heapdump — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -145,6 +145,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/http-api.html b/en/http-api.html index e5b213b4e..245a0f384 100644 --- a/en/http-api.html +++ b/en/http-api.html @@ -8,7 +8,7 @@ - Http API — Arthas 3.4.8 documentation + Http API — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -125,6 +125,7 @@
  • Close session
  • +
  • Authentication
  • Web UI
  • Special command results
    • status
    • @@ -657,6 +658,12 @@ corresponds to the expression in the corresponding order.

      +
      +

      Authentication

      + +

      Web UI

      _images/arthas-web-ui.png

      diff --git a/en/idea-plugin.html b/en/idea-plugin.html index b97b12c4a..93c1fd1d2 100644 --- a/en/idea-plugin.html +++ b/en/idea-plugin.html @@ -8,7 +8,7 @@ - IDEA Plugin — Arthas 3.4.8 documentation + IDEA Plugin — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
      - 3.4.8 + 3.5.0
      diff --git a/en/index.html b/en/index.html index 242237aa1..279eda9ab 100644 --- a/en/index.html +++ b/en/index.html @@ -8,7 +8,7 @@ - Arthas Documentation — Arthas 3.4.8 documentation + Arthas Documentation — Arthas 3.5.0 documentation @@ -72,7 +72,7 @@
      - 3.4.8 + 3.5.0
      diff --git a/en/install-detail.html b/en/install-detail.html index b8476770b..4e95176bf 100644 --- a/en/install-detail.html +++ b/en/install-detail.html @@ -8,7 +8,7 @@ - Install Arthas — Arthas 3.4.8 documentation + Install Arthas — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
      - 3.4.8 + 3.5.0
      diff --git a/en/jad.html b/en/jad.html index 1f3b58fb1..d44f9fcb1 100644 --- a/en/jad.html +++ b/en/jad.html @@ -8,7 +8,7 @@ - jad — Arthas 3.4.8 documentation + jad — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
      - 3.4.8 + 3.5.0
      @@ -148,6 +148,7 @@
    • base64
    • tee
    • pwd
    • +
    • auth
    • options
    • Basic Arthas Commands
    diff --git a/en/jvm.html b/en/jvm.html index a90113293..17844d566 100644 --- a/en/jvm.html +++ b/en/jvm.html @@ -8,7 +8,7 @@ - jvm — Arthas 3.4.8 documentation + jvm — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -142,6 +142,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/keymap.html b/en/keymap.html index 1de4627ea..d55d49809 100644 --- a/en/keymap.html +++ b/en/keymap.html @@ -8,7 +8,7 @@ - Arthas Console Keymap — Arthas 3.4.8 documentation + Arthas Console Keymap — Arthas 3.5.0 documentation @@ -71,7 +71,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/logger.html b/en/logger.html index e92872f54..ab72c3dd2 100644 --- a/en/logger.html +++ b/en/logger.html @@ -8,7 +8,7 @@ - logger — Arthas 3.4.8 documentation + logger — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -148,6 +148,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/manual-install.html b/en/manual-install.html index e1d3d7cde..eaa4844be 100644 --- a/en/manual-install.html +++ b/en/manual-install.html @@ -8,7 +8,7 @@ - Manually Install Arthas — Arthas 3.4.8 documentation + Manually Install Arthas — Arthas 3.5.0 documentation @@ -71,7 +71,7 @@
    - 3.4.8 + 3.5.0
    diff --git a/en/mbean.html b/en/mbean.html index 3b2a0a0c9..70d75bd1d 100644 --- a/en/mbean.html +++ b/en/mbean.html @@ -8,7 +8,7 @@ - mbean — Arthas 3.4.8 documentation + mbean — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -141,6 +141,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/mc.html b/en/mc.html index 554ca11d7..52c01cff7 100644 --- a/en/mc.html +++ b/en/mc.html @@ -8,7 +8,7 @@ - mc — Arthas 3.4.8 documentation + mc — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -137,6 +137,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/monitor.html b/en/monitor.html index df2e1be94..ea977bdc8 100644 --- a/en/monitor.html +++ b/en/monitor.html @@ -8,7 +8,7 @@ - monitor — Arthas 3.4.8 documentation + monitor — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -146,6 +146,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/objects.inv b/en/objects.inv index 530da0c92104c0c95414015fa9760358d354f243..ae710809a38db1949737edd3c4450b7032ffed3d 100644 GIT binary patch delta 851 zcmV-Z1FZbD2f7E4JOec@Fp)nzf8CB8ClH12c?w>DNRgskL{X%%cca*eqxCvbu4|f_ z>E5NG4fL$%?Nj^?HS*omcTUkz6fn<^hlfv(GDQ80c9T>;%I8denB!{Xuhz-9M1#Kx z&=;^1YPAO(?ISNqhf3tX0nV5bmkHHmAcVWb&P(F&yVbCwjX=K_G&;z|f6B*io5v6q zXM>>eY-EEZP_n;7@KHjLAV0zd)s*gR330Mk+ZP;98 z<3OWljvMYyx2|9{t5aijf5FDc_mz;Hwrh&C`#ho1lJdU9)Dc2Mn2!#;9{nA*SrC8a zQ!S+E5BWEl-fWsYw-wfmB@%jHH)f-_eG8}AjarJEc7m^?L}6{!!)HPLwOEbcvcbR+ zO|mpvd>_(Ja>fuLF06$*Y~MP2WOGdMO>^#Y5*5PcNUa*2LHTEvgmLFHZ^S~{m~;wuFsjaY z^l_#5KV@dF_p4cte+aD78T4AHuB=O)lq))=vOMcl1LcG?PI_4_9yaaqez8{Lhy@!s-3 dg29kMSMjK(dcBRF8!pcO@Yt?F@jtQ?esvvquM+?O delta 846 zcmV-U1F`(N2ek)~JOeZ?IFUa*f7^}|IS_{L{S#|;+nphAPx%;E#9iw9|El((Z0GTQclYUDhN%D2Zj$Pie9YvJQ(TPv+d3KNXz+~y zeFi(BR$IW)KJt>Zt3-YeaKw~2PpBpXA>1T(UK0P=tcC?`1o}Or(Lv5uf8PIGJ%%tl z8wAy}krhdxWPgp|ql6$qetEuQ&#Z5cFk5Qtqw&U)LpdOm7#-G_>V2>tQ8ZEx} z=_fg3h!AJiCLOkK9X+x!rueEkcfN2nk*1#z*4sHY);%$<3f7rLkk^TL$#(v)YsEWnni5H?0?)!+=u|FR^EJ05u>7Sd|cDcHcMI^xmCmE!-D znYrA~X4xaKmCm4le}nbS(i>)R`Zo=@UQ`q6N1fhiLZuZKXXohHgeq!P-O;jnq_}Hq z+BtUAD{2n96%Ui!Y~+hJ;O_M9Fq<1&W!>|_cA3Ja{MhE{S%rMB4~_vB=a&S^{VzOf zJj|9oQH`~_9u3lktgMUtJzzp{KNciECq$V6BhMgkts6bqe{gVq;hv70Gr$=YHQ8uu ztav_>Sg&O1wzzIFh`@Rz^d1Qao*oI-A%)eKvFH!!H4bcO;X0z#)9a%4&c(8{eA9j- zvlI0->+&t>Wh3b7CLe9fSR{e|!Q@iq1->zLK0fUA6opGbdu9ol^s<+bp7R?+Ld_A8 zH3x-VIeFw)Ku#fD_b~C?1iH!^BlfO{o3+SJTOn-yzGWoNOF3$zyRla9CI2HB3>kD4 Y_iC!w+vvIC;`|@??HUxn03yY8UhXcjApigX diff --git a/en/ognl.html b/en/ognl.html index 80d4e1d8c..e0dfa2ba1 100644 --- a/en/ognl.html +++ b/en/ognl.html @@ -8,7 +8,7 @@ - ognl — Arthas 3.4.8 documentation + ognl — Arthas 3.5.0 documentation @@ -73,7 +73,7 @@
    - 3.4.8 + 3.5.0
    @@ -145,6 +145,7 @@
  • base64
  • tee
  • pwd
  • +
  • auth
  • options
  • Basic Arthas Commands
  • diff --git a/en/options.html b/en/options.html index 696e86253..da613782f 100644 --- a/en/options.html +++ b/en/options.html @@ -8,7 +8,7 @@ - options — Arthas 3.4.8 documentation + options — Arthas 3.5.0 documentation @@ -39,7 +39,7 @@ - +