Updating to v2.3 - pagetypes failed

CMK version: 2.3.0p6

Hey folks,

while updating from 2.2.0p27 to 2.3.0p6 we receive the following error:

[..]
-|  20/25 Update pagetypes...
-|  + "Update pagetypes" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/dev231/lib/python3/cmk/update_config/main.py", line 262, in update_config
-|     action(logger, update_state.setdefault(action.name))
-|   File "/omd/sites/dev231/lib/python3/cmk/update_config/plugins/actions/pagetypes.py", line 55, in __call__
-|     raw_page_dicts = updater(raw_page_dicts)
-|                      ^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/dev231/lib/python3/cmk/update_config/cee/plugins/actions/pagetypes.py", line 49, in __call__
-|     element["parameters"]
-|     ~~~~~~~^^^^^^^^^^^^^^
-| KeyError: 'parameters'
-|  21/25 Split large audit logs...
-|  22/25 Event Console: Rewrite active config...
-|  23/25 Remove persisted graph options...
-|  24/25 BI config...
-|  25/25 Update core config...
-| Generating configuration for core (type cmc)...
-| Starting full compilation for all hosts Creating global helper config...OK
-|  Creating cmc protobuf configuration...OK
-| Done (with errors)
ERROR (exit code: 1)

What can be done to fix that?
thx and br
Marco

I do have the exact same Problem and afterwards everytime I open the sidebar it looks ike this:

Please advise.

1 Like

This error is most times caused by an old gui extension like self defined views or dashboards.
You can have a look inside ~/local/share/check_mk/web/plugins/views or dashboards if there are files existing.

no such files existed.

Can you fully show the Error in the GUI? Does it say something about a rrd? And are you sure you had the same error message?

If nothing is in local, it’s worth a try to try the updated after you moved ~/var/check_mk/web away (for a moment). It contains user changes made in the GUI. If this works, you just need to figure out which of the subfolders caused it to do a clean update.

1 Like

Can’t in GUI because I use the CLI.

