0

I am trying to debug a jnlp with IntelliJ but it keeps telling me

Unable to open debugger port (localhost:5005): java.net.connectException "Connection refused: connect"

First I start the jnlp via command line with

javaws -J-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 http://server:port/app.jnlp

afterwards I run the remote debug configuration in IntelliJ and I get the aforementioned exception

Screenshot of the IntelliJ configuration and the command line: enter image description here

I've already read following questions:

but their answers (add arguments via Java control panel, set JAVA_TOOL_OPTIONS variable, ...) don't seem to work for me.

Any idea what I might be doing wrong?

I'm using IntelliJ 2017.1.5 and JDK1.8.0_121 on Windows 7.

Maarten Dhondt
  • 577
  • 1
  • 9
  • 22
  • Can you see port 5005 open using TcpView, netstat or similar tools? Does it belong to your jnlp app? Did you try some other port? Can you telnet to `localhost 5005`? – CrazyCoder Jul 06 '17 at 11:21
  • @CrazyCoder Nope. `telnet localhost 5005` says something like `Can not create connection with host on port 5005` – Maarten Dhondt Jul 06 '17 at 11:24
  • 1
    So, you need to figure out why your debug options do not have any effect, it has nothing to do with the IDE. – CrazyCoder Jul 06 '17 at 11:25
  • @CrazyCoder That's a start. Thanks. What do you mean by 'Does it belong to your jnlp app'? Do I need to configure port 5005 inside the jnlp? And yes, I tried different ports. – Maarten Dhondt Jul 06 '17 at 11:26
  • Apps like [TcpView](https://technet.microsoft.com/en-us/sysinternals/tcpview.aspx) will list the ports open for connection and will show which app the port was open by. That is what I mean by "belongs to". – CrazyCoder Jul 06 '17 at 11:31

0 Answers0