VM on Azure: Tomcat not wokring on public IP

Hemant Shah 6 Reputation points
2021-11-13T20:39:47.303+00:00

I have create on VM on Azure with free sub.
I have installed tomcat 9 on Azure VM.
I am able to access tomcat default page from http ://localhost:8080/ as well with private ip http ://10.0.1.4:8080/
But not able too access with public IIP http://23.99.180.53:8080/ from outside as well within VM browser.

Please suggest Do I need any settings.

Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
282 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Hemant Shah 6 Reputation points
    2021-11-14T18:58:06.52+00:00

    I have same configuration as above also IIS server page I am able to access from public IP with 80.

    Issue was you need to enable firewall in VM for tomcat server.
    From Control Panel\System and Security\Windows Defender Firewall
    than select Allowed apps... and select tomcat 9 from bin folder.
    Also always install tomcat with binary(with.exe installation) do not copy zip or tar file.

    1 person found this answer helpful.
    0 comments No comments

  2. Pradeep Kommaraju 2,546 Reputation points
    2021-11-14T01:09:00.043+00:00

    Hi @Hemant Shah

    Thank you for reaching out to Microsoft Q&A Platform

    This makes me think that perhaps your tomcat is listening on 127.0.0.1 instead of your public ip.
    Can you please try to navigate to NGS of the VM and make sure port 80 and 8080 are open as well ?

    149087-image.png

    Hope this helps , And request you to accept the answer if it works .

    Thanks& Regards,,
    Pradeep

    0 comments No comments