Runtime 22.10.014 gives KeyError: 'openemm'

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

Runtime 22.10.014 gives KeyError: 'openemm'

Post by JuergenB »

Hi,

i tried a clean installation with Runtime Release 22.10.014

I still get this error after starting OMT at AlmaLinux 9.1

Code: Select all

[root@localhost bin]# pwd
/home/openemm/bin
[root@localhost bin]# ./OMT.sh
Checking python installation ...
Python version found: 3.9.14 (/usr/bin/python3)
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
KeyError: 'openemm'
I use a snapshot of the VM.
The next step (after the snapshot) in the installation is to unpack the runtime and start the OMT.sh script.

21.10.044 does not cause any problems.
Only the 22.10.*** does not work.
Last edited by JuergenB on Sat Feb 04, 2023 6:57 pm, edited 2 times in total.
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by maschoff »

OpenEMM does not support AlmaLinux 9 yet.
OpenEMM Maintainer
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm' @ AlmaLinux 8.*

Post by JuergenB »

Hi,
i just checked with AlmaLinux 8.7 and CentOS 8.0 and i get the same error.

I use with AlmaLinux

Code: Select all

Python 3.8.13
pip 23.0 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
mysql  Ver 15.1 Distrib 10.3.35-MariaDB
openemm-runtime-22.10.014.tar.gz
openemm-runtime-22.04.008.tar.gz works fine with 8.7 and CentOs
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by JuergenB »

Success ...

I started with openemm-runtime-22.04.008.tar.gz
After a complete setup with AlmaLinux 9.1 most of the update with 22.10.014 was ok.
Some Errors in OMT.sh during exiting of OMT, but finally it works with AlmaLinux 9.1
aso
Posts: 33
Joined: Fri Jun 19, 2015 12:43 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by aso »

Could you please start OMT in debug modus and tell me what is the response?
Use command:
OMT.sh -debug
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by JuergenB »

New installation from scratch with AlmaLinux 9.1
I used openemm-runtime-22.10.014.tar.gz

[root@localhost bin]# ./OMT.sh -debug
Checking python installation ...
Python version found: 3.9.14 (/usr/bin/python3)
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
Traceback (most recent call last):
File "/home/openemm/tomcat10/bin/OMT.py", line 158, in <module>
main()
File "/home/openemm/tomcat10/bin/OMT.py", line 81, in main
Environment.init()
File "/home/openemm/tomcat10/bin/EMT_lib/Environment.py", line 154, in init
Environment.readSystemValues()
File "/home/openemm/tomcat10/bin/EMT_lib/Environment.py", line 315, in readSystemValues
DbConnector.dbcfgEntry = DbConnector.dbcfgProperties[DbConnector.applicationDbcfgEntryName]
KeyError: 'openemm'

Same as openemm user

[openemm@localhost bin]$ ./OMT.sh -debug
Checking python installation ...
Python version found: 3.9.14 (/usr/bin/python3)
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
Traceback (most recent call last):
File "/home/openemm/tomcat10/bin/OMT.py", line 158, in <module>
main()
File "/home/openemm/tomcat10/bin/OMT.py", line 81, in main
Environment.init()
File "/home/openemm/tomcat10/bin/EMT_lib/Environment.py", line 154, in init
Environment.readSystemValues()
File "/home/openemm/tomcat10/bin/EMT_lib/Environment.py", line 303, in readSystemValues
DbConnector.dbcfgEntry = DbConnector.dbcfgProperties[DbConnector.applicationDbcfgEntryName]
KeyError: 'openemm'
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by maschoff »

Please post the content of your dbcfg file (without password).
OpenEMM Maintainer
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by JuergenB »

This is the dbcfg in a clean installation

Code: Select all

emm: dbms=, host=localhost, user=, password=, name=openemm
aso
Posts: 33
Joined: Fri Jun 19, 2015 12:43 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by aso »

Problem is, that your system is missing the entry "openemm" in your dbcfg file which was generated initially.
To solve this you may change the name in dbcfg from "emm:" to "openemm:".

Alternativly you can wait for the following versions where the OMT will be fixed to come around this problem:
OpenEMM Version 22.10.000.192
OpenEMM Runtime Version 22.10.015
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by JuergenB »

Thanks,
after changing this to openemm, i got another error

