Erros while Install/Upgrade to 20.10-beta from 19.04

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

Moderator: moderator

MSelke
Posts: 8
Joined: Thu Feb 25, 2016 11:19 am

Erros while Install/Upgrade to 20.10-beta from 19.04

Post by MSelke » Mon Oct 05, 2020 10:09 am

Hello,
i installed successfully Openemm 19.04 on a CentOS System. Now i'm struggling with the upgrade to the latest version. I'm running the OpenEMMInstaller and now im get the following Output on Startup the script

Code: Select all

================================
= OpenEMM Installer v20.10.018 =
================================
Root mode: On
Host: vm5031206.psmanaged.com
License: OpenEMM (ID: 0)
Runtime Version: 20.10.028
Manual Version: Unknown
OpenEMM Version: 20.10.000.049
System-Url: Unknown
OpenEMMBackend Version: 20.10.000.047
I handle the userrights.sql errors with the helt i read in another forum topic.
But on Startup i get following error:

Code: Select all

Traceback (most recent call last):
  File "/home/openemm/scripts/service3.py", line 23, in <module>
    from	agn3.config import Config
  File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/config.py", line 22, in <module>
    from	.dblite import DBLite
  File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/dblite.py", line 17, in <module>
    from	._db.sqlite import Layout, SQLite3
ImportError: cannot import name 'Layout' from 'agn3._db.sqlite' (/home/openemm/release/backend/V20.10.000.047/scripts/agn3/_db/sqlite.py)
Starting ...
Traceback (most recent call last):
  File "/home/openemm/scripts/service3.py", line 23, in <module>
    from	agn3.config import Config
  File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/config.py", line 22, in <module>
    from	.dblite import DBLite
  File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/dblite.py", line 17, in <module>
    from	._db.sqlite import Layout, SQLite3
ImportError: cannot import name 'Layout' from 'agn3._db.sqlite' (/home/openemm/release/backend/V20.10.000.047/scripts/agn3/_db/sqlite.py)
Using /home/openemm/bin/setenv.sh
Using additional properties: /home/openemm/tomcat9/bin/emm.sh.additional.properties

Checking backend directories
Traceback (most recent call last):
  File "/home/openemm/scripts/activator3.py", line 19, in <module>
    from	agn3.dblite import DBLite, Layout
  File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/dblite.py", line 17, in <module>
    from	._db.sqlite import Layout, SQLite3
ImportError: cannot import name 'Layout' from 'agn3._db.sqlite' (/home/openemm/release/backend/V20.10.000.047/scripts/agn3/_db/sqlite.py)
Service sanity is marked as inactive.
And the catalina.log gives me the following message all over again.

Code: Select all

2020-10-05 11:06:30,606: ERROR [main] org.agnitas.emm.core.commons.util.ConfigService - Cannot refresh config data from database
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [DELETE FROM license_tbl WHERE change_date < ? OR change_date IS NULL]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'change_date' in 'where clause'
I checked the DB and found the license.tbl completely empty.

I reinstalled the forntend/backend and get no errors from the update.log

Code: Select all

Sql db update scripts successfully executed
DB update executed
Installing "/tmp/Emm_2020-10-05_10-24-35/openemm-statistics-20.10.000.049.tar.gz"
Removed already existing directory '/home/openemm/release/statistics/openemm-statistics-20.10.000.049'
Removed already existing file '/home/openemm/release/statistics/openemm-statistics-20.10.000.049.tar.gz'
Extracted file '/home/openemm/release/statistics/openemm-statistics-20.10.000.049.tar.gz' in path '/home/openemm/release/statistics/openemm-statistics-20.10.000.049'
Created new application link 'statistics'
Installing "/tmp/Emm_2020-10-05_10-24-35/openemm-webservices-20.10.000.049.tar.gz"
Removed already existing directory '/home/openemm/release/webservices/openemm-webservices-20.10.000.049'
Removed already existing file '/home/openemm/release/webservices/openemm-webservices-20.10.000.049.tar.gz'
Extracted file '/home/openemm/release/webservices/openemm-webservices-20.10.000.049.tar.gz' in path '/home/openemm/release/webservices/openemm-webservices-20.10.000.049'
Created new application link 'webservices'
Installing "/tmp/Emm_2020-10-05_10-24-35/openemm-backend-20.10.000.047.tar.gz"
Extracted file '/home/openemm/release/backend/openemm-backend-20.10.000.047.tar.gz' in path '/home/openemm/release/backend/V20.10.000.047'
Created new backend symlinks
Update ended at: 2020-10-05_10:24:54
What can I do?

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

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by maschoff » Mon Oct 05, 2020 3:41 pm

