I am trying to debug the application on my macbook pro ( os Mountain Lion ). But when I click on debug it is alerting that: unable to connect localhost 4010. I set the port to 4010 on jboss. Here is the output while app starting.
Listening for transport dt_socket at address: 4010
On Jidea; settings for debug is "remote server"
Remote Connection Settings;
host : localhost
port : 4010
Most likely you are using debugger port in place for HTTP port:
In case if you just want to connect to your local application server:
Open "Run/Debug configurations" window.
Add new configuration - Remote
Set up Port to your Jboss socket port
Related
When running my android emulator using the http-proxy config I get debug output indicating an error and no traffic on my proxy.
Starting the proxy:
emulator #image -port 5555 -http-proxy http://localhost:8080 -debug-proxy
and the error
tcp:172.217.16.68:443(77): cannot connect to proxy: Address family not supported by protocol
I cannot explain why but the solution is to change localhost to 127.0.0.1:
emulator #image -port 5555 -http-proxy http://127.0.0.1:8080 -debug-proxy
When I type localhost on my browser , I am unable to successfully connect..I am getting
The socket connection to localhost failed.
ErrorCode: 10061.
No connection could be made because the target machine actively refused it 127.0.0.1:80
How can I fix it?
You start a web server on your localhost listening on port 80. At present there isn't one.
I can ssh into the server say abc.xyz on port 22 but i can't remote debug it in Eclipse. Here is the additional info :
Server startup arguments -
-Xdebug -Xrunjdwp:transport=dt_socket,address=1234,server=y,suspend=n
Confirmation from logs -
Listening for transport dt_socket at address: 1234
When I telnet on my local system -
local-machine% telnet abc-xyz 1234
Trying xx.xx.xx.xx...
telnet: connect to address xx.xx.xx.xx: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
When I telnet on the server(abc.xyz) -
abc-xyz% telnet localhost 1234
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.
I've tried setting up tunnel via -
ssh -L 1234:localhost:1234 user#abc-xyz
ssh -L 1234:127.0.0.1:1234 user#abc-xyz
I'm attaching debugger in Eclipse with this config -
Connection type - Standard (Socket attach)
Host - localhost
Port - 1234
Can't get Eclipse to attach to 1234.
After setting up SSH Tunnel, if i manually try to connect to the port, i get this response -
local-machine% telnet localhost 1234
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.
and I see an entry in catalina.out as:
channel 4: open failed: connect failed: Connection refused
Any help would be appreciated.
EDIT - 1:
I ran
abc-xyz% ~#
and got the following output:
The following connections are open:
#2 client-session (t4 r0 i0/0 o0/0 fd 7/8 cc -1)
#3 direct-tcpip: listening port 1234 for localhost port 1234, connect from 127.0.0.1 port 23456 (t4 r1 i0/0 o0/0 fd 10/10 cc -1)
I think ssh tunneling is working, it's just the way i'm connecting with Eclipse which is going wrong here.
I just had to increase timeout. (Can be done via Window->Preferences->Java->Debugging. Set it to some appropriate value.)
I'd like to start a Tomcat debug session on my remote host from Eclipse, but it fails with this error:
Failed to connect to remote VM
com.sun.jdi.connect.spi.ClosedConnectionException
My Tomcat is, I think, correctly configured to received debug session on port 8000:
tomcat 18771 1 1 17:18 ? 00:00:16 /usr/lib/jvm/java/bin/java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Djava.rmi.server.hostname=10.30.0.17 -Dcatalina.ext.dirs=/usr/share/tomcat5/shared/lib:/usr/share/tomcat5/common/lib -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -Djava.endorsed.dirs=/usr/share/tomcat5/common/endorsed -classpath /usr/lib/jvm/java/lib/tools.jar:/usr/share/tomcat5/bin/bootstrap.jar:/usr/share/tomcat5/bin/commons-logging-api.jar:/usr/share/java/mx4j/mx4j-impl.jar:/usr/share/java/mx4j/mx4j-jmx.jar -Dcatalina.base=/usr/share/tomcat5 -Dcatalina.home=/usr/share/tomcat5 -Djava.io.tmpdir=/usr/share/tomcat5/temp org.apache.catalina.startup.Bootstrap start
There is a firewall between my PC and the remote server, but the port is well opened, as I can see these packets with tcpdump on the server:
17:41:17.110977 IP X.X.X.X.57010 > Y.Y.Y.Y.irdmi: S 868833744:868833744(0) win 8192 <mss 1460,nop,wscale 8,nop,nop,sackOK>
17:41:17.111183 IP Y.Y.Y.Y.irdmi > X.X.X.X.57010: S 3571247457:3571247457(0) ack 868833745 win 5840 <mss 1460,nop,nop,sackOK,nop,wscale 7>
17:41:17.112624 IP X.X.X.X.57010 > Y.Y.Y.Y.irdmi: . ack 1 win 256
17:41:19.113216 IP Y.Y.Y.Y.irdmi > X.X.X.X.57010: F 1:1(0) ack 1 win 46
17:41:19.114246 IP X.X.X.X.57010 > Y.Y.Y.Y.irdmi: P 1:15(14) ack 1 win 256
17:41:19.114279 IP Y.Y.Y.Y.irdmi > X.X.X.X.57010: R 3571247458:3571247458(0) win 0
The only message writtent in Tomcat logs is
Debugger failed to attach: timeout during handshake
I can't figure out what's wrong dispite informations I found on the web.
Can anyone can help me?
My server: RHEL 5.9, Tomcat 5.5, java 1.6
Regards,
Robert
I solved my issue : there were a packet inspection activated on the firewall between my PC and the server. It lets certain TCP packets trough, so the TCP handshack can occure, but block data TCP packet.
As I understand, first, a TCP connection is made, then an application handshake is done by the java server with TCP data packet. As data packet was filtered by the firewall, the application handshake could not been completed, and the application close the TCP connection by sending a FIN packet.
Regards,
Robert
I'm attempting to connect to a locally deployed JBoss 7.2.0 on osx, but I get the following error message when trying to connect with the CLI:
$ bin/jboss-cli.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect
The controller is not available at localhost:9999: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out
[disconnected /]
Netstat shows:
tcp4 0 0 127.0.0.1.9999 *.* LISTEN
and the server log states:
16:24:37,118 INFO [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on 127.0.0.1:9999
In addition to which, I can telnet to 127.0.0.1:9999 (though the connection dies due to incorrect packet size, which I presume is as intended).
I've verified that standalone.xml states 127.0.0.1 as the correct binding address and 9999 as the correct port for management-native.
Is there anything I've missed, or any other way to trouble shoot?
Yeah, a bug in OpenJDK turned out to be it.