Invalid path

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

FrankCTS
Posts: 7
Joined: Wed Mar 27, 2024 8:18 pm

Invalid path

Post by FrankCTS »

Hello all,

I have been having zero luck trying to set up OpenEMM on a AlmaLinux server.

I have gotten to the point where I can run the OMT.sh script, and I am taken to the Configure Basic Enviornment menu:

Code: Select all

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

Current webapp basic configuration:
 JAVA_HOME:     /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.el9.x86_64
 CATALINA_HOME: /opt/tomcat/
 Tomcat-Native: None
 WKHTMLTOPDF:   None
 WKHTMLTOIMAGE: None
 PROXY:         None
However, I am met with the following error when I try to enter a path for Tomcat

Code: Select all

Please choose entry to change (Blank => Back):
 > Tomcat-Native
Please enter path for optional Tomcat-Native (Blank => Skip configuration of Tomcat-Native, 'Install' for installation):
 > /opt/tomcat
Invalid path for Tomcat-Native
I have also tried putting a trailing '/' character after tomcat.

I have checked the folder and the openemm user has access privileges for it.

Code: Select all

[openemm@vps-b74dbee8 opt]$ ls -lah tomcat/
total 13M
drwx------. 9 openemm openemm 4.0K Mar 18 18:35 .
drwxr-xr-x. 3 root    root      20 Mar 11 17:35 ..
-rw-r--r--. 1 openemm openemm   18 Jan 23  2023 .bash_logout
-rw-r--r--. 1 openemm openemm  141 Jan 23  2023 .bash_profile
-rw-r--r--. 1 openemm openemm  492 Jan 23  2023 .bashrc
-rw-r-----. 1 openemm openemm  21K Feb 14 19:36 BUILDING.txt
-rw-r-----. 1 openemm openemm 6.1K Feb 14 19:36 CONTRIBUTING.md
-rw-r-----. 1 openemm openemm  59K Feb 14 19:36 LICENSE
-rw-r-----. 1 openemm openemm 2.3K Feb 14 19:36 NOTICE
-rw-r-----. 1 openemm openemm 3.4K Feb 14 19:36 README.md
-rw-r-----. 1 openemm openemm 6.7K Feb 14 19:36 RELEASE-NOTES
-rw-r-----. 1 openemm openemm  16K Feb 14 19:36 RUNNING.txt
-rw-r--r--. 1 openemm openemm  13M Feb 14 20:27 apache-tomcat-10.1.19.tar.gz
drwxr-x---. 2 openemm openemm 4.0K Mar 11 17:39 bin
drwx------. 3 openemm openemm 4.0K Mar 18 18:30 conf
drwxr-x---. 2 openemm openemm 4.0K Mar 11 17:39 lib
drwxr-x---. 2 openemm openemm 4.0K Mar 18 18:04 logs
drwxr-x---. 2 openemm openemm   48 Mar 12 16:28 temp
drwxr-x---. 7 openemm openemm   81 Feb 14 19:36 webapps
drwxr-x---. 3 openemm openemm   22 Mar 11 17:40 work
Is there something I am missing?
I should also note that many guides I have found make mention of a "OpenEMMInstaller.sh" script file, but this script is completely absent from my downloaded OpenEMM package.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Invalid path

Post by maschoff »

Tomcat-Native is legacy (see Install & Admin Guide), you do not need it. The official guides are here: https://wiki.openemm.org/
OpenEMM Maintainer
FrankCTS
Posts: 7
Joined: Wed Mar 27, 2024 8:18 pm

Re: Invalid path

Post by FrankCTS »

Hello Maschoff,

Checking the installation and administration Guides from the link you sent, (OpenEMM 24.04: OpenEMM 24.04 Installation & Administration Guide 1.0.1),
I am seeing nothing indicating that Tomcat-Native is legacy. It's actually listed as a dependency in the guide.
Have the guides not been updated?

How do I proceed with the installation?
Again, I do not have this "OpenEMMInstaller.sh" script file that many guides mention. It did not come with my download.
Is this script file necessary to proceed? How do I obtain it?
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Invalid path

Post by maschoff »

I could not find the location where the Install&Admin guide lists Tomcat Native as required, please advice.

And where did you find references mentioning "OpenEMMInstaller.sh"? This has been replaced by OMT.sh a long time ago.
OpenEMM Maintainer
FrankCTS
Posts: 7
Joined: Wed Mar 27, 2024 8:18 pm

Re: Invalid path

Post by FrankCTS »

maschoff wrote: Fri Apr 12, 2024 3:56 pm I could not find the location where the Install&Admin guide lists Tomcat Native as required, please advice.
I found it on pg 25, section 6.3, Tomcat Deployment.
This section says "OpenEMM needs web application engine Tomcat for the frontend services".

It is also found on pg 13, section 3.1.1, Software Stack Roadmap / End of Life.
Some parts, such as the section for Postfix, or Linux, clearly state some technologies/OS are discontinued or have dropped support.
The Tomcat section does not say anything about it being legacy or discontinued.


