<liclass="toctree-l2"><aclass="reference internal"href="#connect-arthas-through-the-browser">Connect arthas through the browser</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#connect-remote-arthas-through-arthas-tunnel-server">Connect remote arthas through arthas tunnel server</a><ul>
<liclass="toctree-l3"><aclass="reference internal"href="#download-and-deploy-arthas-tunnel-server">Download and deploy arthas tunnel server</a></li>
<liclass="toctree-l3"><aclass="reference internal"href="#connecting-to-the-tunnel-server-when-starting-arthas">Connecting to the tunnel server when starting arthas</a></li>
<liclass="toctree-l3"><aclass="reference internal"href="#how-arthas-tunnel-server-works">How arthas tunnel server works</a></li>
<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered">Questions and answers</a></li>
<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas">Fork me at GitHub</a></li>
<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md#">Compile and debug/CONTRIBUTING</a></li>
<p>Arthas supports the Web Console. After attach success, the user can access: <aclass="reference external"href="http://127.0.0.1:8563/">http://127.0.0.1:8563/</a>.</p>
<div><p>By default, arthas only listens to <codeclass="docutils literal notranslate"><spanclass="pre">127.0.0.1</span></code>, so if you want to connect from a remote, you can use the <codeclass="docutils literal notranslate"><spanclass="pre">--target-ip</span></code> parameter to specify the IP. See the help description for <codeclass="docutils literal notranslate"><spanclass="pre">-h</span></code> for more information.</p>
<p>If you have suggestions for the Web Console, please leave a message here: <aclass="reference external"href="https://github.com/alibaba/arthas/issues/15">https://github.com/alibaba/arthas/issues/15</a></p>
<h2>Connect remote arthas through arthas tunnel server<aclass="headerlink"href="#connect-remote-arthas-through-arthas-tunnel-server"title="Permalink to this headline">¶</a></h2>
<h3>Download and deploy arthas tunnel server<aclass="headerlink"href="#download-and-deploy-arthas-tunnel-server"title="Permalink to this headline">¶</a></h3>
<p>Arthas tunnel server is a spring boot fat jar application, start with the <codeclass="docutils literal notranslate"><spanclass="pre">java</span><spanclass="pre">-jar</span></code> command:</p>
<p>By default, the web port of the arthas tunnel server is <codeclass="docutils literal notranslate"><spanclass="pre">8080</span></code>, and the port connected by the arthas agent is <codeclass="docutils literal notranslate"><spanclass="pre">7777</span></code>.</p>
<p>Once started, you can go to <aclass="reference external"href="http://localhost:8080/">http://localhost:8080/</a> and connect to the registered arthas agent via <codeclass="docutils literal notranslate"><spanclass="pre">agentId</span></code>.</p>
<p>Through Spring Boot’s Endpoint, you can view the specific connection information: <aclass="reference external"href="http://localhost:8080/actuator/arthas">http://localhost:8080/actuator/arthas</a>, the login user name is <codeclass="docutils literal notranslate"><spanclass="pre">arthas</span></code>, and the password can be found in the log of arthas tunnel server, for example:</p>
<divclass="highlight-default notranslate"><preclass="literal-block">32851 [main] INFO o.s.b.a.s.s.UserDetailsServiceAutoConfiguration
Using generated security password: f1dca050-3777-48f4-a577-6367e55a78a2</pre>
<h3>Connecting to the tunnel server when starting arthas<aclass="headerlink"href="#connecting-to-the-tunnel-server-when-starting-arthas"title="Permalink to this headline">¶</a></h3>
<p>When starting arthas, you can use the <codeclass="docutils literal notranslate"><spanclass="pre">--tunnel-server</span></code> parameter, for example:</p>
<li><p>You can specify the agentId by the <codeclass="docutils literal notranslate"><spanclass="pre">--agent-id</span></code> parameter. By default, a random ID is generated.</p></li>
</ul>
<p>After Arthas attach succeeds, the agentId will be printed, such as:</p>
<p>If the connection is not connected to the tunnel server at startup, you can also obtain the agentId through the <codeclass="docutils literal notranslate"><spanclass="pre">session</span></code> command after reconnection succeeds:</p>
<p>For the above example, go to <aclass="reference external"href="http://47.75.156.201:8080/">http://47.75.156.201:8080/</a> in the browser and input the <codeclass="docutils literal notranslate"><spanclass="pre">agentId</span></code> to connect to arthas on remote machine.</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.