Azure VM IP not access in my browser
Hi,
I install Redhat Linux server in azure and I install tomcat on that server and I try to browse from the internet(ipaddress:8080) the output shows like this
And in server "
curl: (7) Failed to connect to 20.81.42.8 port 80: Connection refused
curl ipaddress:8080"
Azure Virtual Machines
Azure Red Hat OpenShift
-
vipullag-MSFT 26,021 Reputation points
2022-06-28T10:29:05.433+00:00 Looks like the port is not accessible. Can you please check if the port is open on Public IP using this link?
if this is closed, please check the ports on NSG attached to the VM.
Also, to cross check any firewall blocking, check if this is accessible from other VM in same subnet.Make sure there are no other NSG's that are impacting the subnet of the VM.
Please check if the tomcat service is up and running using the following command:
ps -ef |grep -i tomcat
Lastly request you to check the tomcat configuration of the port 8080 and use below command to check if it is running:
netstat -lnp | grep 8080
-
Rajesh Gandhavarapu 1 Reputation point
2022-06-28T11:00:57.277+00:00 Hi, @vipullag-MSFT Thank you for your response.
these are the outputs:
ps -ef |grep -i tomcat
root 2493 2454 0 10:57 pts/0 00:00:00 grep --color=auto -i tomcat
netstat -lnp | grep 8080
nothing shown
-
Rajesh Gandhavarapu 1 Reputation point
2022-06-28T11:17:08.373+00:00 @vipullag-MSFT
while using this command "sudo netstat -tulpn | grep LISTEN"
output:tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 908/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1845/sshd
tcp6 0 0 :::5355 :::* LISTEN 908/systemd-resolve
tcp6 0 0 :::22 :::* LISTEN 1845/sshd -
vipullag-MSFT 26,021 Reputation points
2022-06-28T11:33:23.447+00:00 So based on your response, the port 8080 is not serving.
You can check the tomcat configuration and try to restart it once.Also, as suggested in previous response see if port 8080 is open in NSG and is accessible from the link shared via pub ip.
-
Rajesh Gandhavarapu 1 Reputation point
2022-06-28T11:41:35.083+00:00 @vipullag-MSFT
in tomcat, I changed the port from 8080 to 80 and I opened both ports 8080 and 80 in NSG.
in my case, only 22 port can be accessed other ports are not accessed. i tested in https://www.yougetsignal.com/I don't know what's the reason and I am unable to find the root cause please help me.
-
Rajesh Gandhavarapu 1 Reputation point
2022-06-28T12:17:20.437+00:00 @vipullag-MSFT
This is for port 80
"netstat -lnp | grep 80"udp 0 0 0.0.0.0:68 0.0.0.0:* 1801/dhclient
unix 2 [ ACC ] STREAM LISTENING 24804 1323/sssd_be /var/lib/sss/pipes/private/sbus-dp_implicit_files.1323
unix 2 [ ACC ] STREAM LISTENING 23480 1294/lsmd /var/run/lsm/ipc/sim -
vipullag-MSFT 26,021 Reputation points
2022-07-01T04:35:25.303+00:00 Thanks for confirming that apart from port 22 no other ports are accessible on Pub IP for the VM.
As suggested previously can you test as mentioned below:
- Try reaching to the VM(tomcat VM) from another VM inside the same subnet. This will help rule out the issue within subnet.
- Check the Network section in Azure Portal on the VM to see if there are any other NSG's that are impacting the Subnet. This will help rule out NSG level blocking.
- Are you trying this via any corp firewall? Try to access it without that and check once. This will help rule out any corp policies/firewall blocking this.
Sign in to comment