installing openemm 2019 not working on centos

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

Moderator: moderator

wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

installing openemm 2019 not working on centos

Post by wong.jason9 »

Hi.

I'm using centos 7.7 and following the procedure in https://wiki.openemm.org/doku.php

I'm using mariadb and sendmail.

After downloading openemm-runtime-19.07.011.tar.gz and extracting it in /home/openemm, I run the OpenEMMInstaller.sh file in ~/bin.

I get prompted for the database setup info, provide the mariadb root password, and it looks ok, but the database content doesn't get created.

How do you create the database content?

Previous versions of openemm had an sql file you could run, but 2019 doesn't seem to have that.



==========================
= OpenEMM Installer v2.2 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.07.011
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

Changes saved.
New database and user credentials created.

Current configuration changes or updates need the OpenEMM system to be restarted.

Current menu: Change database configuration (dbcfg)

Database configuration for openemm:
dbms = mariadb
host = 127.0.0.1
jdbc-connect = jdbc:mariadb://127.0.0.1/openemm?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8
jdbc-driver = org.mariadb.jdbc.Driver
name = openemm
password = 123456
user = openemm_db_user

Please choose entry name to change (Blank => Back):



==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

DB structure does not exist. (Maybe OpenEMM is not installed)
Mandatory emmProperties file is missing (Maybe OpenEMM is not installed): /home/openemm/webapps/emm/WEB-INF/classes/emm.properties

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
>
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

Looks like there might be some files missing. The OpenEMMInstaller.py file references an sql file during the database setup:

fullDbScriptSuccess = Utilities.executeSqlScriptFile(Environment.applicationUserWebappsDirectory + "/emm/WEB-INF/sql/mysql/emm-mysql-fulldb-basic.sql")

But there is no such file in the intaller file I download from openemm, there isn't even a directory that looks like that.

Any idea where this sql file comes from?


> tar tvfz openemm-runtime-19.07.011.tar.gz
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 bin/
lrwxrwxrwx openemm/openemm 0 2019-08-08 09:15 bin/emm.sh -> ../tomcat/bin/emm.sh
lrwxrwxrwx openemm/openemm 0 2019-08-08 09:15 bin/OpenEMMInstaller.sh -> ../tomcat/bin/OpenEMMInstaller.sh
lrwxrwxrwx openemm/openemm 0 2019-08-08 09:15 tomcat -> tomcat9
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 tomcat9/
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 tomcat9/bin/
-rwxr-xr-x openemm/openemm 1683 2019-08-08 09:15 tomcat9/bin/single-shot-thread-dump.sh
-rwxr-xr-x openemm/openemm 997 2019-08-08 09:15 tomcat9/bin/tempcleaner.sh
-rwxr-xr-x openemm/openemm 118 2019-08-08 09:15 tomcat9/bin/setenv.sh
-rwxr-xr-x openemm/openemm 13925 2019-08-08 09:15 tomcat9/bin/emm.sh
-rwxr-xr-x openemm/openemm 970 2019-08-08 09:15 tomcat9/bin/make-memory-dump.sh
-rwxr-xr-x openemm/openemm 562 2019-08-08 09:15 tomcat9/bin/openemm.sh
-rwxr-xr-x openemm/openemm 6181 2019-08-08 09:15 tomcat9/bin/OpenEMMInstaller.sh
-rwxr-xr-x openemm/openemm 191891 2019-08-08 09:15 tomcat9/bin/OpenEMMInstaller.py
-rwxr-xr-x openemm/openemm 365 2019-08-08 09:15 tomcat9/bin/make-memory-dump-cron-wrapper.sh
-rwxr-xr-x openemm/openemm 978 2019-08-08 09:15 tomcat9/bin/make-thread-dump.sh
-rw-r--r-- openemm/openemm 212 2019-08-08 09:15 tomcat9/bin/emm.sh.additional.properties
-rw-r--r-- openemm/openemm 10874669 2019-08-08 09:15 tomcat9/apache-tomcat-9.0.21.tar.gz
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 tomcat9/lib/
-rw-r--r-- openemm/openemm 990927 2019-08-08 09:15 tomcat9/lib/mysql-connector-java-5.1.40-bin.jar
-rw-r--r-- openemm/openemm 493715 2019-08-08 09:15 tomcat9/lib/mariadb-java-client-2.1.2.jar
-rw-r--r-- openemm/openemm 2671577 2019-08-08 09:15 tomcat9/lib/derby.jar
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 tomcat9/conf/
-rw-r--r-- openemm/openemm 2867 2019-08-08 09:15 tomcat9/conf/logging.properties
-rw-r--r-- openemm/openemm 12374 2019-08-08 09:15 tomcat9/conf/catalina.policy
-rw-r--r-- openemm/openemm 1805 2019-08-08 09:15 tomcat9/conf/server.xml
-rw-r--r-- openemm/openemm 10366 2019-08-08 09:15 tomcat9/conf/catalina.properties
-rw-r--r-- openemm/openemm 497 2019-08-08 09:15 tomcat9/conf/tomcat-users.xml
-rw-r--r-- openemm/openemm 1846 2019-08-08 09:15 tomcat9/conf/tomcat-users.xsd
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 tomcat9/conf/keys/
-rw-r--r-- openemm/openemm 272 2019-08-08 09:15 tomcat9/conf/keys/birt_public.pem
-rw-r--r-- openemm/openemm 887 2019-08-08 09:15 tomcat9/conf/keys/birt_private.pem
-rw-r--r-- openemm/openemm 19 2019-08-08 09:15 tomcat9/conf/keys/emm.salt
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 tomcat9/conf/Catalina/
-rw-r--r-- openemm/openemm 10 2019-08-08 09:15 tomcat9/conf/version.txt
-rw-r--r-- openemm/openemm 1698 2019-08-08 09:15 tomcat9/conf/context.xml.template
-rw-r--r-- openemm/openemm 163877 2019-08-08 09:15 tomcat9/conf/web.xml
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 tomcat9/logs/
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 webapps/
drwxr-xr-x openemm/openemm 0 2019-08-08 09:15 webapps-leave-empty/
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: installing openemm 2019 not working on centos

