(real) remote debug not possible with Java 11+

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
Th3WalkingDad
Posts: 16
Joined: 01 Jun 2020, 14:20

(real) remote debug not possible with Java 11+

Post by Th3WalkingDad »

Hello,

To make it short, since JRE 9 , JDWP socket connector accept only local connections by default (source : https://www.oracle.com/technetwork/java ... DK-8041435 )
This means using OWS settings panel with {port} field, the java application will only listen on 127.0.0.1:{port} when launched with JRE 11.0.6 (while with AdoptOpenJDK 8u242 it listens on every interface).
This is normally possible either to pass the wanted address:port or *:port to listen to all network interfaces.
But in OWS settings panel, it's only possible to input the port. When other format are input ==> 'Please input valid port", with is right but didn't help.

Result:
Image

Could change/upgrade the "port" field to "address" to allow to input a full IP:PORT (or at minimal allow or give a way to prefix the port with an address or "*:" ?

Thank you.

PS: By using "TCP forwarding" it is possible to reach the local debugging port remotely, by forwarding a reachable IP:PORT on the machine the java app is running , to the local:port configured in OWS setting on the same machine.

Janak Mulani
Posts: 51
Joined: 24 Mar 2020, 13:37

Re: (real) remote debug not possible with Java 11+

Post by Janak Mulani »

Hi,

You are right. The setting should allow *:port or ipaddr:port. "port" shouuld be changed to "address".

I will create an issue and we will fix it in a future release.

In the mean time you could specify the following argument in javaws.vmoptions file:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=<ip_address here>:5005

Thanks

Janak

Stephan Classen
Posts: 46
Joined: 27 Mar 2020, 09:55

Re: (real) remote debug not possible with Java 11+

Post by Stephan Classen »

We added a new input field to specify the host in 1.1.8
It will be available early next week

Th3WalkingDad
Posts: 16
Joined: 01 Jun 2020, 14:20

Re: (real) remote debug not possible with Java 11+

Post by Th3WalkingDad »

Thank you for this ! :D

Post Reply