I'm trying to run a startup script but I get an error that CATALINA_HOME contains a colon, which I see that it does, however that is the path to tomcat.
In other questions I saw examples of setting CATALINA_HOME that included colons, so I don't see what's different here.
I'm on a Windows machine, using MINGW64 and I have JAVA_HOME set.
$ ./startup.sh
Using CATALINA_HOME: C:\projects\apache-tomcat-8.5.11
Unable to start as CATALINA_HOME contains a colon (:) character
Anyone come across this before ?
Same problem for me with this message:
user@DESKTOP-1I6N4PQ MINGW64 /g/dev
$ catalina.sh
Using CATALINA_HOME: G:\dev\apache-tomcat-8.5.12-windows-x64
Unable to start as CATALINA_HOME contains a colon (:) character
Solution:
Set the
CATALINA_HOME
without using the colon:
like this:
After that, here is the working result:
user@DESKTOP-1I6N4PQ MINGW64 /g/dev
$ catalina.sh
Using CATALINA_BASE: \dev\apache-tomcat-8.5.12-windows-x64
Using CATALINA_HOME: \dev\apache-tomcat-8.5.12-windows-x64
Using CATALINA_TMPDIR: \dev\apache-tomcat-8.5.12-windows-x64/temp
Using JRE_HOME: C:\Program Files\Java\jdk1.8.0_121
Using CLASSPATH: \dev\apache-tomcat-8.5.12-windows-x64/bin/bootstrap.jar:\dev\apache-tomcat -8.5.12-windows-x64/bin/tomcat-juli.jar
Usage: catalina.sh ( commands ... )
commands:
debug Start Catalina in a debugger
debug -security Debug Catalina with a security manager
jpda start Start Catalina under JPDA debugger
run Start Catalina in the current window
run -security Start in the current window with security manager
start Start Catalina in a separate window
start -security Start in a separate window with security manager
stop Stop Catalina, waiting up to 5 seconds for the process to end
stop n Stop Catalina, waiting up to n seconds for the process to end
stop -force Stop Catalina, wait up to 5 seconds and then use kill -KILL if still running
stop n -force Stop Catalina, wait up to n seconds and then use kill -KILL if still running
configtest Run a basic syntax check on server.xml - check exit code for result
version What version of tomcat are you running?
Note: Waiting for the process to end and use of the -force option require that $CATALINA_PID is d efined
user@DESKTOP-1I6N4PQ MINGW64 /g/dev
$
Note:
In catalina.sh
file, you'll find this:
# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon
# as this is used as the separator in the classpath and Java provides no
# mechanism for escaping if the same character appears in the path.
case $CATALINA_HOME in *:*)
echo "Using CATALINA_HOME: $CATALINA_HOME";
echo "Unable to start as CATALINA_HOME contains a colon (:) character";
exit 1;
So removing the colon solved the problem.