How to Deploy and Use Arthas Tunnel for Real‑Time Java Diagnostics
This guide explains how to build, run, and deploy the open‑source Arthas Tunnel tool—including Maven compilation, Docker and Helm deployment, UI startup, and integration with Spring Boot via the eden‑architect framework—while providing configuration examples and repository links for quick setup.
Overview
Arthas Tunnel is an open‑source online diagnostic tool from Alibaba that provides a Dashboard, Thread view, Stack inspection, and Watch performance monitoring. It includes automatic service discovery (retrieving application IPs and ports) and permission control based on Spring Security with dynamic Nacos account binding.
Build the Project
Clone the repository and compile with Maven:
git clone https://github.com/shiyindaxiaojie/arthas.git
cd arthas
mvn package -T 4CRunning the Application
IDEA (local) startup
Execute mvn install in the project root (add -DskipTests to skip tests if desired).
Enter the tunnel-server directory and run mvn spring-boot:run or launch the ArthasTunnelApplication class. Successful startup shows the Spring Boot banner.
Enter the web-ui directory and run yarn run dev:tunnel or yarn run dev:ui. The console will output http://localhost:8000; open this URL in a browser.
Docker startup
Run the published Docker image:
docker run -p 8080:8080 --name=arthas-tunnel-server -d shiyindaxiaojie/arthas-tunnel-serverDeployment Options
FatJar deployment
Package a single executable JAR and run it:
mvn clean package
java -Dserver.port=8080 -jar target/arthas-tunnel-server.jarDocker image build
Build a layered Docker image using Spring Boot’s support:
docker build -f Dockerfile-Tunnel -t arthas-tunnel-server:{tag} .Helm deployment
Deploy to Kubernetes with Helm:
helm install arthas-tunnel-server ./helm
helm uninstall arthas-tunnel-serverIntegration into Your Application
Add the starter dependency to your Maven project:
<dependency>
<groupId>io.github.shiyindaxiaojie</groupId>
<artifactId>eden-arthas-spring-boot-starter</artifactId>
</dependency>Enable Arthas in application.yml (disabled by default):
spring:
arthas:
enabled: false # enable as needed
arthas:
agent-id: ${spring.application.name}@${random.value}
tunnel-server: ws://localhost:7777/ws # Arthas server address
session-timeout: 1800
telnet-port: 0 # random port
http-port: 0 # random portExample user configuration for the tunnel server (YAML):
arthas:
tunnel:
users:
- name: admin
password: 123456
roles: '*'
- name: user
password: 123456
roles:
- eden-gatewayExample Projects
Domain‑model‑oriented COLA architecture – eden-demo-cola (GitHub)
Data‑model‑oriented layered architecture – eden-demo-layer (GitHub)
Open‑Source Resources
GitHub repository: https://github.com/shiyindaxiaojie/arthas
Docker Hub image: https://hub.docker.com/repository/docker/shiyindaxiaojie/arthas-tunnel-server
eden‑architect framework: https://github.com/shiyindaxiaojie/eden-architect
COLA demo: https://github.com/shiyindaxiaojie/eden-demo-cola
Layered demo: https://github.com/shiyindaxiaojie/eden-demo-layer
Architect's Guide
Dedicated to sharing programmer-architect skills—Java backend, system, microservice, and distributed architectures—to help you become a senior architect.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
