Start an arthas diagnostic process from skywalking-ui, without ask access of server from your boss.
Package arthas into skywalking-agent, without copy installation package to vm or container when troubleshooting.
git clone https://github.com/weixiang1862/skywalking-x-arthas
plugins
foldercd ${path_to_skywalking-x-arthas}
cp dist/arthas-control-plugin-9.1.0-SNAPSHOT.jar ${your_sw_agent_home}/plugins/
cat << EOF >>${your_sw_agent_home}/config/agent.config
# arthas home, default is {$AGENT_HOME}/arthas
plugin.arthas.arthas_home=${SW_ARTHAS_HOME:}
# arthas tunnel server address, (e.g. ws://127.0.0.1:7777/ws)
plugin.arthas.tunnel_server=${SW_ARTHAS_TUNNEL_SERVER:ws://127.0.0.1:7777/ws}
plugin.arthas.session_timeout=${SW_ARTHAS_SESSION_TIMEOUT:}
plugin.arthas.disabled_commands=${SW_ARTHAS_DISABLED_COMMAND:}
EOF
oap-libs
foldercd ${path_to_skywalking-x-arthas}
cp dist/arthas-controller-9.7.0-SNAPSHOT.jar ${your_oap_server_home}/oap-libs/
cat << EOF >>${your_oap_server_home}/config/application.yml
arthas-controller:
selector: default
default:
EOF
webapp
foldercd ${path_to_skywalking-x-arthas}
cp dist/skywalking-webapp.jar ${your_oap_server_home}/webapp/
https://arthas.aliyun.com/download/latest_version?mirror=aliyun -O arthas.zip
mkdir ${your_sw_agent_home}/arthas
unzip arthas.zip -d ${your_sw_agent_home}/arthas
wget https://arthas.aliyun.com/download/arthas-tunnel-server/latest_version?mirror=aliyun -O arthas-tunnel-server.jar
java -jar arthas-tunnel-server-3.7.1.jar
sequenceDiagram
participant skywalking-ui
participant skywalking-oap-server
participant your-service-with-sw-agent
participant arthas-tunnel-server
skywalking-ui->>skywalking-oap-server: start instance arthas process
loop CommandCheck
your-service-with-sw-agent->>skywalking-oap-server: should start arthas?
end
your-service-with-sw-agent-->>arthas-tunnel-server: connect when get start command
skywalking-ui-->>arthas-tunnel-server: execute arthas command over websocket
arthas-tunnel-server-->>skywalking-ui: get arthas command resoult over websocket
sequenceDiagram
participant skywalking-ui
participant skywalking-oap-server
participant your-service-with-sw-agent
participant arthas-tunnel-server
skywalking-ui->>skywalking-oap-server: stop instance arthas process
skywalking-ui-->>arthas-tunnel-server: disconnect with tunnel
loop CommandCheck
your-service-with-sw-agent->>skywalking-oap-server: should stop arthas?
end
your-service-with-sw-agent-->>arthas-tunnel-server: disconnect when get stop command
follow skywalking official skywalking build docs.
follow skywalking official skywalking-java build docs.
To learn more, read the documentation.