Error Upgrade 1.6 to 2.0 rbl_check: inconsistent use of tabs and spaces in indentation and API Error:Error running automation call <tt>diag-host</tt> (exit code 1)


running this upgrade on a debian 9 based system OR inside the official docker container will show:

2021-10-14 11:27:39 - Updating site 'cmk' from version 1.6.0p19.cre to 2.0.0p12.cre...

 * Merged         .profile
 * Installed link local/lib/check_mk
 * Installed dir  local/lib/python3
 * Installed dir  local/lib/python3/cmk
 * Installed dir  local/lib/python3/cmk/base
 * Installed dir  local/lib/python3/cmk/base/plugins
 * Installed dir  local/lib/python3/cmk/base/plugins/agent_based
 * Installed dir  etc/redis
 * Identical new  etc/ssl
 * Updated        etc/mk-livestatus/nagios.cfg
 * Installed file etc/logrotate.d/redis
 * Updated        etc/check_mk/
 * Updated        etc/check_mk/apache.conf
 * Installed file etc/redis/redis.conf
 * Updated        etc/apache/conf.d/01_wsgi.conf
 * Updated        etc/apache/conf.d/security.conf
 * Installed link etc/rc.d/85-redis
 * Updated        etc/nagios/conf.d/check_mk_templates.cfg
 * Installed dir  etc/ssl/private
 * Installed dir  etc/ssl/misc
 * Installed dir  etc/ssl/certs
 * Installed file etc/ssl/ct_log_list.cnf.dist
 * Installed file etc/ssl/openssl.cnf
 * Installed file etc/ssl/openssl.cnf.dist
 * Installed file etc/ssl/ct_log_list.cnf
 * Installed link etc/ssl/misc/tsget
 * Installed file etc/ssl/misc/
 * Installed file etc/ssl/misc/
 * Installed file etc/init.d/redis
 * Updated        etc/init.d/xinetd
 * Installed dir  var/redis
 * Installed dir  var/check_mk/crashes
 * Keeping your   var/dokuwiki/data/cache/_dummy
 * Keeping your   var/dokuwiki/data/pages/playground/playground.txt
 * Keeping your   var/dokuwiki/data/pages/wiki/dokuwiki.txt
 * Keeping your   var/dokuwiki/data/pages/wiki/syntax.txt
 * Keeping your   var/dokuwiki/data/pages/wiki/ebook.txt
 * Keeping your   var/dokuwiki/data/pages/wiki
 * Keeping your   var/dokuwiki/data/pages/playground
 * Keeping your   var/dokuwiki/data/tmp/_dummy
 * Keeping your   var/dokuwiki/data/attic/_dummy
 * Keeping your   var/dokuwiki/data/locks/_dummy
 * Keeping your   var/dokuwiki/data/meta/_dummy
 * Keeping your   var/dokuwiki/data/media/wiki/dokuwiki-128.png
 * Keeping your   var/dokuwiki/data/media/wiki
 * Keeping your   var/dokuwiki/data/index/_dummy
 * Keeping your   var/dokuwiki/data/.htaccess
 * Keeping your   var/dokuwiki/data/_dummy
 * Keeping your   var/dokuwiki/data/index
 * Keeping your   var/dokuwiki/data/media
 * Keeping your   var/dokuwiki/data/meta
 * Keeping your   var/dokuwiki/data/locks
 * Keeping your   var/dokuwiki/data/attic
 * Keeping your   var/dokuwiki/data/tmp
 * Keeping your   var/dokuwiki/data/pages
 * Keeping your   var/dokuwiki/data/media_meta
 * Keeping your   var/dokuwiki/data/cache
 * Keeping your   var/dokuwiki/data/media_attic
 * Keeping your   var/dokuwiki/lib/plugins/syntax.php
 * Keeping your   var/dokuwiki/lib/plugins/safefnrecode
 * Keeping your   var/dokuwiki/lib/plugins/authpgsql
 * Keeping your   var/dokuwiki/lib/plugins/indexmenu
 * Keeping your   var/dokuwiki/lib/plugins/admin.php
 * Keeping your   var/dokuwiki/lib/plugins/action.php
 * Keeping your   var/dokuwiki/lib/plugins/auth.php
 * Keeping your   var/dokuwiki/lib/plugins/authpdo
 * Keeping your   var/dokuwiki/lib/plugins/revert
 * Keeping your   var/dokuwiki/lib/plugins/cli.php
 * Keeping your   var/dokuwiki/lib/plugins/authmultisite
 * Keeping your   var/dokuwiki/lib/plugins/config
 * Keeping your   var/dokuwiki/lib/plugins/pagelist
 * Keeping your   var/dokuwiki/lib/plugins/authad
 * Keeping your   var/dokuwiki/lib/plugins/acl
 * Keeping your   var/dokuwiki/lib/plugins/remote.php
 * Keeping your   var/dokuwiki/lib/plugins/include
 * Keeping your   var/dokuwiki/lib/plugins/bookcreator
 * Keeping your   var/dokuwiki/lib/plugins/extension
 * Keeping your   var/dokuwiki/lib/plugins/styling
 * Keeping your   var/dokuwiki/lib/plugins/authldap
 * Keeping your   var/dokuwiki/lib/plugins/authplain
 * Keeping your   var/dokuwiki/lib/plugins/usermanager
 * Keeping your   var/dokuwiki/lib/plugins/authmysql
 * Keeping your   var/dokuwiki/lib/plugins/info
 * Keeping your   var/dokuwiki/lib/plugins/changes
 * Keeping your   var/dokuwiki/lib/plugins/index.html
 * Keeping your   var/dokuwiki/lib/plugins/dokuteaser
 * Keeping your   var/dokuwiki/lib/plugins/popularity
 * Keeping your   var/dokuwiki/lib/plugins
 * Keeping your   var/dokuwiki/lib
 * Keeping your   var/dokuwiki/data
 * Keeping your   var/dokuwiki
 * Vanished       etc/pnp4nagios/apache.conf
 * Vanished       etc/jmx4perl/servers.cfg
 * Vanished       etc/jmx4perl/jmx4perl.cfg
 * Vanished       etc/cron.d/cmk_cleanup_crashed_checks
 * Vanished       etc/nagios/conf.d/pnp4nagios.cfg
 * Vanished       etc/nagios/ssi/extinfo-header.ssi
 * Vanished       etc/nagios/ssi/status-header.ssi
 * Keeping your   etc/dokuwiki/acronyms.conf
 * Keeping your   etc/dokuwiki/wordblock.conf
 * Keeping your   etc/dokuwiki/interwiki.conf
 * Keeping your   etc/dokuwiki/scheme.conf
 * Keeping your   etc/dokuwiki/users.auth.php
 * Keeping your   etc/dokuwiki/plugins.required.php
 * Keeping your   etc/dokuwiki/dokuwiki.php
 * Keeping your   etc/dokuwiki/mediameta.php
 * Keeping your   etc/dokuwiki/apache.conf
 * Keeping your   etc/dokuwiki/mysql.conf.php.example
 * Keeping your   etc/dokuwiki/mime.conf
 * Keeping your   etc/dokuwiki/local.php
 * Keeping your   etc/dokuwiki/license.php
 * Keeping your   etc/dokuwiki/local.protected.php
 * Keeping your   etc/dokuwiki/msg
 * Keeping your   etc/dokuwiki/smileys.conf
 * Keeping your   etc/dokuwiki/plugins.local.php
 * Keeping your   etc/dokuwiki/acl.auth.php
 * Keeping your   etc/dokuwiki/plugins.php
 * Keeping your   etc/dokuwiki/entities.conf
 * Vanished       etc/apache/conf.d/dokuwiki.conf
 * Vanished       etc/check_mk/conf.d/README
 * Keeping your   etc/dokuwiki
 * Keeping your   local/share/dokuwiki/htdocs
 * Keeping your   local/share/dokuwiki
 * Vanished       .pip/pip.conf
 * Vanished       .pip
