当前位置:网站首页>arthas无网络环境下离线安装方法
arthas无网络环境下离线安装方法
2020-11-09 13:44:00 【anshu】
本文主要介绍当服务器无法连接互联网情况下,无法安装arthas的解决方法。
一、下载
参考文末参考文章3中下载。也可以直接把下面文中的链接取出,直接用下载器下载。
# github下载
wget https://alibaba.github.io/arthas/arthas-boot.jar
# 或者 Gitee 下载
wget https://arthas.gitee.io/arthas-boot.jar
# 打印帮助信息
java -jar arthas-boot.jar -h
二、安装
# 运行方式1,先运行,在选择 Java 进程 PID
java -jar arthas-boot.jar
当联网安装时,可以正常安装。看下面的执行日志,可以看到,联网时会到maven.aliyun.com的私服库里去获取jar包。但是离线时,是无法直接获取的,执行时,会出现无法连接aliyun.com等error。
Downloads herman$ java -jar arthas-boot.jar
[INFO] arthas-boot version: 3.1.7
[INFO] Found existing java process, please choose one and hit RETURN.
* [1]: 59874 com.dtm.starter.StartApplication
[2]: 26057
[3]: 68065 com.bayss.infin.core.AppStarter
1
[INFO] Start download arthas from remote server: http://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/3.1.7/arthas-packaging-3.1.7-bin.zip
[INFO] File size: 10.33 MB, downloaded size: 1.08 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 2.15 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 3.23 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 4.38 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 5.40 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 6.54 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 7.52 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 8.66 MB, downloading ...
[INFO] File size: 10.33 MB, downloaded size: 9.71 MB, downloading ...
[INFO] Download arthas success.
[INFO] arthas home: /Users/herman/.arthas/lib/3.1.7/arthas
[INFO] Try to attach process 59874
[WARN] Current VM java version: 1.7 do not match target VM java version: 1.8, attach may fail.
[WARN] Target VM JAVA_HOME is /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre, arthas-boot JAVA_HOME is /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre, try to set the same JAVA_HOME.
[INFO] Attach process 59874 success.
[INFO] arthas-client connect 127.0.0.1 3658
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
| .-. || '--'.' | | | .--. || .-. |`. `-.
| | | || |\ \ | | | | | || | | |.-' |
`--' `--'`--' '--' `--' `--' `--'`--' `--'`-----'
wiki https://alibaba.github.io/arthas
tutorials https://alibaba.github.io/arthas/arthas-tutorials
version 3.1.7
pid 59874
time 2020-01-02 10:48:28
三、离线安装
其实方法很简单,只是有时候不容易想的到。
步骤1:先在可联网的电脑上,执行java -jar arthas-boot.jar
,从执行记录中可以看到,下载下来的依赖包放在了
[INFO] arthas home: /Users/herman/.arthas/lib/3.1.7/arthas
步骤2:进入到/Users/herman/.arthas/lib/3.1.7/arthas
路径下,把所有的内容打包即可,与arthas-boot.jar
一起上传到离线的服务器。
BUG:arthas herman$ ll
total 23048
-rw-r--r-- 1 herman staff 5993 1 2 10:48 arthas-spy.jar
-rw-r--r-- 1 herman staff 8347 1 2 10:48 arthas-agent.jar
-rw-r--r-- 1 herman staff 403091 1 2 10:48 arthas-client.jar
-rw-r--r-- 1 herman staff 111090 1 2 10:48 arthas-boot.jar
-rw-r--r-- 1 herman staff 3739 1 2 10:48 arthas-demo.jar
-rw-r--r-- 1 herman staff 635 1 2 10:48 install-local.sh
-rw-r--r-- 1 herman staff 28075 1 2 10:48 as.sh
-rw-r--r-- 1 herman staff 3127 1 2 10:48 as.bat
-rw-r--r-- 1 herman staff 7744 1 2 10:48 as-service.bat
drwxr-xr-x 4 herman staff 128 1 2 10:48 async-profiler
-rw-r--r-- 1 herman staff 11207868 1 2 10:48 arthas-core.jar
BUG:arthas herman$ pwd
/Users/herman/.arthas/lib/3.1.7/arthas
打包命令:tar -cvf
或者 zip
,用文件浏览器都行
步骤3:把打包的文件放在服务器上的用户根目录下,比如herman
用户,放在/home/herman/.arthas
下就可以。当然也可以指定执行路径。
相关参考文章:
1. 《arthas安装使用说明》 https://blog.csdn.net/zou100/article/details/84998559
2. 《arthas的安装和使用小结》https://blog.csdn.net/wangwei249/article/details/86595540
3. 《Arthas - Java 线上问题定位处理的终极利器》https://mp.weixin.qq.com/s/55gBspFp8yH0TCymdbZfkQ
版权声明
本文为[anshu]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4518192/blog/4709586
边栏推荐
- 【分布式】分布式锁都有哪些实现方案?
- Pay attention to the request forwarding problem of. Net core
- Efficient estimation of word representations in vector space
- Android 集成支付的四部曲
- Put method of immutablemap
- 导师制Unity网课 双十一优惠报名进行中
- 导师制Processing网课 双十一优惠进行中
- c语言(循环链表)实现贪吃蛇的基本功能
- Android NDK 开发实战 - 微信公众号二维码检测
- Android NDK development and actual combat WeChat official account 2-D code detection
猜你喜欢
走进京东 | 中国空间技术研究院青年创新联盟成员莅临参观京东总部
JVM learning (4) - garbage collector and memory allocation
嗯,查询滑动窗口最大值的这4种方法不错....
List of wechat video Number broadcasters October 2020
利用 Python 一键下载网易云音乐 10W+ 乐库
导师制Unity网课 双十一优惠报名进行中
Tidb x micro banking reduces time consumption by 58%, and distributed architecture helps to realize inclusive finance
Rainbow sorting | Dutch flag problem
Android Studio Avd「真·小白食用方法」
10款必装软件,让Windows使用效率飞起!
随机推荐
你这么不努力,怎么做年薪40W的大数据打工人?
Navigation component of Android architecture (2)
Efficient Estimation of Word Representations in Vector Space 论文笔记
腾讯云服务器搭建wordpress网站的两种方式(详细图文新手版)
Safety (miscellany)
Online course of tutorial system processing is in progress
块级元素和行内元素
块级元素和行内元素
跟我一起学.NetCore之EF Core 实战入门,一看就会
List of wechat video Number broadcasters October 2020
How to use function framework to develop large web application
Use treeview tree menu bar (recursively call database to create menu automatically)
Large scale project Objective-C - nsurlsession access SMS verification code application example sharing
注意.NET Core进行请求转发问题
CSP-J/S 2020考前注意事项
Interface tests how to pass files in post requests
基于synchronized锁的深度解析
Hadoop学习(三)-YARN
JVM学习(四)-垃圾回收器和内存分配
A simple way to realize terminal text paste board