-|  22/28 Update pagetypes...
-|  + "Update pagetypes" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/zub/lib/python3/cmk/update_config/main.py", line 268, in update_config
-|     action(logger, update_state.setdefault(action.name))
-|   File "/omd/sites/zub/lib/python3/cmk/update_config/plugins/actions/pagetypes.py", line 59, in __call__
-|     instances.add_instance((user_id, name), pagetype.deserialize(raw_page_dict))
-|                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/zub/lib/python3/cmk/gui/graphing/cee/_customgraphs.py", line 403, in deserialize
-|     return cls(_deserialize_custom_graph_page_spec(page_dict))
-|                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/zub/lib/python3/cmk/gui/graphing/cee/_customgraphs.py", line 339, in _deserialize_custom_graph_page_spec
-|     metrics=[_deserialize_custom_graph_metric_spec(m) for m in metrics],
-|              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/zub/lib/python3/cmk/gui/graphing/cee/_customgraphs.py", line 267, in _deserialize_custom_graph_metric_spec
-|     expression=_deserialize_expression(metric["expression"]),
-|                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/zub/lib/python3/cmk/gui/graphing/cee/_customgraphs.py", line 257, in _deserialize_expression
-|     return parse_metric_operation(expression)
-|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/zub/lib/python3/cmk/gui/graphing/_graph_specification.py", line 75, in parse_metric_operation
-|     return metric_operation_registry[f'metric_op_{raw["ident"]}'].model_validate(raw)
-|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/zub/lib/python3.12/site-packages/pydantic/main.py", line 503, in model_validate
-|     return cls.__pydantic_validator__.validate_python(
-|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-| pydantic_core._pydantic_core.ValidationError: 1 validation error for MetricOpRRDChoice
-| host_name
-|   Value error, Invalid hostaddress: '.164-VEEAM2020_Exner' [type=value_error, input_value='.164-VEEAM2020_Exner', input_type=str]
-|     For further information visit https://errors.pydantic.dev/2.5/v/value_error

Thats the error I get. I try to Update from 2.2.0p34.cee to 2.3.0p16.cee on CFW 1.75.

BTW dieser Host wurde umbenannt, warum das “.” am Anfang noch drin ist in irgendweiner Datei und wieso das ĂŒberhaupt ein Problem ist wissen nur die CheckMK Götter


Ist halt mit dem Punkt am Anfang kein legaler Hostname.
Da ist der Pydantic Check schon korrekt in seiner Aussage.

Zu der anderen Frage warum so ein seltsamer Name ĂŒberhaupt existiert lĂ€sst sich natĂŒrlich nix sagen nachtrĂ€glich. Kann auch sein, dass hier beim umbenennen schief gelaufen ist.

Was aber Schritt 22/28 killt ist ja was anderes Und das scheint auch den Fehler in der GUI Anzeige (mit der Sidebar) von oben hervor zu rufen.

Ich gebs jetzt auf, wir bleiben auf 2.2 bis es nicht mehr geht. Genug Zeit versemmelt


Solche Hostnamen können durch die Piggyback Translation zustande kommen. Hatte den Fall schon mal, dass von ESX quasi ein leerer Name gelesen wurde, dann durch die Piggyback Translation ein Hostname dahinter gepackt, was zu genau dem gefĂŒhrt hatte.

That hostname is somewhere then.
Maybe set in a Filter? Can you grep for (Recursive) it in ~/var/check_mk/web and just to be sure in ~/etc/check_mk/conf.d?

Hello,

I got the same error about rrd at the mainpage, the error remains after moving ~/var/check_mk/web. The complete errormessage:

Internal error: (‘rrd’, ‘server-XXX.XXX.local’, ‘Memory and pagefile’, ‘mem_used’, ‘max’)

An internal error occured while processing your request. You can report this issue to the Checkmk team to help fixing this issue.

I updated from 2.2.0p31 cee to 2.3.0p17 cee.

Thanks,
Marcel

Hi,

I got near the same errors when I tried to update from 2.2.0p31 cee to 2.3.0p17 cee via the dockerimage and at the regular installation:

errors from the dockerinstallation:

  21/28 Update existing two factor...
  22/28 Update pagetypes...
  + "Update pagetypes" failed
 Traceback (most recent call last):
   File "/omd/sites/lub_gs/lib/python3/cmk/update_config/main.py", line 268, in update_config
     action(logger, update_state.setdefault(action.name))
   File "/omd/sites/lub_gs/lib/python3/cmk/update_config/plugins/actions/pagetypes.py", line 55, in __call__
     raw_page_dicts = updater(raw_page_dicts)
                      ^^^^^^^^^^^^^^^^^^^^^^^
   File "/omd/sites/lub_gs/lib/python3/cmk/update_config/cee/plugins/actions/pagetypes.py", line 48, in __call__
     element["parameters"] = self._parse_graph_specification(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/omd/sites/lub_gs/lib/python3/cmk/update_config/cee/plugins/actions/pagetypes.py", line 72, in _parse_graph_specification
     return _parse_legacy_graph_identifier(raw_spec)  # type: ignore[arg-type]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/omd/sites/lub_gs/lib/python3/cmk/update_config/cee/plugins/actions/pagetypes.py", line 98, in _parse_legacy_graph_identifier
     return parse_raw_graph_specification({"graph_type": identifier[0]} | dict(graph_spec))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/omd/sites/lub_gs/lib/python3/cmk/gui/graphing/_graph_specification.py", line 213, in parse_raw_graph_specification
     ].model_validate(raw)
       ^^^^^^^^^^^^^^^^^^^
   File "/omd/sites/lub_gs/lib/python3.12/site-packages/pydantic/main.py", line 503, in model_validate
     return cls.__pydantic_validator__.validate_python(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 pydantic_core._pydantic_core.ValidationError: 3 validation errors for CombinedGraphSpecification
 context.service
   Input should be a valid dictionary [type=dict_type, input_value='Memory and pagefile', input_type=str]
     For further information visit https://errors.pydantic.dev/2.5/v/dict_type
 context.svc_last_check
   Input should be a valid dictionary [type=dict_type, input_value='', input_type=str]
     For further information visit https://errors.pydantic.dev/2.5/v/dict_type
 context.svc_last_state_change
   Input should be a valid dictionary [type=dict_type, input_value='', input_type=str]
     For further information visit https://errors.pydantic.dev/2.5/v/dict_type
  23/28 Split large audit logs...

Everything was working or able to update before.

Greetings
Marcel

Hi @bkuhn , @andreas-doehler

we have exactly the same problem after upgrade from v2.2.0p27 to v2.3.0p16.
The server clone on v2.2.0p27 has no problems.

No solution right now. Open ticket at Checkmk.
Looks like a bug.

another finding - same problem

Custom graphs crash after upgrade from 2.2p34 to 2.3p17 - Troubleshooting - Checkmk Community

@ all

Could someone with this problem please check what is shown when you try to open the users settings page:

https://<HOSTNAME/IP>/master/check_mk/wato.py?mode=users

And please have a look in the web.log

tail -f -n1000 ~/var/log/web.log

After the upgrade we can only login with the cmkadmin user. AFAISee the LDAP users are all locked.
The issue is possibly somewhere in this area to find.

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.