I have Tomcat 8 running on Amazon Linux EC2 instance. I started Tomcat in debug mode by ./catalina.sh jpda start
I think the server started in debug mode as I can see the line: Listening for transport dt_socket at address: 8000 at the start of the log. Also my security group has 8000 port open for inbound requests.
I am trying to debug this remotely from my Eclipse Mars 4.5.1 on Mac El Capitan. But it keeps giving me error Failed to connect to remote VM. Connection refused.
Is there something that I am missing? What is the way I can debug this more?
---EDITS FOR MORE INFO---
Adding some more information. I don't know if it would be helpful.
Running command: netstat -an | grep 80 gives following ouput:
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN
tcp 0 0 172.31.26.122:80 185.30.165.34:80 SYN_RECV
tcp 0 0 127.0.0.1:3306 127.0.0.1:55080 ESTABLISHED
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN
tcp 0 0 :::8009 :::* LISTEN
tcp 0 0 :::80 :::* LISTEN
tcp 0 0 ::ffff:127.0.0.1:55080 ::ffff:127.0.0.1:3306 ESTABLISHED
udp 0 0 0.0.0.0:980 0.0.0.0:*
udp 0 0 :::980 :::*
unix 2 [ ACC ] SEQPACKET LISTENING 8016 @/org/kernel/udev/udevd
unix 3 [ ] DGRAM 8025
unix 3 [ ] DGRAM 8024
But running command netstat -an | grep 8000 gives just:
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN
One more thing I noticed. The IP in Tomcat manager under Server Information is different than actual public IP. Is that expected?
telnet localhost 8000, what do you get? - BMW