Connection refused when attaching to java 9 process
Egor Ushakov
egor.ushakov at jetbrains.com
Wed Aug 29 13:46:00 UTC 2018
I was connecting from java 8 to java 9, it seems that in this
configuration it is not possible any more
On 29-Aug-18 13:50, Egor Ushakov wrote:
> this one I was able to overcome specifying the "hostname=127.0.0.1":
>
> >jdb -connect com.sun.jdi.SocketAttach:port=50327,hostname=127.0.0.1 -
> works well now, though strange
>
> but ProcessAttach still does not work:
>
> >jdb -connect com.sun.jdi.ProcessAttach:pid=47844
> java.net.ConnectException: Connection refused: connect
> at java.net.DualStackPlainSocketImpl.connect0(Native Method)
> at
> java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
>
>
>
> On 29-Aug-18 13:02, Egor Ushakov wrote:
>> Hi,
>>
>> First, I'm aware about changes in jdk 9 attach "security"
>> (bugs.openjdk.java.net/browse/JDK-8175050 etc.).
>> One specific case is still bothering me:
>> I'm starting a process in server mode without specifying an address:
>>
>> >java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n my.Endless
>> Listening for transport dt_socket at address: 50327
>>
>> so it auto select an address for me (which is what I want), but now
>> I'm unable to connect even from the same machine:
>>
>> >jdb -connect com.sun.jdi.SocketAttach:port=50327
>> java.net.ConnectException: Connection refused: connect
>> at java.net.DualStackPlainSocketImpl.connect0(Native Method)
>> at
>> java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
>> ...
>>
>> Is it possible to connect in this configuration?
>>
>> Thanks!
>>
>
--
Egor Ushakov
Software Developer
JetBrains
http://www.jetbrains.com
The Drive to Develop
More information about the serviceability-dev
mailing list