20.04 faulty DB creation script ?!?

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

Moderator: moderator

JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

20.04 faulty DB creation script ?!?

Post by JuergenB »

Hi,

i tried several installations with 20.04 and 19.10

With 20.04 runtime i was never able to create the openemm database, i had a lot of errors.
The runtime wasn´t able to create the initial openemm and emm database at all.

So i had a crashed 20.04 with a faulty database.

I extracted the 19.10 runtime over the faulty 20.04 installation.
I dropped all databases and users in mariadb

Next i started the runtime and deployed the 19.10 openemm / emm database.
The runtime complained a lot about wrong frontend/backend, tomcat, etc...
But the database was fine.

Next i upgraded the runtime and i could update all modules to the latest.
Some restarts and other hickups.

Now OpenEMM 20.04 is running in a basic setup.

Could someone validate the 20.04.000.043 database creation scripts and even the python installer?

Thanks

Jürgen
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: 20.04 faulty DB creation script ?!?

Post by maschoff »

Could you please be a little bit more specific and post examples of the errors you received so that we can try to reproduce?
OpenEMM Maintainer
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: 20.04 faulty DB creation script ?!?

Post by JuergenB »

Hi,

tried again and it fails (on the first try).
I tried to document the error after step 5.1 OpenEMM Download

5.2 Runtime Deployment
# Configure basic environment , install tomcat, exit installer
su - root -c "/home/openemm/bin/OpenEMMInstaller.sh;exit"

# Configure dbms ; restart OpenEMM system as requested
su - openemm -c "/home/openemm/bin/OpenEMMInstaller.sh;exit"

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

Please choose (Blank => Back to Main):
1. Configure basic environment (Java, Tomcat, Tomcat-Native, Wkhtml)
2. Change database configuration (dbcfg)
(Change configuration of installation in DB) not available
(Create new database (drop existing data)) not available

# if i do the Restart , OpenEMM comlains about frontend / backend missing (during restart)

restart messages

Are you sure? (y/N, Blank => Cancel):
> y
Stopping ...
Using /home/openemm/bin/setenv.sh
Using additional properties: /home/openemm/tomcat9/bin/emm.sh.additional.properties
No Tomcat is running....
/home/openemm/bin/openemm.sh: line 12: /home/openemm/bin/backend.sh: No such file or directory Starting ...
/home/openemm/bin/openemm.sh: line 5: /home/openemm/bin/backend.sh: No such file or directory Using /home/openemm/bin/setenv.sh
Using additional properties: /home/openemm/tomcat9/bin/emm.sh.additional.properties
Generated and replaced "/home/openemm/tomcat/conf/context.xml".

5.3 Frontend and Backend Deployment

sudo su -
/home/openemm/bin/OpenEMMInstaller.sh

[root@emm ~]# /home/openemm/bin/OpenEMMInstaller.sh
Checking python installation ...
Python version found: 3.8.3
Checking MariaDB/MySQL installation ...
DB version found: mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
MySQLdb._exceptions.ProgrammingError: (1146, "Table 'openemm.config_tbl' doesn't exist")

If i dont restart OpenEMM and continue with the installation, the database is created (this was the first time today).
But at the end the runtime complains

Cannot stop backend


But after all it 'ok'...

Different Server (CentOS 7 / VPS)

On a different Server i had the problem that the DB Creation script of 20.04 wasn´t able to setup the DB´s
The runtime started with the creation, paused for a few second (did nothing) and next i had an error that the database couldn´t be created.

I don´t have the exact error message.

So i used the old runtime installer 19.10, with this runtime the DB creations was possible.
After the DB was created i could upgrade to 20.04
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: 20.04 faulty DB creation script ?!?

Post by JuergenB »

Additional error in DBMS config

during the configuration of DBMS you are asked to enter the root Password for the db creation.
This Fails.

Do you want to create a new database and database user with this credentials? (y/N, Blank => Cancel)
> y
Please enter database root user password:

This doesn´t work with mariadb 10.3.

This should be the Maria Admin user Password!
Post Reply