I configure Java with: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
Based on what you note, the issue you are running into doesn't look related to the recent Local Network Privacy changes that are enforced in macos. Instead it just looks like an issue related to which interface the socket (listening on 5005) is bound to.
Starting Java 9, the instruction "address=5005" tells the JDK to bind to localhost if no specific host (like in this case) is specified in the value for "address". That's noted in the release note here https://www.oracle.com/java/technologies/javase/9-all-relnotes.html#JDK-8041435.
Based on this above output you pasted, that's what appears to be going on here - the JVM is listening on a socket bound to localhost:
nc on the same host says:
Mac-mini:13 alan$ nc -v localhost 5005
Connection to localhost port 5005 [tcp/avt-profile-2] succeeded!
These following documents have the details about how to configure the "address" option:
https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/conninv.html#oracle-vm-invocation-options
https://docs.oracle.com/en/java/javase/17/docs/specs/jpda/conninv.html#transports
Specifically, the documentation states:
Socket transport addresses have the format ":" where is the host name or the IP address (may be enclosed in square brackets) and is the socket port number to attach to or listen on. If is empty, the local loopback address is used. If equals "*" in contexts where a server is waiting for a client to attach, the server listens on all network interfaces.
Topic:
Privacy & Security
SubTopic:
General
Tags: