Oliver
April 12, 2018, 3:24pm
1
I have a KM Macro which is supposed to start Tomcat 8 at login or via status menu option, but neither start Tomcat 8.
The command that runs in the “Execute Shell Script” is simple:
/Users/…/Library/apache-tomcat-8.0.26/bin/startup.sh
Running this command directly in Terminal does start Tomcat 8.
Suggestions?
Thanks,
What error are you getting? Adjust the action to display the output, including any error message, in a window.
Oliver
April 13, 2018, 10:50am
3
Hi Peter,
I had already enabled both those settings.
The message in the "Keyboard Maestro - Shell Script Results" window is:
Tomcat started.
But Tomcat is not running. Again, running this exact same shell command at the command line does start Tomcat correctly.
Maybe you can try this yourself?
Download and installing Tomcat is easy.
Thanks in advance,
iNik
April 13, 2018, 2:52pm
4
Do you need to run this as admin? If so, you’ll need to update your sudoers file to let you run it as admin without a password.
Oliver
April 13, 2018, 3:46pm
5
No, it runs fine (at the command line) as the regular user.
Thanks,
Clearly, it is running the command, and then the command is printing “Tomcat started.” and then it is not continuing.
Check the Tomcat logs.
Probably it is not set correctly because it is missing environment variables that are configured in your terminal.
See the section on Path in Shell Script on the wiki, and keep in mind the same thing applies to all other environment settings.
So it might be running the wrong version of tomcat, or maybe there are other environment variables that affect the process.
Oliver
April 14, 2018, 12:13pm
7
Fixed it.
Seemed like a strange issue.
FIX: Upgraded to Tomcat 9 and pointed JAVA_HOME to Java 10 JRE. Error gone and KM is now starting Tomcat.
The error using an older version of Tomcat, Tomcat 8, was:
…/Library/apache-tomcat-8.0.26/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Thanks for all the ideas and replies.