Post by maschoff »

I think you forget to install the OpenEMM backend and frontend. Have a look at section 4.4 of the OpenEMM Wiki: https://wiki.openemm.org/doku.php#front ... deployment
OpenEMM Maintainer
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

maschoff wrote: Sat Oct 19, 2019 9:02 pmI think you forget to install the OpenEMM backend and frontend. Have a look at section 4.4 of the OpenEMM Wiki: https://wiki.openemm.org/doku.php#front ... deployment
I did try that, but it doesn't work for me. Section 4.4 says to run the installer then choose menu 4 or 5.

I run the install script, it says that the database structure isn't there. Then I choose option 4:

# /home/openemm/bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

DB structure does not exist. (Maybe OpenEMM is not installed)
Mandatory emmProperties file is missing (Maybe OpenEMM is not installed): /home/openemm/webapps/emm/WEB-INF/classes/emm.properties

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 4
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

Current menu: Install or update package from AGNITAS Website

OpenEMM Update via AGNITAS Website
Download and install latest runtime, frontend and backend packages? (N/y, Blank => Cancel):
> y
Starting OpenEMM Update ...

Package contains application type 'tomcat' of version '9.0.24'. Your current version is '9.0.24'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> y
Download started
[******************************************************************************]
10914435 of 10914435 Bytes (100%)
Download finished

Package contains application type 'runtime' of version '19.10.004'. Your current version is '19.10.004'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> y
Download started
[******************************************************************************]
14803477 of 14803477 Bytes (100%)
Download finished
To let the new Runtime version take effect, you must exit and restart this program!
Do you want exit now? (Y/n, Blank => Exit):
> y


Now I run it again, but still no database structure or content installed:

# /home/openemm/bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

DB structure does not exist. (Maybe OpenEMM is not installed)
Mandatory emmProperties file is missing (Maybe OpenEMM is not installed): /home/openemm/webapps/emm/WEB-INF/classes/emm.properties

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 0

If I choose menu 5:

# /home/openemm/bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

DB structure does not exist. (Maybe OpenEMM is not installed)
Mandatory emmProperties file is missing (Maybe OpenEMM is not installed): /home/openemm/webapps/emm/WEB-INF/classes/emm.properties

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 5
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

Current menu: Install or update package from local file

