Page 1 of 1

Invalid variable for CATALINA_HOME

Posted: Mon Sep 14, 2020 10:40 pm
by fernando
Dear support,

I am trying to set the environment variables for my OpenEMM 20.04 installation as demands administration guide at page 23.

Here is the output

Code: Select all

================================
= OpenEMM Installer v20.04.003 =
================================
Host: mm3.v2v.net
Runtime Version: 20.04.000.043
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

DB Connection cannot be established. (Maybe DB user or DB connection parameters for OpenEMM were not configured)
DB structure does not exist. (Maybe OpenEMM is not installed)
Mandatory emmProperties file is missing (Maybe OpenEMM is not installed)
Basic webapplication configuration for JAVA is missing or invalid. Please configure.

Current menu: Configure basic environment (Java, Tomcat, Tomcat-Native, Wkhtml)

Current webapp basic configuration:
 JAVA_HOME:
 CATALINA_HOME:
 Tomcat-Native: None
 WKHTMLTOPDF:
 WKHTMLTOIMAGE:

Do you want to change this configuration? (y/N, Blank => Cancel):
 > y
Please enter path for JAVA_HOME (Blank => Cancel):
 > /usr/lib/jvm/java

Please enter path for CATALINA_HOME (Blank => Skip configuration of existing Tomcat and install some):
 > /home/openemm/tomcat/
Invalid variable for CATALINA_HOME
Here is the folder structure for /home/openemm:

Code: Select all

[openemm@mm3 ~]$ ls -lha
total 3.9M
drwx------  11 openemm openemm 4.0K Sep 14 18:25 .
drwxr-xr-x.  3 root    root    4.0K Sep 11 21:32 ..
-rw-------   1 openemm openemm  987 Sep 14 18:37 .bash_history
-rw-r--r--   1 openemm openemm   18 Nov  8  2019 .bash_logout
-rw-r--r--   1 openemm openemm  192 Sep 12 12:08 .bash_profile
-rw-r--r--   1 openemm openemm  312 Nov  8  2019 .bashrc
drwxrwxr-x   2 openemm openemm 4.0K Sep 14 21:30 bin
lrwxrwxrwx   1 openemm root      25 Sep 12 12:03 conf -> /home/openemm/tomcat/conf
drwxr-xr-x   2 openemm root    4.0K Sep 12 12:03 etc
lrwxrwxrwx   1 openemm root      25 Sep 12 12:03 logs -> /home/openemm/tomcat/logs
-rw-------   1 openemm openemm   18 Sep 14 18:25 .mysql_history
-rw-r--r--   1 openemm openemm 3.8M Sep 11 22:32 openemm-runtime-20.04.000.043.tar.gz
drwxr-xr-x   5 root    root    4.0K Sep 14 19:21 opt
drwxr-xr-x   3 openemm root    4.0K Sep 14 15:52 release
drwxr-xr-x   2 openemm openemm 4.0K Sep 11 22:00 .ssh
drwxr-xr-x   2 openemm root    4.0K Sep 12 12:03 temp
lrwxrwxrwx   1 openemm openemm    7 May 29 09:08 tomcat -> tomcat9
drwxrwxr-x   6 openemm openemm 4.0K May 29 09:08 tomcat9
-rw-------   1 openemm openemm 1.1K Sep 14 15:33 .viminfo
drwxrwxr-x   2 openemm openemm 4.0K May 29 09:08 webapps
drwxrwxr-x   2 openemm openemm 4.0K May 29 09:08 webapps-leave-empty
Here is the /home/openemm/opt:

Code: Select all

[openemm@mm3 ~]$ ls -lha opt
total 24M
drwxr-xr-x  5 root    root    4.0K Sep 14 19:21 .
drwx------ 11 openemm openemm 4.0K Sep 14 18:25 ..
lrwxrwxrwx  1 root    root      12 Sep 11 22:46 python3 -> Python-3.8.5
drwxr-xr-x 23 openemm openemm 4.0K Sep 11 22:52 Python-3.8.5
-rw-r--r--  1 root    root     24M Jul 20 15:04 Python-3.8.5.tgz
drwxr-xr-x  3 root    root    4.0K Sep 14 19:22 tomcat
drwxr-xr-x  3 root    root    4.0K Sep 14 19:21 tomcat-native-1.2.24
I need HTTPS, so I've installed tomcat-native:

Code: Select all

[openemm@mm3 ~]$ ls -lha opt/tomcat
total 424K
drwxr-xr-x 3 root    root    4.0K Sep 14 19:22 .
drwxr-xr-x 5 root    root    4.0K Sep 14 19:21 ..
lrwxrwxrwx 1 root    root      38 Sep 14 19:22 tomcat-native -> /home/openemm/opt/tomcat-native-1.2.24
drwxr-xr-x 8 openemm openemm 4.0K Apr 24 19:25 tomcat-native-1.2.24-src
-rw-r--r-- 1 root    root    410K Apr 24 20:06 tomcat-native-1.2.24-src.tar.gz
Thank you for your valuable time!
Fernando