Code: Select all

=============================================
= OpenEMM Maintenance Tool (OMT) v22.10.014 =
=============================================
Debug mode: On
Root mode: On
Hostname: localhost.localdomain
SQL: SELECT data FROM license_tbl WHERE name = 'LicenseData'
Parameters: ()
ERROR:root:executeSql
Traceback (most recent call last):
  File "/home/openemm/tomcat10/bin/EMT_lib/DbConnector.py", line 359, in executeSql
    connection = openDbConnection()
  File "/home/openemm/tomcat10/bin/EMT_lib/DbConnector.py", line 290, in openDbConnection
    raise Exception("Invalid database type: " + dbcfgEntry["dbms"])
Exception: Invalid database type:
Traceback (most recent call last):
  File "/home/openemm/tomcat10/bin/OMT.py", line 158, in <module>
    main()
  File "/home/openemm/tomcat10/bin/OMT.py", line 149, in main
    menu.show()
  File "/home/openemm/tomcat10/bin/EMT_lib/Menu.py", line 49, in show
    intermediateStartMenu.show(startMenu)
  File "/home/openemm/tomcat10/bin/EMT_lib/Menu.py", line 49, in show
    intermediateStartMenu.show(startMenu)
  File "/home/openemm/tomcat10/bin/EMT_lib/Menu.py", line 70, in show
    if License.getLicenseName() != None:
  File "/home/openemm/tomcat10/bin/EMT_lib/License.py", line 86, in getLicenseName
    return License.getLicenseValue("licenseHolder")
  File "/home/openemm/tomcat10/bin/EMT_lib/License.py", line 67, in getLicenseValue
    License.readLicenseValues()
  File "/home/openemm/tomcat10/bin/EMT_lib/License.py", line 17, in readLicenseValues
    data = DbConnector.selectValue("SELECT data FROM license_tbl WHERE name = 'LicenseData'")
  File "/home/openemm/tomcat10/bin/EMT_lib/DbConnector.py", line 349, in selectValue
    for row in select(sqlSelect, *parameters):
TypeError: 'NoneType' object is not iterable
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by maschoff »

Please re-try with runtime 22.10.020.
OpenEMM Maintainer
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: Runtime 22.10.014 gives KeyError: 'openemm'

Post by JuergenB »

Sorry,
the runtime openemm-runtime-22.10.020.tar.gz is still not working.
It seems it was not tested for installation. :roll:

OMT Tool is starting without any problems now, but the installation fails at creating the database.

=============================================
= OpenEMM Maintenance Tool (OMT) v22.10.020 =
=============================================
Root mode: On
Hostname: localhost.localdomain
OpenEMM Runtime Version: 22.10.020
OpenEMM Version: Unknown
System-Url: Unknown

Invalid DbcfgEntryName defined: openemm
Database is not running or host is invalid. Please configure.


Current menu: Change configuration of database connection

Database configuration for emm:
dbms =
host = localhost
name = openemm
password =
user =

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


So i entered the data like in runtime 22.04.008 and get this error.

=============================================
= OpenEMM Maintenance Tool (OMT) v22.10.020 =
=============================================
Root mode: On
Hostname: localhost.localdomain
OpenEMM Runtime Version: 22.10.020
OpenEMM Version: Unknown
System-Url: Unknown

Cannot save file: /home/openemm/etc/dbcfg

You made dbcfg changes, that need to be stored to become active.


I deleted ./etc/dbcfg and i still get this error.
This is dbcgf (password removed)

Code: Select all

[root@localhost tomcat-native-1.2.36-src]# cat /home/openemm/etc/dbcfg
emm: dbms=mariadb, host=localhost, user=openemm, password=******, name=openemm, jdbc-connect=jdbc:mariadb://localhost/openemm?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF-8, jdbc-driver=org.mariadb.jdbc.Driver
Runtime openemm-runtime-22.04.008.tar.gz is working fine, but openemm-runtime-22.10.020.tar.gz is not.

I changed dbcfg entry from emm: dbms to openemm: dbms and if i start OMT again, i get this error code

=============================================
= OpenEMM Maintenance Tool (OMT) v22.10.020 =
=============================================
Root mode: On
Hostname: localhost.localdomain
TypeError: 'NoneType' object is not iterable
[root@localhost etc]#
Post Reply