0

I've created an Ubuntu Virtual Machine in Microsoft Azure and uploaded a Java application which uses a java.net.ServerSocket to handle incoming messages I send - with java.net.Socket - to port 20000. This application works perfectly in any machines, but it can't receive any connections when running in Azure VM.

I realized that the VM won't answer for pings and traceroutes, but I can connect to it using SSH (PuTTY) and also send files using PSCP. I've already configured endpoints on Azure - with the public and private ports (20000). I also tried to disable firewalls on VM, but never successfully. VM isn't reachable.

What more can I try? Thanks in advance.

LucasBatalha
  • 43
  • 1
  • 8
  • You disabled the firewall on VM, but what about the one on the OS (iptable) ? – ortis Nov 17 '14 at 13:45
  • I tried allowing port on iptables on first and later disabling it. – LucasBatalha Nov 17 '14 at 13:54
  • This sounds like a system administration problem not a programming problem. – Stephen C Nov 17 '14 at 13:55
  • try a `tcpdump`. See if you get any packets when try to connect on the port – ortis Nov 17 '14 at 14:01
  • Thank you all for helping. I tried `sudo tcpdump dst port 20000` and got all the packets I sent, but even when iptables (ufw) is disabled these packets can't reach my `ServerSocket`. And I really don't think there's programming problem. What should I try? – LucasBatalha Nov 17 '14 at 16:08
  • so: you're receiving data (checked with `tcpdump`), you are listening on `0.0.0.0:20000` (checked with netstat -anp) and you diasbled the firewall (checked with `iptable`) ? I have to admit that I am running out of ideas. Have you tried to `telnet` your VM on port 20000 and see if the connection goes well ? if not, it has to be an issue in the Java code – ortis Nov 17 '14 at 17:10
  • @ortis Thank you very much. I'm gonna try `telnet` tomorrow. The code is very simple and worked well on every computer we tried. I post results later. Thanks. – LucasBatalha Nov 17 '14 at 17:27

0 Answers0