Re: Invalid variable for CATALINA_HOME

Posted: Tue Sep 15, 2020 2:09 pm
by maschoff
Please enter path for CATALINA_HOME (Blank => Skip configuration of existing Tomcat and install some):
> /home/openemm/tomcat/
Invalid variable for CATALINA_HOME
Have you re-tried the path without the trailing slash?

Re: Invalid variable for CATALINA_HOME

Posted: Tue Sep 15, 2020 11:43 pm
by fernando
Hello maschoff,

Yes, I tried. I've also tried tomcat9 with and without trailing slash:

Code: Select all

Current webapp basic configuration:
 JAVA_HOME: /usr/lib/jvm/java
 CATALINA_HOME: None
 Tomcat-Native: None
 WKHTMLTOPDF: None
 WKHTMLTOIMAGE: None

Do you want to change this configuration? (y/N, Blank => Cancel):
 > y
Please enter path for JAVA_HOME (Blank => Cancel, 'Default' for '/usr/lib/jvm/java'):
 > Default

Please enter path for CATALINA_HOME (Blank => Skip configuration of existing Tomcat and install some):
 > /home/openemm/tomcat
 Invalid variable for CATALINA_HOME
 > /home/openemm/tomcat9
Invalid variable for CATALINA_HOME
 > /home/openemm/tomcat9/
Invalid variable for CATALINA_HOME
 >
 
Thank you.

Re: Invalid variable for CATALINA_HOME

Posted: Wed Sep 16, 2020 1:22 pm
by aso
Is the following file available in your CATALINA_HOME ?:
${CATALINA_HOME}/lib/catalina.jar

Can you execute:
${JAVA_HOME}/bin/java -cp ${CATALINA_HOME}/lib/catalina.jar org.apache.catalina.util.ServerInfo
This should return your available Tomcat Version Info.

The Data in our shipped folder "/home/openemm/tomcat" is only for Tomcat configuration.
Please install or find your Tomcat binary files and use their directory as "CATALINA_HOME".

Re: Invalid variable for CATALINA_HOME

Posted: Wed Sep 16, 2020 2:13 pm
by fernando
Hello aso, thank you for your response.

I don't have the file catalina.jar /home/openemm/tomcat/lib/

Here is the content off this folder:

Code: Select all

 [openemm@mm3 ~]$ ls -lha tomcat/lib/
total 4.0M
drwxrwxr-x 2 openemm openemm 4.0K May 29 09:08 .
drwxrwxr-x 6 openemm openemm 4.0K May 29 09:08 ..
-rw-rw-r-- 1 openemm openemm 2.6M May 29 09:08 derby.jar
-rw-rw-r-- 1 openemm openemm 483K May 29 09:08 mariadb-java-client-2.1.2.jar
-rw-rw-r-- 1 openemm openemm 968K May 29 09:08 mysql-connector-java-5.1.40-bin.jar
Here is the output off the command you asked:

Code: Select all

[openemm@mm3 ~]$ ${JAVA_HOME}/bin/java -cp /home/openemm/tomcat/lib/catalina.jar org.apache.catalina.util.ServerInfo
Error: Could not find or load main class org.apache.catalina.util.ServerInfo
The script gave me the opportunity to download and install Tomcat. Here is the output:

Code: Select all

Do you want to install the included Tomcat application now? (Y/n, Blank => Yes):
 > Starting OpenEMM Update ...

Found update package 'apache-tomcat-9.0.33.tar.gz' for application 'TOMCAT' with version '9.0.33'.
Your current version is 'None'.
Download started
[******************************************************************************]
11,027,411 of 11,027,411 Bytes (100%)
Download finished

Installation failed. Please install and configure the mandatory Apache Tomcat 9 application manually.
See OpenEMM's "Admin and Install Guide" for help.
I will try to install Tomcat manually.
Thank you for your time!
Fernando

Re: Invalid variable for CATALINA_HOME

Posted: Wed Sep 16, 2020 3:17 pm
by fernando
I've found the problem!

The OpenEMMInstaller.sh executed by user openemm was not able to write the Tomcat installer package in folder /home/openemm/opt. It belogs to root, as you can see below:

Code: Select all

drwxr-xr-x   5 root    root    4.0K Sep 14 19:21 opt
I just changed the the owner back to openemm and the script worked!

Thank you again maschoff and aso for your time helping me.
Best regards!
Fernando

Re: Invalid variable for CATALINA_HOME

Posted: Tue May 11, 2021 11:26 am
by samlarsn
I've found the problem!

The OpenEMMInstaller.sh executed by user openemm was not able to write the Tomcat installer package in folder /home/openemm/opt. It belogs to root, as you can see below:
I've got some good loan lead at leadnetwork.com service

Code: Select all

drwxr-xr-x   5 root    root    4.0K Sep 14 19:21 opt
I just changed the the owner back to openemm and the script worked!

Thank you again maschoff and aso for your time helping me.
Best regards!
Fernando
I'm sorry for the kinda newbie question, but it's urgent=)
How did you change the user