Kibana upgrade failed - Error: [config validation of [elasticsearch].preserveHost]: definition for this key is missing

I have upgraded kibana from 7.17 to 8.0.1 .Im getting the below error .
Error: [config validation of [elasticsearch].preserveHost]: definition for this key is missing

Could you please help me ?

Thanks

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

root@logsdev:/etc/kibana# /usr/share/kibana/bin/kibana --allow-root
[2024-06-07T13:06:18.026+01:00][INFO ][plugins-service] Plugin "metricsEntities" is disabled.
[2024-06-07T13:06:18.079+01:00][FATAL][root] Error: [config validation of [elasticsearch].preserveHost]: definition for this key is missing
    at ensureValidConfiguration (/usr/share/kibana/src/core/server/config/ensure_valid_configuration.js:25:11)
    at Server.preboot (/usr/share/kibana/src/core/server/server.js:160:5)
    at Root.preboot (/usr/share/kibana/src/core/server/root/index.js:48:14)
    at bootstrap (/usr/share/kibana/src/core/server/bootstrap.js:99:9)
    at Command.<anonymous> (/usr/share/kibana/src/cli/serve/serve.js:216:5)

 FATAL  Error: [config validation of [elasticsearch].preserveHost]: definition for this key is missing

Look at Kibana 8.0.0-beta1 | Kibana Guide [8.14] | Elastic

Some of the so/server/es settings have been removed. If your configuration uses the following settings, Kibana fails to start:

  • savedObjects.indexCheckTimeout
  • server.xsrf.token
  • elasticsearch.preserveHost
  • elasticsearch.startupTimeout

Some comments:

  • Don't use a 8.0 version of the stack. We now have 8.13.4.
  • You should have used the upgrade assistant before upgrading. Did you?

This guide explains how to upgrade: Upgrade Kibana | Kibana Guide [8.14] | Elastic

yes i have used upgrade assistant and upgraded elasticsearch v.8.0.1 successfully .

Is there any issue with kibana 8.0.1?

Could you please check the below logging format :

logging.root.level: debug

logging:
appenders:
file:
type: file
fileName: /var/log/kibana/kibana.log
layout:
type: pattern
root:
appenders:
- default
- file

I am getting the error while using the layout type as pattern.

Could you please advise on this?

Yes. And we are now on 8.14.1. So lot of things have been fixed since then.

I think it's another question and that the original one is solved, right?
If so, please open a new discussion and share what you did exactly, what are the logs... And please read this about how to format.