And where did you find references mentioning "OpenEMMInstaller.sh"? This has been replaced by OMT.sh a long time ago.
This was thru trying to troubleshoot online.
Almost every single resource online on how to install this software made mention of using the OpenEMMInstaller.sh script.
I thought after reading the OMT.sh script that this may have replaced it, but made mention of this to help any potential replies in the thread.

Thank you for your help.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Invalid path

Post by maschoff »

Tomcat and Tomcat Native are two different things. Of course, you need Tomcat to run the OpenEMM frontend.

I recommend to not rely on dubious "online resources" but to use https://wiki.openemm.org as the source of truth regarding OpenEMM.
OpenEMM Maintainer
FrankCTS
Posts: 7
Joined: Wed Mar 27, 2024 8:18 pm

Re: Invalid path

Post by FrankCTS »

The general wiki so far has been zero help, considering all the videos for tutorials are in German.

The installation manual has been a waste of time, but going back to the wiki, I am seeing that we can build OpenEMM from Github.

Following its instructions, I have cloned the Github repository to the "/tmp/openemm/" directory.

I then followed the following commands,

Code: Select all

$ sudo su -
# cd backend
# ./build-backend.py
Only to be met with the following error messages:

Code: Select all

Build binaries
make: *** src/c/lib: No such file or directory.  Stop.
failure: call to make -C src/c/lib all results in 2
the root user is the owner of all the backend files:

Code: Select all

[root@vps-b74dbee8 openemm]# ls -lah
total 48K
drwxr-xr-x.  	5 root root   	81 Apr 15 18:34 	.
drwxrwxrwt.	8 root root 	4.0K Apr 15 18:34 	..
drwxr-xr-x.  	8 root root  	163 Apr 15 18:34 	.git
-rw-r--r--.  	1 root root  	34K Apr 15 18:34 	LICENSE
-rw-r--r--.  	1 root root  	586 Apr 15 18:34 	README.md
drwxr-xr-x.  	4 root root   	52 Apr 15 18:34 	backend
drwxr-xr-x. 	13 root root 	4.0K Apr 15 18:34 	frontend
What could the issue be here?
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Invalid path

Post by maschoff »

Which operating system do you use to build the executable code of OpenEMM?
OpenEMM Maintainer
Wkn
Posts: 5
Joined: Fri Jan 27, 2023 3:30 pm

Re: Invalid path

Post by Wkn »

Missing libraries have been added.
Please try again
FrankCTS
Posts: 7
Joined: Wed Mar 27, 2024 8:18 pm

Re: Invalid path

Post by FrankCTS »

maschoff wrote: Tue Apr 16, 2024 5:45 am Which operating system do you use to build the executable code of OpenEMM?
This is running on AlmaLinux.
Wkn wrote: Tue Apr 16, 2024 2:18 pm Missing libraries have been added.
Please try again
Still getting the same error codes.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Invalid path

Post by maschoff »

We just tried with
$ git clone https://github.com/agnitas-org/openemm
$ cd openemm/backend
$ chmod 755 build-backend.py
$ ./build-backend.py
and it worked.
OpenEMM Maintainer
FrankCTS
Posts: 7
Joined: Wed Mar 27, 2024 8:18 pm

Re: Invalid path

Post by FrankCTS »

maschoff wrote: Wed Apr 17, 2024 9:07 am We just tried with
$ git clone https://github.com/agnitas-org/openemm
$ cd openemm/backend
$ chmod 755 build-backend.py
$ ./build-backend.py
and it worked.
Looking at this, I missed the chmod. Didn't see anything on there about chmod 775 the other day when I was going thru the guide.
This part is working, however I am met with the following errors when I try to built frontend:

Code: Select all

[almalinux@vps-b74dbee8 openemm]$ cd frontend/
[almalinux@vps-b74dbee8 frontend]$ ant -f build.xml
Buildfile: /tmp/openemm/frontend/build.xml

checkForPropertiesFile:
     [echo] basedir: /tmp/openemm/frontend
     [echo] Using Java version 11

parseApplicationVersion:
     [echo] Building version: 19.10.000.000
     [echo] ApplicationMajorVersion: 19
     [echo] ApplicationMinorVersion: 10
     [echo] ApplicationMicroVersion: 000
     [echo] ApplicationHotfixVersion: 000

checkDeployTargetRunstage:

setDeploytarget:

createPropertiesFiles:
   [delete] Deleting directory /home/almalinux/webapps/openemm-19.10.000.000
    [mkdir] Created dir: /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF/classes
     [copy] Copying 1 file to /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF/classes
     [echo] Properties deleted
     [copy] Copying 1 file to /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF/classes
     [copy] Copying 1 file to /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF/classes
     [echo] emm build with data from 'build/properties/openemm.asp.xml'
     [copy] Copying 1 file to /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF

replaceEmmPropertiesPlaceholders:
     [echo] Replaced placeholders in emm.properties

copyDbChanges_Oracle:

createMandatoryDbChanges_Oracle:

copyDbChanges_MariaDB:
     [copy] Copying 51 files to /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF/sql
     [copy] Copying 5 files to /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF/sql

createMandatoryDbChanges_MariaDB:
     [echo] Created mandatoryDbChanges_mariadb.csv

setupBuildPaths:

compile:
     [echo] Java Home: /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.el9.x86_64
     [echo] JAVA_HOME: /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.e19.x86_64
     [echo] CATALINA_HOME: /opt/tomcat
    [javac] Compiling 3145 source files to /home/almalinux/webapps/openemm-19.10.000.000/WEB-INF/classes

BUILD FAILED
/tmp/openemm/frontend/build.xml:325: Error running /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.e19.x86_64/bin/javac compiler

Total time: 2 seconds
I can also confirm the javac is there.

Code: Select all

[almalinux@vps-b74dbee8 bin]$ pwd
/usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.el9.x86_64/bin
[almalinux@vps-b74dbee8 bin]$ ls
alt-java   java     jcmd       jdeps   jinfo  jmod        jstack   pack200      serialver
jaotc      javac    jconsole   jfr     jjs    jps         jstat    rmic         unpack200
jar        javadoc  jdb        jhsdb   jlink  jrunscript  jstatd   rmid
jarsigner  javap    jdeprscan  jimage  jmap   jshell      keytool  rmiregistry
[almalinux@vps-b74dbee8 bin]$
Not sure what the issue could be.
Running as root returns the same error.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Invalid path

Post by maschoff »

OpenEMM 19.10 does not work with Java 11. You should use a later version of OpenEMM.
OpenEMM Maintainer
FrankCTS
Posts: 7
Joined: Wed Mar 27, 2024 8:18 pm

Re: Invalid path

Post by FrankCTS »

I literally just pulled OpenEmm from Github this morning.
I have no idea why it is on ver19.
How do I upgrade this to the newest version?

EDIT:
I downloaded the source files for ver 23.10 from the Github repo.
I went thru the same process I had done previously.
Ran into the same exact error.

Results for reference:

Code: Select all

[almalinux@vps-b74dbee8 frontend]$ pwd
/tmp/openemm/openemm-23.10.000.159/frontend

[almalinux@vps-b74dbee8 frontend]$ sudo ant -f build.xml
Buildfile: /tmp/openemm/openemm-23.10.000.159/frontend/build.xml

checkForPropertiesFile:
     [echo] basedir: /tmp/openemm/openemm-23.10.000.159/frontend
     [echo] Using Java version 11

parseApplicationVersion:
     [echo] Building version: 19.10.000.000
     [echo] ApplicationMajorVersion: 19
     [echo] ApplicationMinorVersion: 10
     [echo] ApplicationMicroVersion: 000
     [echo] ApplicationHotfixVersion: 000

checkDeployTargetRunstage:

setDeploytarget:

createPropertiesFiles:
   [delete] Deleting directory /root/webapps/openemm-19.10.000.000
    [mkdir] Created dir: /root/webapps/openemm-19.10.000.000/WEB-INF/classes
     [copy] Copying 1 file to /root/webapps/openemm-19.10.000.000/WEB-INF/classes
     [echo] Properties deleted
     [copy] Copying 1 file to /root/webapps/openemm-19.10.000.000/WEB-INF/classes
     [copy] Copying 1 file to /root/webapps/openemm-19.10.000.000/WEB-INF/classes
     [echo] emm build with data from 'build/properties/openemm.asp.xml'
     [copy] Copying 1 file to /root/webapps/openemm-19.10.000.000/WEB-INF

replaceEmmPropertiesPlaceholders:
     [echo] Replaced placeholders in emm.properties

copyDbChanges_Oracle:

createMandatoryDbChanges_Oracle:

copyDbChanges_MariaDB:
     [copy] Copying 51 files to /root/webapps/openemm-19.10.000.000/WEB-INF/sql
     [copy] Copying 5 files to /root/webapps/openemm-19.10.000.000/WEB-INF/sql

createMandatoryDbChanges_MariaDB:
     [echo] Created mandatoryDbChanges_mariadb.csv

setupBuildPaths:

compile:
     [echo] Java Home: /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.el9.x86_64
     [echo] JAVA_HOME: /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.e19.x86_64
     [echo] CATALINA_HOME: /opt/tomcat
    [javac] Compiling 3145 source files to /root/webapps/openemm-19.10.000.000/WEB-INF/classes

BUILD FAILED
/tmp/openemm/openemm-23.10.000.159/frontend/build.xml:325: Error running /usr/lib/jvm/java-11-openjdk-11.0.22.0.7-2.e19.x86_64/bin/javac compiler

Total time: 2 seconds
Post Reply