First use ps -ef | grep java
command to see whether the Tomcat process exists. If it doesn't exist, check the logs logs/catalina.out
to find out error messages.
Then make sure whether your Tomcat uses port 8080
to deal with HTTP requests. You can find similar text in the log file:
06-Jun-2021 12:58:12.264 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8081"]
I changed the HTTP port to 8081
, so the log shows http-nio-8081
. You can view/change the port in file conf/server.xml
:
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />