Arthas is introduced
Arthas is An open source Java diagnostic tool from Alibaba. It allows us to troubleshoot problems with the project online.
Arthas Web Console implementation
The basic implementation of the Web Console
Arthas Web Console is described on the official website. You can get a general direction.
- By downloadingarthas-tunnel-server. We can get the corresponding
arthas
theserver
End. Download it and run it directly (I’m running it directly on ECS).
- The corresponding boot on the client
arthas-boot
. And attached by the startup parameterserver
Address (I’m running it locally).
- Select the corresponding process to proceed
attach
, will appear the correspondingagent-id
, and then fill in the correspondingserver
endhttp
In the page.
- And then finally we can
server
End to operate, that isWeb Console
The implementation is complete.
Requirement points for the Web Console
From the above steps, it makes sense that we can operate directly on the client side. Why bother? The reasons are as follows:
-
In the case of services deployed directly on a server or ECS cloud server. We can run directly on the corresponding client, but how do we access the server where each service is located? By jumpers? Then, is it possible that the corresponding server will be affected when we operate? It is definitely not possible to directly connect to the server.
-
Service in the case of a running POD. The impact of allowing you to connect to the service at this time is much smaller than the above situation, and if it does occur, it will only affect the pod currently running. But if you want to connect to the POD directly, you need to map the corresponding POD port to the corresponding host, and then provide external access to the ECS link. This will make each POD needs to map out the port needs certain rules, is undoubtedly increased operation and maintenance work, running also consumes the current resources (access to the page and so on through HTTP interface request, if through WS connection, reduce the consumption of 7 layers).
-
If the above method is adopted, we can just run the server on another machine. We can connect to the corresponding client by accessing the server each time, and the corresponding Agent-ID can be specified. We can specify the current Agent-ID when pod runs the client each time. Make it a bind to the current POD so we can connect through the Server.
This is just a brief introduction to the corresponding Web Console, but we don’t need to worry too much about it here. The key is to use the arthas command !!!!! This way you can go from CV engineer to Arthas engineer without a fight (bug is more 😁).