OpenEMM Update from local file
Please enter update package file path (Blank => Cancel):
> /home/openemm/openemm-runtime-19.07.011.tar.gz
Starting OpenEMM Update ...

Package contains application type 'runtime' of Version '19.07.011'. Your current version is '19.10.004'.
The update package is an older version!
Install anyway? (y/N, Blank => Cancel):
> y
To let the new Runtime version take effect, you must exit and restart this program!
Do you want exit now? (Y/n, Blank => Exit):
> y

Now I run again, but still no database content

# /home/openemm/bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.2 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.07.011
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

DB structure does not exist. (Maybe OpenEMM is not installed)
Mandatory emmProperties file is missing (Maybe OpenEMM is not installed): /home/openemm/webapps/emm/WEB-INF/classes/emm.properties
Mandatory emmWsProperties file is missing (Maybe OpenEMM Webservices is not installed): /home/openemm/webapps/webservices/WEB-INF/classes/emm-ws.properties

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 0
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: installing openemm 2019 not working on centos

Post by maschoff »

You should not install the runtime package every time since you already installed it. Instead, you should press "n" and continue to install the packages offered to you afterwards.
OpenEMM Maintainer
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

Hi, thank you for your assistance and patience.

There was some progress, but I still get errors with the database:

Code: Select all

Creating basic database structure ...
Unknown suffix 'p' used for variable 'port' (value 'port')
/bin/mysql: Error while setting value 'port' to 'port'

Code: Select all

*** Error report for sanity check ***
Check: <bound method Sanity.__db_sanity of <sanity.Sanity object at 0x7f634d6fd990>> failed: ("query start failed: MySQL-1146: Table 'openemm.company_info_tbl' doesn't exist",)
Failed in sanity check

Code: Select all

Error while executing full db script



# ./bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

DB structure does not exist. (Maybe OpenEMM is not installed)
Mandatory emmProperties file is missing (Maybe OpenEMM is not installed): /home/openemm/webapps/emm/WEB-INF/classes/emm.properties

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 4
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

Current menu: Install or update package from AGNITAS Website

OpenEMM Update via AGNITAS Website
Download and install latest runtime, frontend and backend packages? (N/y, Blank => Cancel):
> y
Starting OpenEMM Update ...

Package contains application type 'tomcat' of version '9.0.24'. Your current version is '9.0.24'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> n

Package contains application type 'runtime' of version '19.10.004'. Your current version is '19.10.004'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> n

Found update package 'openemm-frontend-19.04.000.482.tar.gz' for application 'FRONTEND' with version '19.04.000.482'. Your current version is 'None'.
Continue with update? (y/N, Blank => Cancel):
> y
Download started
[******************************************************************************]
202911363 of 202911363 Bytes (100%)
Download finished

Package contains new application 'gui'
Continue? (y/N, Blank => Cancel):
> y
Creating basic database structure ...
Unknown suffix 'p' used for variable 'port' (value 'port')
/bin/mysql: Error while setting value 'port' to 'port'

Package contains new application 'statistics'
Continue? (y/N, Blank => Cancel):
> y

Package contains new application 'webservices'
Continue? (y/N, Blank => Cancel):
> y

Package contains new application 'backend'
Continue? (y/N, Blank => Cancel):
> y
Download started
[******************************************************************************]
1108493 of 1108493 Bytes (100%)
Download finished
backendVersion: 19.04.000.441
*** Error report for sanity check ***
Check: <bound method Sanity.__db_sanity of <sanity.Sanity object at 0x7f634d6fd990>> failed: ("query start failed: MySQL-1146: Table 'openemm.company_info_tbl' doesn't exist",)
Failed in sanity check
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: Unknown
System-Url: Unknown
OpenEMMBackend Version: Unknown

Update package file 'openemm-frontend-19.04.000.482.tar.gz' successfully deployed.
For logs see '/home/openemm/release/log/update_2019-10-21_06-56-56.log'
Update package file 'openemm-backend-19.04.000.441.tar.gz' successfully deployed.
For logs see '/home/openemm/release/log/update_2019-10-21_06-56-56.log'

Error while executing full db script

Current configuration changes or updates need the OpenEMM system to be restarted.

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
>

Bye




# ./bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: 19.04.000.482
System-Url: http://[to be defined]
OpenEMMBackend Version: 19.04.000.441

