Hi Alan,

On 01.08.24 11:00, Alan Masters wrote:
I have configured apache-tomcat-9.0.91 to run as localhost:8080 on
Windows 11.

Once I have executed the startup.bat, and open localhost:8080 and get:

   If you're seeing this, you've successfully installed Tomcat.
   Congratulations

However frequently when closing down with shutdown.bat and re-starting
with startup.bat then opening localhost:8080 I get:


     HTTP Status 404 – Not Found
...

After various attempts to shutdown / re-start I get some success, but
this is quite frustrating and makes using it for testing purposes
difficult.

As you mention "testing purposes": Consider to start Tomcat with
*catalina.bat run* . This way it is running in the current console
window and you can check better how it's running (or if it still is).
You can also shut it down by hitting Ctrl-C (or by shutdown.bat from a
different console window)

Restart might fail if your shutdown process takes a while -
"shutdown.bat" returns immediately, but that doesn't mean that Tomcat
already shut down. And while it still shuts down, you can't start it
again, as it still occupies the relevant ports.

This is my best guess why a restart won't happen, or will only happen
after a few attempts: Simply wait until it's surely stopped before you
restart. And if you use "catalina.bat run" in one window only, you can
be sure that the shutdown process is finished before you execute the
command again.

Olaf


Reply via email to