Please read chapter 7.1 ("Do not Skip Major Versions when Upgrading") of the OpenEMM 20.10 Install & Admin Guide.
OpenEMM Maintainer

MSelke
Posts: 8
Joined: Thu Feb 25, 2016 11:19 am

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by MSelke » Tue Oct 06, 2020 8:12 am

I don't wanted to update to Version 20.XX, but when i open the update menu in the Installer script, i cant see how i can not update to the latest version. There are only option to download the latest y/n. How can i do update to v 19.10 first?

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

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by maschoff » Tue Oct 06, 2020 10:42 am

Could it be, that you did not update the runtime once (to 19.10 level), but you updated several times right to 20.10 level and only then you started the update of the openemm packages?
OpenEMM Maintainer

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

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by maschoff » Wed Oct 07, 2020 9:47 am

Note: If you need to switch back the runtime and you are not offered 20.04.050 or later, please make a copy of your individual server.xml in /home/openemm/tomcat/conf because runtimes before 20.04.050 used to overwrite the existing server.xml when switching back.
OpenEMM Maintainer

MSelke
Posts: 8
Joined: Thu Feb 25, 2016 11:19 am

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by MSelke » Wed Oct 07, 2020 10:05 am

I thought the right way to upgrade was to download the latest runtime from the website and then to unpack and run it on the server. But now i image the right way where to run the old runtime and update form there. Can i return to the old one. I still have the tar. And in the install script i can switch back to older versions. Is that an Option?

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

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by maschoff » Wed Oct 07, 2020 4:44 pm

If you skipped 19.10 as intermediate version, you have to switch back to a 19.10 runtime. But make a backup of the tomcat directory first because you may need to restore at least your server.xml file.
OpenEMM Maintainer

MSelke
Posts: 8
Joined: Thu Feb 25, 2016 11:19 am

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by MSelke » Thu Oct 15, 2020 3:58 pm

I did work so far as i run the upgrade in a few steps from 19.10.

Now i got the Problem that my mails are not send with the following error in the mail log.

Oct 15 16:34:13 vm5031206 postfix/postfix-script[23388]: starting the Postfix mail system
Oct 15 16:34:13 vm5031206 postfix/master[23390]: daemon started -- version 2.10.1, configuration /etc/postfix
Oct 15 16:38:00 vm5031206 postfix/smtpd[23453]: connect from localhost[127.0.0.1]
Oct 15 16:38:00 vm5031206 postfix/smtpd[23453]: warning: connect to Milter service unix:/home/openemm/var/run/bav.sock: No such file or directory
Oct 15 16:38:00 vm5031206 postfix/smtpd[23453]: NOQUEUE: milter-reject: CONNECT from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; proto=SMTP
Oct 15 16:38:00 vm5031206 postfix/smtpd[23453]: NOQUEUE: milter-reject: EHLO from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; proto=SMTP helo=<vm5031206.psmanaged.com>
Oct 15 16:38:00 vm5031206 postfix/smtpd[23453]: NOQUEUE: milter-reject: MAIL from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; from=<news@<company.url>.com> proto=ESMTP helo=<vm5031206.psmanaged.com>
Oct 15 16:38:00 vm5031206 postfix/smtpd[23453]: disconnect from localhost[127.0.0.1]

There is no bav.sock but i got an old OpenEMM 2015 up and running in prod and there is also no bav.sock. I followed the install guide to this point and i testet it with the password reset function.

What am i doing wring?

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

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by maschoff » Thu Oct 15, 2020 4:15 pm

Milter plugin bav creates Linux socket bav.sock automatically during startup of the backend. Looks to me like the backend was not started properly.
OpenEMM Maintainer

MSelke
Posts: 8
Joined: Thu Feb 25, 2016 11:19 am

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by MSelke » Fri Oct 16, 2020 10:05 am

