Arthas: 在windows10环境中运行as.bat失败

Created on 15 Sep 2018  ·  9Comments  ·  Source: alibaba/arthas

Start arthas failed, exception stack trace:
com.taobao.middleware.cli.InvalidValueException: The value '' is not accepted by 'pid'
        at com.taobao.middleware.cli.impl.DefaultCommandLine.create(DefaultCommandLine.java:342)
        at com.taobao.middleware.cli.impl.DefaultCommandLine.getValue(DefaultCommandLine.java:267)
        at com.taobao.middleware.cli.impl.DefaultCommandLine.getOptionValue(DefaultCommandLine.java:91)
        at com.taobao.arthas.core.Arthas.parse(Arthas.java:40)
        at com.taobao.arthas.core.Arthas.<init>(Arthas.java:23)
        at com.taobao.arthas.core.Arthas.main(Arthas.java:86)
Caused by: java.lang.IllegalArgumentException: java.lang.NumberFormatException: For input string: ""
        at com.taobao.middleware.cli.converters.ConstructorBasedConverter.fromString(ConstructorBasedConverter.java:70)
        at com.taobao.middleware.cli.converters.Converters.create(Converters.java:52)
        at com.taobao.middleware.cli.impl.DefaultCommandLine.create(DefaultCommandLine.java:339)
        ... 5 more
Caused by: java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:592)
        at java.lang.Integer.<init>(Integer.java:867)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.taobao.middleware.cli.converters.ConstructorBasedConverter.fromString(ConstructorBasedConverter.java:67)
        ... 7 more
question-answered

All 9 comments

和你一样的错误

和linux版本的功能不一样,需要指定连接的jvm的pid

What @ted-wq-x said is true, currently Windows support is not equivalent to Linux. Unlike in Linux the script will discover available pid automatically for you, in Windows you have to specify pid explicitly.
You can contribute to enhance the experience under Windows.

windows安装说明已更新,可以试下新版本: https://alibaba.github.io/arthas/install-detail.html#windows

windows10环境终于可以用了,启动的时候需要指定pid,没有开启Telnet功能,还需要开启这个功能

@LitterB Can you share your experience on how to make it work on Windows?

@ralf0131 sure (1): download the latest version arthas https://alibaba.github.io/arthas/install-detail.html#windows I used version 3.0.4
(2): make sure the windows open the function of Tetlen, which can setting from all setting -> program and function -> find the telent option and open it -> restart yours computer
(3): run the as.bat with perameter pid . example: as.bat 7500

@LitterB

Thanks for sharing!

(2): make sure the windows open the function of Tetlen, which can setting from all setting -> program and function -> find the telent option and open it -> restart yours computer

Never used Win10 before, I didn't know that :)

和linux版本的功能不一样,需要指定连接的jvm的pid

Now you can try an enhanced scrpit to get the similar effect like Linux, please refer:

https://github.com/alibaba/arthas/issues/63

Was this page helpful?
0 / 5 - 0 ratings