Problem update 2.0 to 2.1 (csrf_token)

CMK version: 2.1.0.cre
OS version: Rocky 8.7

Error message: Internal error: init() got an unexpected keyword argument ‘csrf_token’

Did a normal “omd update” on a new site (to test the update) but it somehow failed along the way:

2022-12-09 14:26:30 - Updating site 'test3' from version 2.0.0p31.cre to 2.1.0.cre...

 * Updated        .profile
 * Identical new  etc/omd
 * Installed file etc/apache/apache-own.conf
 * Updated        etc/apache/conf.d/01_wsgi.conf
 * Updated        etc/apache/conf.d/02_fcgid.conf
 * Updated        etc/apache/conf.d/omd.conf
 * Updated        etc/apache/conf.d/security.conf
 * Updated        etc/check_mk/apache.conf
 * Installed file etc/init.d/agent-receiver
 * Permissions    0755 -> 0775 etc/init.d/mkeventd
 * Updated        etc/init.d/pnp_gearman_worker
 * Updated        etc/init.d/redis
 * Updated        etc/init.d/stunnel
 * Updated        etc/init.d/xinetd
 * Installed file etc/logrotate.d/agent-receiver
 * Installed file etc/logrotate.d/agent-registration
 * Installed file etc/mk-livestatus/livestatus.socket
 * Installed file etc/mk-livestatus/livestatus@.service
 * Updated        etc/mk-livestatus/nagios.cfg
 * Updated        etc/nagios/conf.d/check_mk_templates.cfg
 * Updated        etc/nagios/nagios.d/misc.cfg
 * Updated        etc/nagvis/apache.conf
 * Installed file etc/omd/allocated_ports
 * Installed link etc/rc.d/10-agent-receiver
 * Installed dir  etc/stunnel/conf.d
 * Updated        etc/stunnel/server.conf
 * Installed file etc/stunnel/conf.d/01-livestatus.conf
 * Installed dir  var/log/agent-receiver
 * Vanished       etc/nagios/conf.d/jmx4perl_nagios.cfg
 * Vanished       etc/jmx4perl/config/websphere/appstate.cfg
 * Vanished       etc/jmx4perl/config/websphere/http.cfg
 * Vanished       etc/jmx4perl/config/websphere/jca.cfg
 * Vanished       etc/jmx4perl/config/websphere/jdbc.cfg
 * Vanished       etc/jmx4perl/config/websphere/jms.cfg
 * Vanished       etc/jmx4perl/config/websphere/threads.cfg
 * Vanished       etc/jmx4perl/config/common.cfg
 * Vanished       etc/jmx4perl/config/glassfish.cfg
 * Vanished       etc/jmx4perl/config/jboss.cfg
 * Vanished       etc/jmx4perl/config/jboss7.cfg
 * Vanished       etc/jmx4perl/config/jetty.cfg
 * Vanished       etc/jmx4perl/config/memory.cfg
 * Vanished       etc/jmx4perl/config/metrics.cfg
 * Vanished       etc/jmx4perl/config/threads.cfg
 * Vanished       etc/jmx4perl/config/tomcat.cfg
 * Vanished       etc/jmx4perl/config/weblogic.cfg
 * Vanished       etc/jmx4perl/config/websphere.cfg
 * Vanished       etc/jmx4perl/config/websphere
 * Vanished       etc/jmx4perl/config
 * Vanished       etc/jmx4perl
 * Vanished       .j4p
Creating temporary filesystem /omd/sites/test3/tmp...OK
Executing update-pre-hooks script "01_mkp-disable-outdated"...OK
Executing update-pre-hooks script "02_cmk-update-config"...
-| Initializing application...
-| Updating Checkmk configuration...
-| ATTENTION: Some steps may take a long time depending on your installation, e.g. during major upgrades.
-|  1/24 Rewriting password store...
-|  2/24 Migrate Visuals context...
-|  3/24 Migrate dashlets...
-|  4/24 Update global settings...
-|  5/24 Rewriting tags...
-|  6/24 Rewriting hosts and folders...
-|  7/24 Rewriting rulesets...
-| Replacing ruleset non_inline_snmp_hosts with snmp_backend_hosts
-|  8/24 Rewriting autochecks...
-|  9/24 Cleanup version specific caches...
-|  10/24 Migrating fs_used name...
-|  11/24 Migrate pagetype topics...
-|  12/24 Migrate LDAP connections...
-|  13/24 Rewrite BI Configuration...
-| Skipping conversion of bi.mk (already done)
-|  14/24 Set version specific user attributes...
-|  + "Set version specific user attributes" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/test3/lib/python3/cmk/update_config.py", line 237, in run
-|     step_func()
-|   File "/omd/sites/test3/lib/python3/cmk/update_config.py", line 1219, in _adjust_user_attributes
-|     users: Users = load_users(lock=True)
-|   File "/omd/sites/test3/lib/python3/cmk/gui/userdb.py", line 890, in load_users
-|     val = load_custom_attr(uid, attr, conv_func)
-|   File "/omd/sites/test3/lib/python3/cmk/gui/userdb.py", line 930, in load_custom_attr
-|     return conv_func(result.strip())
-|   File "/omd/sites/test3/lib/python3/cmk/gui/userdb.py", line 636, in _convert_session_info
-|     return {k: SessionInfo(**v) for k, v in ast.literal_eval(value).items()}
-|   File "/omd/sites/test3/lib/python3/cmk/gui/userdb.py", line 636, in <dictcomp>
-|     return {k: SessionInfo(**v) for k, v in ast.literal_eval(value).items()}
-| TypeError: __init__() got an unexpected keyword argument 'csrf_token'
-|  15/24 Rewriting inventory data...
-| Skipping path '/omd/sites/test3/var/check_mk/inventory' (empty)
-| Skipping path '/omd/sites/test3/var/check_mk/inventory_archive' (empty)
-| Skipping path '/omd/sites/test3/tmp/check_mk/status_data' (empty)
-| Finished checking for corrupt files
-| Creating file '/omd/sites/test3/var/check_mk/update_config/py2conversion.done'
-|  16/24 Migrate audit log...
-| No audit log present. Skipping.
-|  17/24 Sanitize audit log (Werk #13330)...
-| Wrote audit log backup to /omd/sites/test3/audit_log_backup. Please check if the audit log in the GUI works as expected. In case of problems you can copy the backup files back to /omd/sites/test3/var/check_mk/wato/log. Please check the corresponding files in /omd/sites/test3/var/check_mk/wato/log for any leftover passwords and remove them if necessary. If everything works as expected you can remove the backup. For further details please have a look at Werk #13330.
-| Sanitizing log files: /omd/sites/test3/var/check_mk/wato/log/wato_audit.log
-| Finished sanitizing log files
-| Wrote sanitization flag file /omd/sites/test3/var/check_mk/wato/log/.werk-13330
-|  18/24 Rename discovered host label files...
-|  19/24 Rewriting host, service or contact groups...
-|  20/24 Rewriting notification configuration for ServiceNow...
-|  21/24 Renewing certificates without server name extension...
-| Copied certificate to /omd/sites/test3/etc/ssl/sites/test3.pem.bak
-| Creating new certificate...
-|  22/24 Adding site CA to trusted CAs...
-|  23/24 Rewrite mknotifyd config for central site...
-|  24/24 Rewriting InfluxDB connections...
-| Done
ERROR (exit code: 1)
Updating core configuration...
Generating configuration for core (type nagios)...
Precompiling host checks...OK
Finished update.

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

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.