I have a remote server : Ubuntu 22.04. I have installed Tomcat 10 based on this tutorial .
tomcat is running:
root@server:/opt/tomcat/conf# sudo systemctl status tomcat
● tomcat.service - Tomcat
Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-07-18 09:42:35 UTC; 3s ago
Process: 18433 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
Main PID: 18440 (java)
Tasks: 31 (limit: 18973)
Memory: 108.9M
CPU: 3.399s
CGroup: /system.slice/tomcat.service
└─18440 /usr/lib/jvm/java-1.17.0-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/l>
Also the port 8080 is open and used by tomcat:
root@server:/opt/tomcat/conf# netstat -nat|grep :8080
tcp6 0 0 :::8080 :::* LISTEN
root@server:/opt/tomcat/conf# sudo lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 18606 tomcat 42u IPv6 108428 0t0 TCP *:http-alt (LISTEN)
The firewall is desabled :
root@server:/opt/tomcat/conf# sudo ufw status
Status: inactive
When I type http://myIpAdress
in my browser, it shows this :
https://i.sstatic.net/zu6Vn.png
But when I try to connect in browser using http://myIpAdress:8080
it doesn't work :
https://i.sstatic.net/k77az.png
Have you any idea why tomcat doesn't work on browser?
The port 8080 was open and the firewall was desabled, But the server's administrator was blocking the connection to this port. It works fine after the adminitrator's intervention.