1

I have deployed spring boot application on Virtual Machine, It's working locally , but cannot be reached from internet.

http://x.x.x.x:8080

Added Inbound rule to Network Interface in Azure portal , also Added Inbound Rule to Firewall.

Network interface

David Makogon
  • 69,407
  • 21
  • 141
  • 189

3 Answers3

0

I assume ARM: You'd need a public ip adress (static). You can add it to your control panel. Then associate it with your network interface.

Paul0515
  • 23,515
  • 9
  • 32
  • 47
  • Thanks for taking time to answer . Yes I have public ip attached to Network Interface - and Virtual Machine. Even I can access http://x.x.x.x:8080 (x.x.x.x being external ip) from browser inside Virtual Machine.. But can't access it from internet. As I said I have added Inbound rule to Network Interface and Firewall. I spend more than a week trying to get it working, maybe problem with Azure. – Ruslan Safarov Aug 24 '16 at 18:08
  • To isolate the issue i'd switch off the windows VM firewall entirely. Disassociate the Azure NSG firewall ... and test again. In ARM I still have this question .. how does port forwarding work? In classic model you could specify endpoints ... in ARM not. Any thoughts on that? Is there some 'default' behaviour to work with? – Paul0515 Aug 27 '16 at 16:48
  • Is there some 'default' port mapping/forwarding behaviour to work with? The only alternative I found was to use a loadbalancer(see this: https://social.msdn.microsoft.com/Forums/azure/en-US/2c4a819f-922b-46f5-b305-7e05845a62eb/cant-find-port-forwarding-in-new-vm-inside-resource-manager?forum=WAVirtualMachinesVirtualNetwork) – Paul0515 Aug 27 '16 at 16:55
0

Finally I could fix an issue for myself. Added port forwarding to 80 from 8080 using command:

netsh interface portproxy add v4tov4 listenport=80 connectport=8080 connectaddress=127.0.0.1

Also added Inbound rule for HTTP (port 80) and Firewall.

Stil, 8080 is not reachable, but at least I can connect to server using http.

0

Set the protocol to TCP. See here:

IIS/HTTP Endpoint on Azure VM (non-classic)

enter image description here

Community
  • 1
  • 1
jleach
  • 7,410
  • 3
  • 33
  • 60
  • Problem is not about port 80, it works as i said, port 8080 doesn't work even though i have added inbound rule for that - image in question. Workaround is to use port forwarding i wrote in comment. but 8080 still is not reachable. – Ruslan Safarov Aug 25 '16 at 23:09
  • I understand, but your Protocol settings for your attempt at 8080 is not set correctly (s/b TCP, not Any), that's what I meant to show with this screenshot. – jleach Aug 26 '16 at 09:47
  • Thanks for taking time to answer, Change to TCP , saved rule, still 8080 port doesn't open, i guess it's some sort of bug. – Ruslan Safarov Aug 26 '16 at 19:15
  • Odd. Just to be sure, this port is open on the OS's filewall as well, correct? – jleach Aug 26 '16 at 21:49
  • Yes both 8080 and 80 open in firewall. 80 works fine 8080 doesn't work. – Ruslan Safarov Aug 27 '16 at 12:49