Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat Logging while running as a windows service

I have a web application running under Tomcat.

Logging for various features is implemented using java.util.logging.

When running tomcat via startup.bat the logging files are created and record the logging as expected.

When running as a windows service using the same war file the output from logging is virtually absent. There is some ( Barely any ) log output in stdout.log and stderr.log but not what is expected.

Does this sound familiar to anyone? what steps did you take to correct it?

Regards

like image 391
FacilityDerek Avatar asked Sep 12 '25 02:09

FacilityDerek


1 Answers

This is probably a permissions issue when using Tomcat 9 on windows.

The service.bat install tool from the bin folder of tomcat is registering tomcat as a local service account.

This account type doesn't have enough permissions (among which writing its log files and compiling jsps). To fix this you can change the service account type and use a local user account to run the service.

Alternatively the account can be changed to a local system acocunt (which used to be the case for the service installer), but due to security reasons, this is no longer recommended.

See also Tomcat Service gets installed with “Local Service” account

like image 197
Ekkelenkamp Avatar answered Sep 14 '25 16:09

Ekkelenkamp