Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

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

Moderator: moderator

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

Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by JuergenB » Wed Dec 02, 2020 4:47 pm

Hello,

i would like to upgrade a running 20.04 system to the new release 20.10.000.097 / 20.10.000.092

During Upgrading i get this error during the upgrade phase

..
Your current version is '20.04.000.200'.
..
DB already contains version 20.07.383
DB already contains version 20.07.492
...
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.10.027-basic.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.10.036-basic.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/../userrights.sql
ERROR 1146 (42S02) at line 2: Table 'openemm.admin_to_group_tbl' doesn't exist
Error while executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/../userrights.sql
DB update finished
...

backendVersion: 20.10.000.092

Is there anything i can do about this problem?

This is the current version ...
================================
= OpenEMM Installer v20.04.064 =
================================
Root mode: On
Host: openemm
License: OpenEMM (ID: 0)
Runtime Version: 20.04.065
Manual Version: 20.04.011
OpenEMM Version: 20.04.000.200
System-Url: https://aa.bbb.com
OpenEMMBackend Version: 20.04.000.190


Thanks

Jürgen

maschoff
Site Admin
Posts: 2511
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by maschoff » Wed Dec 02, 2020 8:39 pm

At first, update to the latest runtime, then use the new OMT to update to OpenEMM 20.10.
OpenEMM Maintainer

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

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by JuergenB » Thu Dec 03, 2020 2:06 pm

Hi,

thanks i upgraded to OMT and this is the new error i get now...

these are the modules that are updates/installed

Runtime 20.10.070
Code 20.10.000.097

and the error message

Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages-deleted.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages-openemm.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/../userrights.sql
ERROR 1452 (23000) at line 107: Cannot add or update a child row: a foreign key constraint fails (`openemm`.`admin_group_permission_tbl`, CONSTRAINT `admgrp$perm$fk` FOREIGN KEY (`security_token`) REFERENCES `permission_tbl` (`permission_name`))
Error while executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/../userrights.sql
DB update finished
backendVersion: 20.10.000.092

And the log

Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages-deleted.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-messages-openemm.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/../userrights.sql
ERROR 1452 (23000) at line 107: Cannot add or update a child row: a foreign key constraint fails (`openemm`.`admin_group_permission_tbl`, CONSTRAINT `admgrp$perm$$
Error while executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/../userrights.sql

Sql db update scripts successfully executed
DB update executed
Installing "/tmp/Emm_2020-12-03_14-04-18/openemm-statistics-20.10.000.097.tar.gz"
Extracted file '/home/openemm/release/statistics/openemm-statistics-20.10.000.097.tar.gz' in path '/home/openemm/release/statistics/openemm-statistics-20.10.000.0$
Created new application link 'statistics'
Installing "/tmp/Emm_2020-12-03_14-04-18/openemm-webservices-20.10.000.097.tar.gz"
Extracted file '/home/openemm/release/webservices/openemm-webservices-20.10.000.097.tar.gz' in path '/home/openemm/release/webservices/openemm-webservices-20.10.0$
Created new application link 'webservices'
Installing "/tmp/Emm_2020-12-03_14-04-18/openemm-backend-20.10.000.092.tar.gz"
Extracted file '/home/openemm/release/backend/openemm-backend-20.10.000.092.tar.gz' in path '/home/openemm/release/backend/V20.10.000.092'
Created new backend symlinks
Update ended at: 2020-12-03_14:06:22

any idea?

maschoff
Site Admin
Posts: 2511
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by maschoff » Thu Dec 03, 2020 2:34 pm

Yes. Since our testing environments accepted the updates: Which database type and version do you use?
OpenEMM Maintainer

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

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by JuergenB » Thu Dec 03, 2020 4:22 pm

Hi,

Currently i have a 98% Script that installs OpenEMM 20.04 or 20.10 from Scratch in a CentOS 8 OS including SSL.
The system i want to upgrade is a OpenEMM 20.04 OVA that i converted to Hyper-V.

OpenEMM status:

Operating System (OS): CentOS 7
Python version: 3.8.3 (default, Jul 2 2020, 21:47:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Postfix Version: 2.10.1
DB client version: /opt/rh/rh-mariadb102/root/bin/mysql Ver 15.1 Distrib 10.2.22-MariaDB, for Linux (x86_64) using EditLine wrapper
Database Connection: OK
System-Time: 2020-12-03 16:21:03
System-Time-DB: 2020-12-03 16:21:03
Database version: MariaDB 10.2.22-MariaDB
OpenEMM database structure exists (Version 20.07.492)
Currently running database threads ratio (Current: 1, Maximum: 4): 0.25
Database table emm_db_errorlog_tbl: OK
Jobqueue status: OK
No DKIM keys
Java version: 1.8.0_252 (Oracle)
Tomcat version: 9.0.33.0
Tomcat-Native version: 1.2.23
Wkhtml version: wkhtmltopdf 0.12.5 (with patched qt)
OpenEMMApplication is running (Tomcat ProcessID: 4845, started at: Dec02 6:14)
OpenEMMBackend ok: once
OpenEMMBackend running: mailout, update, trigger, generate, mta, pickdist, slrtscn, direct-path, bav-update, bavd, bav, mlcontrol

maschoff
Site Admin
Posts: 2511
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by maschoff » Thu Dec 03, 2020 4:33 pm

OK, MariaDB 10.2 should be fine, actually. Please try the latest version 20.10.000.103. Does this work for you?
OpenEMM Maintainer

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

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by JuergenB » Thu Dec 03, 2020 6:16 pm

Thanks,

20.10.000.103 is some way better, db udpate if fine.

But it breaks tomcat and some ACL´s during installation.

I get this errors during upgrade

*** Error report for sanity check ***
File: /home/openemm/bin/smctrl expected to have user id 0 (0) but has 1000
File: /home/openemm/bin/smctrl issuid results to False, but expected True (True)
File: /home/openemm/bin/qctrl expected to have user id 0 (0) but has 1000
File: /home/openemm/bin/qctrl issuid results to False, but expected True (True)
Failed in sanity check
touch: cannot touch '/home/openemm/tomcat/logs/catalina.out': Permission denied
/home/openemm/opt/tomcat/bin/catalina.sh: line 471: /home/openemm/tomcat/logs/catalina.out: Permission denied

I need to sort this out.
I will install a clean OpenEMM on CentOS 8 with the same 20.04 release and export/import a db dump to the new machine.

maschoff
Site Admin
Posts: 2511
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by maschoff » Thu Dec 03, 2020 8:47 pm

smctrl and actrl both need root permissions but this check failed. Could it be that SELinux is active on your server?
OpenEMM Maintainer

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

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by JuergenB » Thu Dec 03, 2020 9:16 pm

Hi,
SELinux is not active, the installation of 20.04 works fine.
Only the upgrade fails.

I recreated a new CentOS 8 OpenEMM 20.04 installation, migrated the database from the "bad" system.
I did some tests and a 20.10 upgrade, this worked fine, and no errors during the upgrade.

Only the system status shows some errors now, need to verify this.
But i think it will be better to start with a clean CentOS 8 and restore mariadb dump openemm.sql

Thanks

Jürgen

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

Re: Upgrade from 20.04 to 20.10.070 ('openemm.admin_to_group_tbl' doesn't exist)

Post by JuergenB » Fri Dec 04, 2020 8:35 pm

Update,

i installed a new OpenEMM 20.04 from scratch on a clean CentOs 8.
Here i restored the mariadb Dump from my production CentOS 7 VM.

After all was checked, i restartet the services.

Only the Overall Status and Jobqueue Status had errors.

So reinstalled the 20.04 modules and addons.
Finally the System Status is all green now!

So a Migration to a new System was fine!

And these Module / Version Numbers are fine for me

================================
= OpenEMM Installer v20.04.064 =
================================
Root mode: On
Host: localhost.localdomain
License: OpenEMM (ID: 0)
Runtime Version: 20.04.065
Manual Version: Unknown
OpenEMM Version: 20.04.000.200
System-Url: https://mailing.company.com
OpenEMMBackend Version: 20.04.000.190

Post Reply