Yes, the backend did not start.

I got some error messages while installing the openemm package from the userrrights.sql in Line 109 and after i insert a new column with a hint from an other post i get another error in line 110, and then i fix this too but the backend didnt start.
Then i make a backup of the DB and create a new one out of the installer script. But there i got the following error. From a new and clean DB.

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/emm-mysql-update-18.10.490.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-19.10.000.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-19.10.404.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.07.016-basic.sql
Executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.07.020-basic.sql
ERROR 1452 (23000) at line 18: Cannot add or update a child row: a foreign key constraint fails (`openemm`.`admin_to_group_tbl`, CONSTRAINT `admintogrp$admingrpid$fk` FOREIGN KEY (`admin_group_id`) REFERENCES `admin_group_tbl` (`admin_group_id`) ON DELETE CASCADE)
Error while executing /home/openemm/webapps/emm/WEB-INF/sql/mysql/emm-mysql-update-20.07.020-basic.sql
SQL DB updates caused an error. Press any key to continue.

What can i do about this.

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

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by maschoff » Fri Oct 16, 2020 10:37 am

Which frontend version caused this error?
OpenEMM Maintainer

MSelke
Posts: 8
Joined: Thu Feb 25, 2016 11:19 am

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by MSelke » Fri Oct 16, 2020 10:44 am

This is the start page.

================================
= OpenEMM Installer v20.10.018 =
================================
Root mode: On
Host: vm5031206.psmanaged.com
License: OpenEMM (ID: 0)
Runtime Version: 20.10.031
Manual Version: Unknown
OpenEMM Version: 20.10.000.049
System-Url: Unknown
OpenEMMBackend Version: 20.10.000.047

aso
Posts: 17
Joined: Fri Jun 19, 2015 12:43 pm

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by aso » Fri Oct 16, 2020 1:31 pm

This bug was already fixed.
To repair your DB and prevent this from happening again, please execute this SQL on your DB:

INSERT INTO agn_dbversioninfo_tbl (version_number, updating_user, update_timestamp)
VALUES ('20.07.020', CURRENT_USER, CURRENT_TIMESTAMP);

MSelke
Posts: 8
Joined: Thu Feb 25, 2016 11:19 am

Re: Erros while Install/Upgrade to 20.10-beta from 19.04

Post by MSelke » Fri Oct 16, 2020 2:17 pm

Ok, but how can i fix this when this occours when i recreate the database?

But i did the DB request and run the update part. When i get to the backend part there is, i suppose an error message but i cant see this in the logs but when i do a restart i get the following error message.

Traceback (most recent call last):
File "/home/openemm/scripts/service3.py", line 23, in <module>
from agn3.config import Config
File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/config.py", line 22, in <module>
from .dblite import DBLite
File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/dblite.py", line 17, in <module>
from ._db.sqlite import Layout, SQLite3
ImportError: cannot import name 'Layout' from 'agn3._db.sqlite' (/home/openemm/release/backend/V20.10.000.047/scripts/agn3/_db/sqlite.py)
Starting ...
Traceback (most recent call last):
File "/home/openemm/scripts/service3.py", line 23, in <module>
from agn3.config import Config
File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/config.py", line 22, in <module>
from .dblite import DBLite
File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/dblite.py", line 17, in <module>
from ._db.sqlite import Layout, SQLite3
ImportError: cannot import name 'Layout' from 'agn3._db.sqlite' (/home/openemm/release/backend/V20.10.000.047/scripts/agn3/_db/sqlite.py)
Using /home/openemm/bin/setenv.sh
Using additional properties: /home/openemm/tomcat9/bin/emm.sh.additional.properties

Checking backend directories
Traceback (most recent call last):
File "/home/openemm/scripts/activator3.py", line 19, in <module>
from agn3.dblite import DBLite, Layout
File "/home/openemm/release/backend/V20.10.000.047/scripts/agn3/dblite.py", line 17, in <module>
from ._db.sqlite import Layout, SQLite3
ImportError: cannot import name 'Layout' from 'agn3._db.sqlite' (/home/openemm/release/backend/V20.10.000.047/scripts/agn3/_db/sqlite.py)
Service sanity is marked as inactive.

Where is this comming from when i created a new DB?

Post Reply