alibaba / arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
https://arthas.aliyun.com/
Apache License 2.0
35.68k stars 7.5k forks source link

docker/k8s pod 使用openjdk:8-jdk-slim基础镜像无法运行成功 #1228

Closed totemofwolf closed 4 years ago

totemofwolf commented 4 years ago

环境信息


* `arthas-boot.jar` 或者 `as.sh` 的版本: 3.3.2
* Arthas 版本: 3.3.2
* 操作系统版本:  $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

* 目标进程的JVM版本: $ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

* 执行`arthas-boot`的版本: xxx

### 重现问题的步骤

1. 切换到 deploy 用户 # su - deploy

$ export JAVA_HOME=/usr/local/openjdk-8
$ export JRE_HOME=/usr/local/openjdk-8
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/lib:/app/yyyy/lib
$ export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
$ export PATH=$PATH:$JAVA_HOME/bin

2. deploy@xxx:~$ as.sh
Arthas script version: 3.3.2
[INFO] JAVA_HOME: /usr/local/openjdk-8
Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
* [1]: 13 com.xxx.yyyy.Main
1
Arthas home: /home/deploy/.arthas/lib/3.3.2/arthas
Calculating attach execution time...
Attaching to 13 using version /home/deploy/.arthas/lib/3.3.2/arthas...
[ERROR] Start arthas failed, exception stack trace:
java.lang.UnsatisfiedLinkError: no attach in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1124)
    at sun.tools.attach.LinuxVirtualMachine.<clinit>(LinuxVirtualMachine.java:342)
    at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:78)
    at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:250)
    at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:86)
    at com.taobao.arthas.core.Arthas.<init>(Arthas.java:28)
    at com.taobao.arthas.core.Arthas.main(Arthas.java:124)

real    0m0.234s
user    0m0.283s
sys 0m0.034s
attach to target jvm (13) failed, check /home/deploy/logs/arthas/arthas.log or stderr of target jvm for any exceptions

### 期望的结果

### 实际运行的结果
  1. debug 模式 as.sh 输出:deploy@be-xxxx-service-c7978b4d7-82dnl:~$ as.sh
    • ARTHAS_SCRIPT_VERSION=3.3.2 +++ rreadlink /usr/bin/as.sh +++ target=/usr/bin/as.sh +++ fname= +++ targetDir= +++ CDPATH= +++ '[' -n '' ']' +++ : +++ '[' -L /usr/bin/as.sh ']' +++ '[' -e /usr/bin/as.sh ']' ++++ command dirname -- /usr/bin/as.sh ++++ dirname -- /usr/bin/as.sh +++ command cd /usr/bin +++ cd /usr/bin ++++ command basename -- /usr/bin/as.sh ++++ basename -- /usr/bin/as.sh +++ fname=as.sh +++ '[' as.sh = / ']' +++ '[' -L as.sh ']' +++ break ++++ command pwd -P ++++ pwd -P +++ targetDir=/usr/bin +++ '[' as.sh = . ']' +++ '[' as.sh = .. ']' +++ command printf '%s\n' /usr/bin/as.sh +++ printf '%s\n' /usr/bin/as.sh ++ dirname -- /usr/bin/as.sh
    • DIR=/usr/bin
    • ARTHAS_HOME=
    • ARTHAS_LIB_DIR=/home/deploy/.arthas/lib
    • TARGET_PID=
    • TARGET_IP=127.0.0.1
    • TELNET_PORT=3658
    • HTTP_PORT=8563
    • SESSION_TIMEOUT=1800
    • USE_VERSION=
    • REPO_MIRROR=
    • USE_HTTP=false
    • ATTACH_ONLY=false
    • DEBUG_ATTACH=false
    • HEIGHT=
    • WIDTH=
    • SELECT=
    • VERBOSE=false
    • COMMAND=
    • BATCH_FILE=
    • TUNNEL_SERVER=
    • AGENT_ID=
    • STAT_URL=
    • BATCH_MODE=false
    • TMP_DIR=/tmp
    • ARTHAS_VERSION=
    • MAVEN_METADATA_URL=PLACEHOLDER_REPO/com/taobao/arthas/arthas-packaging/maven-metadata.xml
    • REMOTE_DOWNLOAD_URL=PLACEHOLDER_REPO/com/taobao/arthas/arthas-packaging/PLACEHOLDER_VERSION/arthas-packaging-PLACEHOLDER_VERSION-bin.zip
    • SO_TIMEOUT=5
    • JVM_OPTS=
    • ARTHAS_OPTS=-Djava.awt.headless=true
    • OS_TYPE=
    • case "$(uname -s)" in ++ uname -s
    • OS_TYPE=Linux ++ command -v curl
    • '[' -x /usr/bin/curl ']' ++ command -v grep
    • '[' -x /bin/grep ']' ++ command -v awk
    • '[' -x /usr/bin/awk ']' ++ command -v telnet
    • '[' -x /usr/bin/telnet ']' ++ command -v unzip
    • '[' -x /usr/bin/unzip ']'
    • STATUS_EXEC_TIMEOUT=100
    • STATUS_EXEC_ERROR=101
    • main
    • echo 'Arthas script version: 3.3.2' Arthas script version: 3.3.2
    • check_permission
    • '[' '!' -w /home/deploy ']'
    • reset_for_env
    • mkdir -p /home/deploy/.arthas/lib
    • '[' -z /usr/local/openjdk-8 ']'
    • [[ -z /usr/local/openjdk-8 ]]
    • '[' -z /usr/local/openjdk-8 ']'
    • '[' '!' -d /usr/local/openjdk-8 ']'
    • '[' -z /usr/local/openjdk-8 ']'
    • local JAVA_VERSION
    • local 'IFS= ' ++ /usr/local/openjdk-8/bin/java -version ++ tr '\r' '\n'
    • local 'lines=openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-b09) OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)'
    • for line in $lines
    • [[ -z '' ]]
    • [[ openjdk version "1.8.0_252" = \v\e\r\s\i\o\n\ \" ]] ++ echo 'openjdk version "1.8.0_252"' ++ sed -e 's/.version "(.)"(.*)/\1/; 1q'
    • local ver=1.8.0_252
    • [[ 1.8.0_252 = \1. ]] ++ echo 1.8.0_252 ++ sed -e 's/1.([0-9])(.*)/\1/; 1q'
    • JAVA_VERSION=8
    • for line in $lines
    • [[ -z 8 ]]
    • for line in $lines
    • [[ -z 8 ]]
    • [[ 8 -lt 9 ]]
    • javaHomes=("${JAVA_HOME%%/}" "${JAVA_HOME%%/}/.." "${JAVA_HOME%%/}/../..")
    • for javaHome in ${javaHomes[@]}
    • toolsJar=/usr/local/openjdk-8/lib/tools.jar
    • '[' -f /usr/local/openjdk-8/lib/tools.jar ']' ++ rreadlink /usr/local/openjdk-8 ++ target=/usr/local/openjdk-8 ++ fname= ++ targetDir= ++ CDPATH= ++ '[' -n '' ']' ++ : ++ '[' -L /usr/local/openjdk-8 ']' ++ '[' -e /usr/local/openjdk-8 ']' +++ command dirname -- /usr/local/openjdk-8 +++ dirname -- /usr/local/openjdk-8 ++ command cd /usr/local ++ cd /usr/local +++ command basename -- /usr/local/openjdk-8 +++ basename -- /usr/local/openjdk-8 ++ fname=openjdk-8 ++ '[' openjdk-8 = / ']' ++ '[' -L openjdk-8 ']' ++ break +++ command pwd -P +++ pwd -P ++ targetDir=/usr/local ++ '[' openjdk-8 = . ']' ++ '[' openjdk-8 = .. ']' ++ command printf '%s\n' /usr/local/openjdk-8 ++ printf '%s\n' /usr/local/openjdk-8
    • JAVA_HOME=/usr/local/openjdk-8 ++ rreadlink /usr/local/openjdk-8/lib/tools.jar ++ target=/usr/local/openjdk-8/lib/tools.jar ++ fname= ++ targetDir= ++ CDPATH= ++ '[' -n '' ']' ++ : ++ '[' -L /usr/local/openjdk-8/lib/tools.jar ']' ++ '[' -e /usr/local/openjdk-8/lib/tools.jar ']' +++ command dirname -- /usr/local/openjdk-8/lib/tools.jar +++ dirname -- /usr/local/openjdk-8/lib/tools.jar ++ command cd /usr/local/openjdk-8/lib ++ cd /usr/local/openjdk-8/lib +++ command basename -- /usr/local/openjdk-8/lib/tools.jar +++ basename -- /usr/local/openjdk-8/lib/tools.jar ++ fname=tools.jar ++ '[' tools.jar = / ']' ++ '[' -L tools.jar ']' ++ break +++ command pwd -P +++ pwd -P ++ targetDir=/usr/local/openjdk-8/lib ++ '[' tools.jar = . ']' ++ '[' tools.jar = .. ']' ++ command printf '%s\n' /usr/local/openjdk-8/lib/tools.jar ++ printf '%s\n' /usr/local/openjdk-8/lib/tools.jar
    • BOOT_CLASSPATH=-Xbootclasspath/a:/usr/local/openjdk-8/lib/tools.jar
    • break
    • '[' -z -Xbootclasspath/a:/usr/local/openjdk-8/lib/tools.jar ']'
    • echo '[INFO] JAVA_HOME: /usr/local/openjdk-8' [INFO] JAVA_HOME: /usr/local/openjdk-8
    • [[ -x /opt/taobao/java ]]
    • parse_arguments
    • POSITIONAL=()
    • [[ 0 -gt 0 ]]
    • set --
    • [[ -n '' ]]
    • local telnetPortPid
    • local httpPortPid
    • [[ 3658 > 0 ]] ++ find_listen_port_process 3658 +++ command -v lsof ++ '[' -x /usr/bin/lsof ']' +++ lsof -t -s TCP:LISTEN -i TCP:3658 ++ echo
    • telnetPortPid=
    • '[' ']'
    • [[ 8563 > 0 ]] ++ find_listen_port_process 8563 +++ command -v lsof ++ '[' -x /usr/bin/lsof ']' +++ lsof -t -s TCP:LISTEN -i TCP:8563 ++ echo
    • httpPortPid=
    • '[' ']'
    • '[' -z ']'
    • REPO_MIRROR=center ++ command -v date
    • [[ -x /bin/date ]] ++ date +%z
    • [[ +0800 == +\0\8\0\0 ]]
    • REPO_MIRROR=aliyun
    • '[' -z ']'
    • '[' ']'
    • '[' -z ']'
    • '[' false = false ']'
    • local 'IFS= '
    • CANDIDATES=($(call_jps | grep -v sun.tools.jps.Jps | awk '{print $0}')) ++ call_jps ++ '[' false = true ']' ++ /usr/local/openjdk-8/bin/jps -l ++ grep -v sun.tools.jps.Jps ++ awk '{print $0}'
    • '[' 1 -eq 0 ']'
    • echo 'Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.' Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
    • index=0
    • suggest=1
    • for process in "${CANDIDATES[@]}"
    • index=1 ++ echo '13 com.xxxx.yyyy.Main' ++ grep -c org.apache.catalina.startup.Bootstrap
    • '[' 0 -eq 1 ']' ++ echo '13 com.xxxx.yyyy.Main' ++ grep -c com.taobao.pandora.boot.loader.SarLauncher
    • '[' 0 -eq 1 ']'
    • index=0
    • for process in "${CANDIDATES[@]}"
    • index=1
    • '[' 1 -eq 1 ']'
    • echo '* [1]: 13 com.xxxx.yyyy.Main'
    • [1]: 13 com.xxxx.yyyy.Main
    • read choice 1
    • '[' -z 1 ']' ++ echo '13 com.xxxx.yyyy.Main' ++ cut -d ' ' -f 1
    • TARGET_PID=13
    • [[ -n '' ]]
    • [[ -n '' ]]
    • [[ -z '' ]]
    • [[ ! -z '' ]]
    • '[' -z '' ']'
    • [[ -a /usr/bin/arthas-core.jar ]]
    • '[' -z '' ']' ++ get_remote_version +++ get_repo_url +++ local repoUrl= +++ [[ aliyun == \c\e\n\t\e\r ]] +++ [[ aliyun == \a\l\i\y\u\n ]] +++ repoUrl=https://maven.aliyun.com/repository/public +++ '[' -z https://maven.aliyun.com/repository/public ']' +++ '[' false = true ']' +++ echo https://maven.aliyun.com/repository/public ++ local url=https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/maven-metadata.xml ++ curl -sLk https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/maven-metadata.xml ++ head -n 1 ++ sed -n -e 's/.(.)<\/release>.*/\1/p'
    • local remote_version=3.3.2 ++ get_local_version ++ ls /home/deploy/.arthas/lib ++ sort ++ tail -1
    • local arthas_local_version=3.3.2 ++ version_gt 3.3.2 3.3.2 ++ [[ 3.3.2 == 3.3.2 ]] ++ return 1 ++ get_local_version ++ ls /home/deploy/.arthas/lib ++ sort ++ tail -1
    • local arthas_local_version=3.3.2
    • ARTHAS_HOME=/home/deploy/.arthas/lib/3.3.2/arthas
    • echo 'Arthas home: /home/deploy/.arthas/lib/3.3.2/arthas' Arthas home: /home/deploy/.arthas/lib/3.3.2/arthas
    • '[' '!' -d /home/deploy/.arthas/lib/3.3.2/arthas ']'
    • sanity_check
    • '[' Linux '!=' Linux ']' ++ ps -p 13 -o pid=
    • local 'pid= 13' ++ ps -p 13 -o pid= ++ echo 0
    • local exitCode=0
    • '[' 0 '!=' 0 ']'
    • '[' -z 13 ']' ++ id -u -n
    • local current_user=deploy ++ ps -p 13 -o user=
    • local target_user=deploy
    • '[' deploy '!=' deploy ']'
    • port_pid_check
    • [[ 3658 > 0 ]]
    • local telnet_output
    • local find_process_status ++ find_listen_port_process_by_client ++ local arthas_lib_dir=/home/deploy/.arthas/lib/3.3.2/arthas ++ '[' Linux = Cygwin ']' ++ /usr/local/openjdk-8/bin/java -Djava.awt.headless=true -jar /home/deploy/.arthas/lib/3.3.2/arthas/arthas-client.jar 127.0.0.1 3658 -c session --execution-timeout 2000 ++ return 1
    • telnet_output='Connect to telnet server error: 127.0.0.1 3658 java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:607) at org.apache.commons.net.SocketClient.connect(SocketClient.java:188) at org.apache.commons.net.SocketClient.connect(SocketClient.java:209) at com.taobao.arthas.client.TelnetConsole.process(TelnetConsole.java:312) at com.taobao.arthas.client.TelnetConsole.main(TelnetConsole.java:166) Usage: arthas-client [--help] [-c ] [-f ] [-t ] [-w ] [-h ] [target-ip] [port]

Arthas Telnet Client

EXAMPLES: java -jar arthas-client.jar 127.0.0.1 3658 java -jar arthas-client.jar -c '\''dashboard -n 1'\'' java -jar arthas-client.jar -f batch.as 127.0.0.1

Options and Arguments: --help Print usage -c,--command Command to execute, multiple commands separated by ; -f,--batch-file The batch file to execute -t,--execution-timeout The timeout (ms) of execute commands or batch file -w,--width The terminal width -h,--height The terminal height

Target ip The remote server port' + find_process_status=1 + [[ 1 -eq 100 ]] + [[ 1 -eq 101 ]] + [[ -n Connect to telnet server error: 127.0.0.1 3658 java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:607) at org.apache.commons.net.SocketClient.connect(SocketClient.java:188) at org.apache.commons.net.SocketClient.connect(SocketClient.java:209) at com.taobao.arthas.client.TelnetConsole.process(TelnetConsole.java:312) at com.taobao.arthas.client.TelnetConsole.main(TelnetConsole.java:166) Usage: arthas-client [--help] [-c ] [-f ] [-t ] [-w ] [-h ] [target-ip] [port] Arthas Telnet Client EXAMPLES: java -jar arthas-client.jar 127.0.0.1 3658 java -jar arthas-client.jar -c 'dashboard -n 1' java -jar arthas-client.jar -f batch.as 127.0.0.1 Options and Arguments: --help Print usage -c,--command Command to execute, multiple commands separated by ; -f,--batch-file The batch file to execute -t,--execution-timeout The timeout (ms) of execute commands or batch file -w,--width The terminal width -h,--height The terminal height Target ip The remote server port ]] ++ echo 'Connect to telnet server error: 127.0.0.1 3658 java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:607) at org.apache.commons.net.SocketClient.connect(SocketClient.java:188) at org.apache.commons.net.SocketClient.connect(SocketClient.java:209) at com.taobao.arthas.client.TelnetConsole.process(TelnetConsole.java:312) at com.taobao.arthas.client.TelnetConsole.main(TelnetConsole.java:166) Usage: arthas-client [--help] [-c ] [-f ] [-t ] [-w ] [-h ] [target-ip] [port] Arthas Telnet Client EXAMPLES: java -jar arthas-client.jar 127.0.0.1 3658 java -jar arthas-client.jar -c '\''dashboard -n 1'\'' java -jar arthas-client.jar -f batch.as 127.0.0.1 Options and Arguments: --help Print usage -c,--command Command to execute, multiple commands separated by ; -f,--batch-file The batch file to execute -t,--execution-timeout The timeout (ms) of execute commands or batch file -w,--width The terminal width -h,--height The terminal height Target ip The remote server port' ++ grep JAVA_PID ++ awk '{ print $2 }' + telnetPortPid= + [[ -n '' ]] + echo 'Calculating attach execution time...' Calculating attach execution time... + attach_jvm /home/deploy/.arthas/lib/3.3.2/arthas + local arthas_lib_dir=/home/deploy/.arthas/lib/3.3.2/arthas + '[' Linux = Cygwin ']' + echo 'Attaching to 13 using version /home/deploy/.arthas/lib/3.3.2/arthas...' Attaching to 13 using version /home/deploy/.arthas/lib/3.3.2/arthas... + java_command=("${JAVA_HOME}"/bin/java) + local java_command + '[' -Xbootclasspath/a:/usr/local/openjdk-8/lib/tools.jar ']' + java_command+=("${BOOT_CLASSPATH}") + tempArgs=() + local tempArgs + '[' '' ']' + '[' '' ']' + '[' '' ']' + /usr/local/openjdk-8/bin/java -Xbootclasspath/a:/usr/local/openjdk-8/lib/tools.jar -Djava.awt.headless=true -jar /home/deploy/.arthas/lib/3.3.2/arthas/arthas-core.jar -pid 13 -target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 -session-timeout 1800 -core /home/deploy/.arthas/lib/3.3.2/arthas/arthas-core.jar -agent /home/deploy/.arthas/lib/3.3.2/arthas/arthas-agent.jar [ERROR] Start arthas failed, exception stack trace: java.lang.UnsatisfiedLinkError: no attach in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1124) at sun.tools.attach.LinuxVirtualMachine.(LinuxVirtualMachine.java:342) at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:78) at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:250) at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:86) at com.taobao.arthas.core.Arthas.(Arthas.java:28) at com.taobao.arthas.core.Arthas.main(Arthas.java:124) + exit 1 real 0m0.215s user 0m0.248s sys 0m0.025s + '[' 1 -ne 0 ']' + exit_on_err 1 'attach to target jvm (13) failed, check /home/deploy/logs/arthas/arthas.log or stderr of target jvm for any exceptions.' + [[ ! -z attach to target jvm (13) failed, check /home/deploy/logs/arthas/arthas.log or stderr of target jvm for any exceptions. ]] + echo 'attach to target jvm (13) failed, check /home/deploy/logs/arthas/arthas.log or stderr of target jvm for any exceptions.' attach to target jvm (13) failed, check /home/deploy/logs/arthas/arthas.log or stderr of target jvm for any exceptions. + exit 1 ```
hengyunabc commented 4 years ago

之前有用户报过类似的: https://github.com/alibaba/arthas/search?q=no+attach+in+java.library.path&type=Issues

totemofwolf commented 4 years ago

OK,看到了钉钉中的回复:提到这个 issue: 设置环境变量_JAVA_OPTIONS 导致启动失败

问题原因明白了:因为我们的 pod 启动时插入了 JVM 环境变量 JAVA_TOOL_OPTIONS 导致 as.sh 脚本执行到 java -version 时候卡住:

# jps
Picked up JAVA_TOOL_OPTIONS: -javaagent:/rasp/rasp.jar -javaagent:/skywalking/agent/skywalking-agent.jar

说一下我的解决办法:


0、安装 arthas-3.3.2.deb
1、从 基础镜像 openjdk:8-jdk-slim 拷贝 /usr/local/openjdk-8 放入线上的 容器(基于openjdk:8-jre-slim) 的 /tmp/ (比如使用 lrzsz 工具)
2、修改 as.sh 脚本添加:
export JAVA_HOME=/tmp/openjdk-8
export PATH=/tmp/openjdk-8/bin:$PATH
unset JAVA_TOOL_OPTIONS

3、切换到 APP 运行时用户:su - deploy ,然后重新执行 as.sh
totemofwolf commented 4 years ago

627DFBA6-BE44-4767-B6B7-D5BD50F73C0A