Creating temporary filesystem /omd/sites/cmk/tmp...OK
Executing update-pre-hooks script "02_cmk-update-config"...
-| Initializing application...
-| Loading GUI plugins...
-| Failed to load plugin /omd/sites/cmk/local/share/check_mk/web/plugins/perfometer/ Missing parentheses in call to 'print'. Did you mean print(perf_data)? (<string>, line 5)
-| Traceback (most recent call last):
-|   File "/omd/sites/cmk/lib/python3/cmk/gui/utils/", line 172, in load_web_plugins
-|     exec(, globalvars)
-|   File "<string>", line 5
-|     print perf_data
-|           ^
-| SyntaxError: Missing parentheses in call to 'print'. Did you mean print(perf_data)?
-| Failed to load plugin /omd/sites/cmk/local/share/check_mk/web/plugins/wato/ __init__() got an unexpected keyword argument 'min_value'
-| Traceback (most recent call last):
-|   File "/omd/sites/cmk/lib/python3/cmk/gui/utils/", line 172, in load_web_plugins
-|     exec(, globalvars)
-|   File "<string>", line 19, in <module>
-| TypeError: __init__() got an unexpected keyword argument 'min_value'
-| ERROR: Failed to load some GUI plugins. You will either have 
-|        to remove or update them to be compatible with this 
-|        Checkmk version.
ERROR (exit code: 1)
Executing update-pre-hooks script "01_mkp-disable-outdated"...OK
Updating core configuration...
Error in plugin file /omd/sites/cmk/local/share/check_mk/checks/rbl_check: inconsistent use of tabs and spaces in indentation (<unknown>, line 21)
Failed to auto-migrate legacy plugin to check plugin: edac.mem
Please refer to Werk 10601 for more information.
Failed to auto-migrate legacy plugin to check plugin:
Please refer to Werk 10601 for more information.
Failed to auto-migrate legacy plugin to check plugin: lmsensors.temp
Please refer to Werk 10601 for more information.
Failed to auto-migrate legacy plugin to check plugin: lmsensors.volt
Please refer to Werk 10601 for more information.
Failed to auto-migrate legacy plugin to check plugin: mtr
Please refer to Werk 10601 for more information.
Cannot read in configuration file /omd/sites/cmk/etc/check_mk/conf.d/wato/ezdeploy_lxd/ invalid syntax (<string>, line 7)
Finished update.

will, aside of the above errors:

  • syntax errors in rbl check
  • syntax errors in

Also lead to:

API Error:Error running automation call diag-host (exit code 1)

when the check_mk agent is called on the to be monitored sites.

Would it make sense to upgrade first to the very latest 1.6 version or is there some way to fix / further analyse this isse ?

Thank you!

you should check your checks if they have import statement. In check_mk 1.x imports and icludes didnt need precise name (worked as “magic” :D) in 2.x you need precise imports. This werk could help you : Plugin development: make all includes imports
With regards.

Hi Jan,

thank you for your time!

As far as i know, this is a vanilla CMK install without additional checks. So normally the checkMK update routine should be manage what ever is there, as its default part of the distribution.

But i will check that more closely. Thank you!