This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I run my dev IDE with this options: -J-agentlib:jdwp=transport=dt_socket,server=y,address=warden-oracle:8000,suspend=n And when I try to attach a debugger in 7.4: JPDA, SocketAttach, dt_socket, warden-oracle, 8000 It doesn't work. I just get "Malformed reply from SOCKS server" message in status bar (just for a second). Am I doing something wrong (that's definitely possible ;)? Or can I provide some more info? It seems that there is nothing useful in IDE log. Same setup works without any problem in 7.3.1 (and in older versions as well). Thanks in advance.
I am also experiencing the same behaviour performing a dt_socket attach.
In 7.4RC2 attaching a debugger was working but not anymore in the final release. The debugger initialize but then a timeout occure and no debug possible. I hope there will be a correction soon. See you
It's really annoying to start 7.3.1 when one needs to use debugger :(
Is it possible to have information about this issu ?
For me, NetBeans 7.3 and 7.4 behave exactly in the same way. When I run one instance of NetBeans (or any Java application) with -J-agentlib:jdwp=transport=dt_socket,server=y,address=martin-Latitude:8000,suspend=n and then try to attach to host "martin-Latitude" and port "8000", I get: Connection refused. When I attach to host "localhost" and port "8000" it works. But this is not NetBeans-specific. When I run: $ java -classpath /tmp/NetBeansProjects/AnagramGame/build/classes -agentlib:jdwp=transport=dt_socket,server=y,address=martin-Latitude:7000,suspend=n com.toy.anagrams.ui.Anagrams Then: $ jdb -attach martin-Latitude:7000 it gives me: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) .... Fatal error: Unable to attach to target VM. When I try to attach to localhost instead: $ jdb -attach localhost:7000 Set uncaught java.lang.Throwable Set deferred uncaught java.lang.Throwable Initializing jdb ... > => it works. Therefore the behavior in NetBeans is consistent with the behavior in jdb. Please verify the actual behavior with jdb before submitting bugs to NetBeans. P.S.: java and jdb are from jdk1.7.0_40 in my case.
Or try -J-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n (omit the host name) and then attach to Host: warden-oracle, Port: 8000 At least, this is what works for me as well. I know, that it's illogical, but you simply need to figure out the combination that works for you. I do not think I can do anything particular about it. Should you find any difference in the attach ability between jdb and NetBeans, then let me know.
I will make some try during lunch. But it didn't explain why with the same tomcat configuration (./startup.sh jpda) with netbeans 7.4RC2 attaching a debugger work out of the box and not with Netbeans 7.4 final.
When I try: 1) jdb -attach warden-oracle:8000 It works. 2) jdb -attach localhost:8000 It doesn't work: java.net.ConnectException: Spojení odmítnuto 3) connect with 7.3.1, with warden-oracle and 8000 It works. 4) connect with 7.3.1, with localhost and 8000 It doesn't work: Connection refused 5) connect with 7.4, with warden-oracle and 8000 It doesn't work: Malformed reply from SOCKS server 6) connect with 7.4, with localhost and 8000 It doesn't work: Connection refused In all cases 1.7.0_45-b18 is used. And the only difference is in connectiong via NB 7.4. So there has to be something suspicious :/ Don't you have any other ideas?
Well, so after discussion, the working solution for me is this setup: 1) run debugged application just with a port in address option: -J-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n 2) attach with NB 7.4 with Host: localhost Then it works. But really strange behavior ;) Thanks.
It seems that using localhost instead of machine name or 127.0.0.1 it works to attach a jpda debugger on local tomcat for example launch in jpda debug mode.
=> P2, there's a workaround. I've added a debug message, that can be used to verify arguments that were passed to the attaching connector. It also prints the exception body. Both information is logged into messages.log file. changeset: 266954:6327d0d12915 http://hg.netbeans.org/core-main/rev/6327d0d12915 This will be in NetBeans 8.0 dev version, should be available in the next nightly build.
Integrated into 'main-silver', will be available in build *201311080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6327d0d12915 User: mentlicher@netbeans.org Log: #237184: Print connector, it's arguments and exception stack trace into messages.log file when the attach fails.
Re-scheduling for the patch2. We do not know why the behavior differs between 7.3 and 7.4 yet. Providing messages.log file from a trunk build where the logging was added might help.
Unfortunately, we were not able to identify the problem yet. I had a suspicion that changes in core.network module could have an impact on this, but this was not confirmed. Omitting the host name seems to be a working workaround, reducing to P3.
*** Bug 235186 has been marked as a duplicate of this bug. ***