Upgrade error going from 2.3.0p12 to 2.3.0p23

Hi, I’m trying to do an upgrade from 2.3.0p12.cce to 2.3.0p23.cre
And i’m getting this error. How do I fix it??

CMK version:
2.3.0p23.cre
OS version:
RHEL 8
Error message:
NameError: name ‘agent_signature_keys’ is not defined

-| Verifying Checkmk configuration...
-| Traceback (most recent call last):
-|   File "/omd/sites/dc1/lib/python3/cmk/gui/config.py", line 145, in _load_config_file_to
-|     exec(compile(f.read(), path, "exec"), {}, raw_config)  # nosec B102 # BNS:aee528
-|     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/dc1/etc/check_mk/multisite.d/wato/agent_signature_keys.mk", line 3, in <module>
-|     agent_signature_keys.update({1: {'alias': 'key for dns agents',
-|     ^^^^^^^^^^^^^^^^^^^^
-| NameError: name 'agent_signature_keys' is not defined
-| 
-| During handling of the above exception, another exception occurred:
-| 
-| Traceback (most recent call last):
-|   File "/omd/sites/dc1/lib/python3/cmk/update_config/main.py", line 101, in main_check_config
-|     check_config(logger, conflict)
-|   File "/omd/sites/dc1/lib/python3/cmk/update_config/main.py", line 238, in check_config
-|     with disable_redis(), gui_context():
-|   File "/omd/sites/dc1/lib/python3.12/contextlib.py", line 137, in __enter__
-|     return next(self.gen)
-|            ^^^^^^^^^^^^^^
-|   File "/omd/sites/dc1/lib/python3/cmk/gui/utils/script_helpers.py", line 67, in gui_context
-|     with app.app_context(), make_request_context(app, environ):
-|   File "/omd/sites/dc1/lib/python3.12/site-packages/flask/ctx.py", line 434, in __enter__
-|     self.push()
-|   File "/omd/sites/dc1/lib/python3.12/site-packages/flask/ctx.py", line 386, in push
-|     self.session = session_interface.open_session(self.app, self.request)
-|                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/dc1/lib/python3/cmk/gui/session.py", line 341, in open_session
-|     config.initialize()
-|   File "/omd/sites/dc1/lib/python3/cmk/gui/config.py", line 132, in initialize
-|     load_config()
-|   File "/omd/sites/dc1/lib/python3/cmk/gui/config.py", line 185, in load_config
-|     _load_config_file_to(p, raw_config)
-|   File "/omd/sites/dc1/lib/python3/cmk/gui/config.py", line 149, in _load_config_file_to
-|     raise MKConfigError(_("Cannot read configuration file %s: %s:") % (path, e))
-| cmk.gui.exceptions.MKConfigError: Cannot read configuration file /omd/sites/dc1/etc/check_mk/multisite.d/wato/agent_signature_keys.mk: name 'agent_signature_keys' is not defined:
-| 
-| Update aborted with Error: Cannot read configuration file /omd/sites/dc1/etc/check_mk/multisite.d/wato/agent_signature_keys.mk: name 'agent_signature_keys' is not defined:.
-| Your site has not been modified.''

**Output of “cmk --debug -vvn hostname”:** (If it is a problem with checks or plugins)
```OMD[dc1]:~$ cmk --debug -vvn prd-asmon1.bld.aipo.gov.au
value store: synchronizing
Trying to acquire lock on /omd/sites/dc1/tmp/check_mk/counters/prd-asmon1.bld.aipo.gov.au
Got lock on /omd/sites/dc1/tmp/check_mk/counters/prd-asmon1.bld.aipo.gov.au
value store: loading from disk
Releasing lock on /omd/sites/dc1/tmp/check_mk/counters/prd-asmon1.bld.aipo.gov.au
Released lock on /omd/sites/dc1/tmp/check_mk/counters/prd-asmon1.bld.aipo.gov.au
Checkmk version 2.3.0p12
Updating IPv4 DNS cache for prd-asmon1.bld.aipo.gov.au: 172.19.11.76
Trying to acquire lock on /omd/sites/dc1/var/check_mk/ipaddresses.cache
Got lock on /omd/sites/dc1/var/check_mk/ipaddresses.cache
Releasing lock on /omd/sites/dc1/var/check_mk/ipaddresses.cache
Released lock on /omd/sites/dc1/var/check_mk/ipaddresses.cache
+ FETCHING DATA
  Source: SourceInfo(hostname='prd-asmon1.bld.aipo.gov.au', ipaddress='172.19.11.76', ident='piggyback', fetcher_type=<FetcherType.PIGGYBACK: 4>, source_type=<SourceType.HOST: 1>)
[cpu_tracking] Start [7fe4fa03ef60]
Read from cache: NoCache(prd-asmon1.bld.aipo.gov.au, path_template=/dev/null, max_age=MaxAge(checking=0.0, discovery=0.0, inventory=0.0), simulation=False, use_only_cache=False, file_cache_mode=1)
No piggyback files for 'prd-asmon1.bld.aipo.gov.au'. Skip processing.
No piggyback files for '172.19.11.76'. Skip processing.
Get piggybacked data
[cpu_tracking] Stop [7fe4fa03ef60 - Snapshot(process=posix.times_result(user=0.0, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.0))]
[cpu_tracking] Start [7fe4fa31fb30]
+ PARSE FETCHER RESULTS
  HostKey(hostname='prd-asmon1.bld.aipo.gov.au', source_type=<SourceType.HOST: 1>)  -> Add sections: []
Received no piggyback data
No piggyback files for 'prd-asmon1.bld.aipo.gov.au'. Skip processing.
No piggyback files for '172.19.11.76'. Skip processing.
[cpu_tracking] Stop [7fe4fa31fb30 - Snapshot(process=posix.times_result(user=0.020000000000000018, system=0.009999999999999981, children_user=0.0, children_system=0.0, elapsed=0.02000000048428774))]
[piggyback] Success (but no data found for this host), execution time 0.0 sec | execution_time=0.020 user_time=0.020 system_time=0.010 children_user_time=0.000 children_system_time=0.000 cmk_time_agent=0.000

Agent signature keys should only exists inside enterprise or cloud edition.
Was this site before a free, enterprise or cloud edition?
To get rid of this error you can move the file

to some other location outside your site and try the upgrade again.

Yes, It was the trial of the cloud edition.
I’ve removed that file and it moved on and did most of the update.
it did however give this error

 Configuration Error: No module named 'cmk.base.cee'
-|  + "Update core config" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/dc1/lib/python3/cmk/update_config/main.py", line 269, in update_config
-|     action(logger, update_state.setdefault(action.name))
-|   File "/omd/sites/dc1/lib/python3/cmk/update_config/plugins/actions/update_core_config.py", line 21, in __call__
-|     subprocess.check_call(["cmk", "-U"], shell=False)
-|   File "/omd/sites/dc1/lib/python3.12/subprocess.py", line 413, in check_call
-|     raise CalledProcessError(retcode, cmd)
-| subprocess.CalledProcessError: Command '['cmk', '-U']' returned non-zero exit status 1.

How do you fix that?

As this is the last step of the upgrade you can now try to do a “cmk --debug -vvU” and look for a little bit more error message.

Do you have a backup of the old 2.3.0p12.cce? We do not support crossgrades in any way. So the recommended way to go is 2.3.0p12.cce to 2.3.0p24.cce and then 2.3.0p24.cre (update first, edition change afterwards).

I just checked: unsupported crossgrades get only mentioned in distributed monitoring not in upgrades or downgrades of the relevant article, I will care for fixing this.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.