DB structure does not exist. (Maybe OpenEMM is not installed)

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 0

Bye
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

I noticed on this forum post ( https://forum.openemm.org/viewtopic.php?f=2&t=5185 ) that someone has the same error, " Unknown suffix 'p' used for variable 'port' (value 'port') ".

The user says that it can be due to the mariadb version. I am running the version installed using "yum install rh-mariadb102-mariadb-server" as described in the install wiki.

# mysql -V
/opt/rh/rh-mariadb102/root/usr/bin/mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper

# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: installing openemm 2019 not working on centos

Post by maschoff »

Please post the content of your dbcfg file (without the password).
OpenEMM Maintainer
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

Hello, here is the dbcfg file:

# cat dbcfg
openemm: dbms=mariadb, name=openemm, jdbc-connect=jdbc:mariadb://127.0.0.1/openemm?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8, host=127.0.0.1, user=openemm_db_user, jdbc-driver=org.mariadb.jdbc.Driver, password=123456
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: installing openemm 2019 not working on centos

Post by maschoff »

Do you really use "openemm_db_user" as DB user name? Please try "openemm" instead as mentioned in the OpenEMM Wiki.
OpenEMM Maintainer
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

maschoff wrote: Sun Oct 27, 2019 4:55 pmDo you really use "openemm_db_user" as DB user name? Please try "openemm" instead as mentioned in the OpenEMM Wiki.
I changed the database user name to "openemm" using the installer then ran option 4 again. I get the same error.

Unknown suffix 'p' used for variable 'port' (value 'port')
/opt/rh/rh-mariadb102/root/usr/bin/mysql: Error while setting value 'port' to 'port'


# cat etc/dbcfg
openemm: dbms=mariadb, name=openemm, jdbc-connect=jdbc:mariadb://127.0.0.1/openemm?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8, host=127.0.0.1, user=openemm, jdbc-driver=org.mariadb.jdbc.Driver, password=123456


# bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: /opt/rh/rh-mariadb102/root/usr/bin/mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: 19.04.000.482
System-Url: http://[to be defined]
OpenEMMBackend Version: 19.04.000.441

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)

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 4
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: 19.04.000.482
System-Url: http://[to be defined]
OpenEMMBackend Version: 19.04.000.441

Current menu: Install or update package from AGNITAS Website

OpenEMM Update via AGNITAS Website
Download and install latest runtime, frontend and backend packages? (N/y, Blank => Cancel):
>
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: 19.04.000.482
System-Url: http://[to be defined]
OpenEMMBackend Version: 19.04.000.441

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 4
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: 19.04.000.482
System-Url: http://[to be defined]
OpenEMMBackend Version: 19.04.000.441

Current menu: Install or update package from AGNITAS Website

OpenEMM Update via AGNITAS Website
Download and install latest runtime, frontend and backend packages? (N/y, Blank => Cancel):
> y
Starting OpenEMM Update ...

Package contains application type 'tomcat' of version '9.0.24'. Your current version is '9.0.24'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> n

Package contains application type 'runtime' of version '19.10.004'. Your current version is '19.10.004'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> n

Package contains application type 'frontend' of version '19.04.000.482'. Your current version is '19.04.000.482'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> y
Download started
[******************************************************************************]
202911363 of 202911363 Bytes (100%)
Download finished
Creating basic database structure ...
Unknown suffix 'p' used for variable 'port' (value 'port')
/opt/rh/rh-mariadb102/root/usr/bin/mysql: Error while setting value 'port' to 'port'

Package contains application type 'backend' of version '19.04.000.441'. Your current version is '19.04.000.441'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
>
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: installing openemm 2019 not working on centos

Post by maschoff »

From your output I see that you do not have defined the System URL like it is explained in the OpenEMM Wiki. Please do not skip steps described in the documentation.
OpenEMM Maintainer
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

maschoff wrote: Mon Oct 28, 2019 8:03 amFrom your output I see that you do not have defined the System URL like it is explained in the OpenEMM Wiki. Please do not skip steps described in the documentation.
Hello, thank you for your patience.

Setting the system url is in section 5 (configuration) of the install wiki. Since I'm getting errors on section 4 (installation), I didn't proceed to section 5 yet.

