Sto provando a connettere il mio debugger migliore a un'istanza di Glassfish remota (tramite remoto, non intendo eseguire la stessa macchina fisica e non solo nella stessa VM).Impossibile connettersi a Glassfish con qualsiasi debugger
La mia configurazione del dominio pesci vetro ha il flag "debug" controllato, e le relazioni server.log durante l'avvio
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009
che indica (a mio avviso), il debugging è infatti abilitato.
Tuttavia, quando provo a connettere un debugger, fallisce. La seguente sessione è un esempio (fatto con PuTTy):
$ jdb -connect com.sun.jdi.SocketAttach:port=9009
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:385)
at java.net.Socket.connect(Socket.java:529)
at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:204)
at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)
at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:72)
at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.java:358)
at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:168)
at com.sun.tools.example.debug.tty.Env.init(Env.java:64)
at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1010)
Fatal error:
Unable to attach to target VM.
Cosa potrebbe causare questo comportamento?
EDIT
Avviso questa riga di comando jdb è stato dato come un example of Glassfish debug testing on the web, qui è il motivo l'ho usato
Si noti anche che sto facendo questa sessione jdb di debug a livello locale (vale a dire quando connesso a quella macchina usando PuTTy, quindi invocando jdb sulla macchina su cui è in esecuzione Glassifh).
Si può eseguire 'ps -ef | grep java' come una rapida sanità mentale controlla che glassfish stia iniziando con i tuoi parametri jvm. Anche un netstat per lo stato di quella porta? – nsfyn55
Quando hai detto "correndo intendo non correre" intendevi questo "per REMOTO, intendo dire che non corro"? – vkraemer
@vkraemer Infatti. Ho cambiato la domanda di conseguenza. – Riduidel