mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 15:33:59 +00:00
better way to select process and better error info. close #445
This commit is contained in:
1 parent
f6d2c9eb7c
commit
1cec77997f
3 files changed
+21
-12
No files matched your search
@@ -635,14 +635,14 @@ parse_arguments()
|
||||
# check the process already using telnet port if equals to target pid
|
||||
if [[ ($telnetPortPid) && ($TARGET_PID != $telnetPortPid) ]]; then
|
||||
echo "[ERROR] Target process $TARGET_PID is not the process using port $TELNET_PORT, you will connect to an unexpected process."
|
||||
echo "[ERROR] If you still want to attach target process $TARGET_PID, Try to set a different telnet port by using --telnet-port argument."
|
||||
echo "[ERROR] Or try to shutdown the process $telnetPortPid using the telnet port first."
|
||||
echo "[ERROR] 1. Try to restart as.sh, select process $telnetPortPid, shutdown it first."
|
||||
echo "[ERROR] 2. Try to use different telnet port, for example: as.sh --telnet-port 9998 --http-port -1"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ($httpPortPid) && ($TARGET_PID != $httpPortPid) ]]; then
|
||||
echo "Target process $TARGET_PID is not the process using port $HTTP_PORT, you will connect to an unexpected process."
|
||||
echo "If you still want to attach target process $TARGET_PID, Try to set a different telnet port by using --telnet-port argument."
|
||||
echo "Or try to shutdown the process $httpPortPid using the telnet port first."
|
||||
echo "1. Try to restart as.sh, select process $httpPortPid, shutdown it first."
|
||||
echo "2. Try to use different http port, for example: as.sh --telnet-port 9998 --http-port 9999"
|
||||
exit 1
|
||||
fi
|
||||
elif [ -z ${TARGET_PID} ]; then
|
||||
|
||||
Reference in new issue
Block a user