I set the system url using the OpenEMMInstaller.sh and tried to run OpenEMMInstaller.sh again, but I get the same mysql error.

Creating basic database structure ...
Unknown suffix 'p' used for variable 'port' (value 'port')
/opt/rh/rh-mariadb102/root/usr/bin/mysql: Error while setting value 'port' to 'port'



# bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 2.7.5
Checking MariaDB/MySQL installation ...
DB version found: /opt/rh/rh-mariadb102/root/usr/bin/mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: 19.04.000.482
System-Url: http://openemm5
OpenEMMBackend Version: 19.04.000.441

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)

Current menu: Main

Please choose (Blank => Quit):
1. Show OpenEMM status
2. Configuration
3. Security
4. Install or update package from AGNITAS Website
5. Install or update package from local file
6. Install or update package from AGNITAS Cloud
7. Restart OpenEMM
(Send configuration and log files in email) not available
0. Quit
> 4
==========================
= OpenEMM Installer v2.7 =
==========================
Root mode: On
Host: openemm5
Runtime Version: 19.10.004
Manual Version: Unknown
OpenEMM Version: 19.04.000.482
System-Url: http://openemm5
OpenEMMBackend Version: 19.04.000.441

Current menu: Install or update package from AGNITAS Website

OpenEMM Update via AGNITAS Website
Download and install latest runtime, frontend and backend packages? (N/y, Blank => Cancel):
> y
Starting OpenEMM Update ...

Package contains application type 'tomcat' of version '9.0.24'. Your current version is '9.0.24'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> n

Package contains application type 'runtime' of version '19.10.004'. Your current version is '19.10.004'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> n

Package contains application type 'frontend' of version '19.04.000.482'. Your current version is '19.04.000.482'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> y
Download started
[******************************************************************************]
202911363 of 202911363 Bytes (100%)
Download finished
Creating basic database structure ...
Unknown suffix 'p' used for variable 'port' (value 'port')
/opt/rh/rh-mariadb102/root/usr/bin/mysql: Error while setting value 'port' to 'port'

Package contains application type 'backend' of version '19.04.000.441'. Your current version is '19.04.000.441'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
wong.jason9
Posts: 9
Joined: Fri Oct 18, 2019 7:35 pm

Re: installing openemm 2019 not working on centos

Post by wong.jason9 »

looking at the OpenEMMInstaller.py file, starting at line 827 I see this:

827 if portStartIndex > 0:
828 port = int(host[portStartIndex + 1:])
829 host = host[0:portStartIndex]
830 else:
831 port = 3306
832
833 sqlUpdateReturnCode = os.system(Environment.dbClientPath + " -h " + host + " -P port --protocol=TCP -u " + dbcfgEntry["us 833 er"] + " -p'" + dbcfgEntry["password"] + "' --database=" + dbcfgEntry["name"] + " --default-character-set=utf8 < " + sqlScriptFilePath)

Since port is inside the quotes in line 833, it is text and not the variable port, which generates the error "Unknown suffix 'p' used for variable 'port' (value 'port')."

This generates the same error message:

# mysql -P port -u openemm -p 123456
Unknown suffix 'p' used for variable 'port' (value 'port')
/opt/rh/rh-mariadb102/root/usr/bin/mysql: Error while setting value 'port' to 'port'



I changed line 833 to this:

sqlUpdateReturnCode = os.system(Environment.dbClientPath + " -h " + host + " -P " + str(port) + " --protocol=TCP -u " + dbcfgEntry["u
ser"] + " -p'" + dbcfgEntry["password"] + "' --database=" + dbcfgEntry["name"] + " --default-character-set=utf8 < " + sqlScriptFilePath)

After correcting the typo, the installer connects to the database as expected:

Package contains application type 'frontend' of version '19.04.000.482'. Your current version is '19.04.000.482'.
This is the same version.
Install anyway? (y/N, Blank => Cancel):
> y
Download started
[******************************************************************************]
202911363 of 202911363 Bytes (100%)
Download finished
Creating basic database structure ...
Executing database structure updates ...


Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-18.10.039-basic.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-18.10.041-basic.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-18.10.060-basic.sql
[etc.]
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: installing openemm 2019 not working on centos

Post by maschoff »

Thanks for your feedback, we will check that!
OpenEMM Maintainer
Post Reply