See a solution:
- Go to the tomat installation directory, find the directory with the logs folder, and execute the command
sudo chmod a+rwx -R logs
. It means to change the permissions of the logs folder so that tomcat can access this folder.
But after the above modification, the permissions of the logs folder is indeed modified, but the above error is still reported. Guessing may be the reason for the logs generated when Tomcat was used before, so I deleted all the logs inside, and then went back to the bin directory to execute again ./startup.sh
, and Tomcat would be able to start.