legend12
legend12

Reputation: 375

Apache Tomcat will not start on Mac

I cannot get Apache Tomcat to start. I followed the instructions for installing Tomcat on the Mac found at https://www.dev2qa.com/how-to-install-tomcat-in-macos/.

After I type the command to start Tomcat, the response from the command line is that Tomcat has started.

However, when I go to the browser, the default page is not showing up. I further checked to see if the port was being used by using the command

lsof -nP -i4TCP:8080 | grep LISTEN

which showed that no program is using the port. I also read the 'RUNNING.txt' that instructed me on setting the environmental variables, which I did. Any suggestions on why Tomcat is not starting up.

I'm using jdk 1.8.0_202 and Apache Tomcat 9.0.14 that is running of Mac OS High Sierra.

Upvotes: 1

Views: 2806

Answers (2)

Basil Bourque
Basil Bourque

Reputation: 340230

BatChmod

Logo and tag line for the BatChmod app

After downloading a fresh version of Tomcat, I use the BatChmod app to alter the file permissions. Tomcat will not launch properly without altering the permissions.

I do not know the command-line equivalent, but here is a screenshot of the settings I have used for years successfully.

screenshot of BatChmod.app settings for Apache Tomcat file permissions

Plea for help

If anyone can write the equivalent as a shell script for macOS, please post!

Even better, explain how to wrap such a script as an AppleScript for drag-and-drop execution in Finder.

Upvotes: 1

legend12
legend12

Reputation: 375

The problem turned out to be a permissions problem. When I installed Tomcat, I put the folder in the '/Library/Tomcat' directory. Even though the Tomcat files were changed to be executable, the user and group ownership remained the same. To get Tomcat to run, I moved the directory to 'Users/MyUserName/Tomcat'. Once I did that, the default Tomcat page ran.

Upvotes: 0

Related Questions