-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kibana: mapping set to strict, dynamic introduction of [references] within [doc] is not allowed #35061
Comments
Pinging @elastic/kibana-platform |
cc @mikecote |
Hi @raulk89, It seems like migrations may have failed to execute. When migrating on startup, kibana does the following steps:
I believe a failure happened at step 3 where kibana is still pointing to the un-migrated index that contain old mappings. In that scenario, kibana should have created console logs from along the lines of:
You can also confirm if migrations failed by looking at where the Is there any chance logs like those have been created? cc @tylersmalley let me know if I missed anything about the migration process or if you can step in as well. |
Hi Do you mean these messages are in kibana log or elasticsearch logs..? At the moment, .kibana points to .kibana_1:
Regards |
@raulk89 I meant the kibana logs. Every-time kibana starts it would have a message like |
@raulk89 from those logs, it confirms |
@mikecote: when does migration of a |
Hi @dguendisch, yes the migrations execute on startup of kibana. In regards to snapshot restore, I'm not 100% sure but by restarting kibana it would migrate the saved objects that are restored from the snapshot. You can try that and keep a close eye on the kibana logs (just confirm you're restoring the proper kibana index as they increase on every startup |
No worry, rolling upgrade worked for me, just the "new-cluster->snapshot-restore" approach left me with the error msg of this issue here. I'll retry and add a kibana restart as the last step. |
For me there is no logs at all:
|
I usually start this through service instead: I have waited for like several minutes already. But, so I should delete this .kibana_2 ? Raul |
@raulk89, to get this "mapping set to strict, dyna..." error - I am pretty sure you would have had to start Kibana 7, then modify/swap out the underlying index with one from a 6.x instance. Can you confirm this is the case? If you, you will need to restart Kibana. We do not support swapping out the underlying index while Kibana is running. For the logs, you probably need to look at the service level logs |
@mikecote, retried my empty 7.0 setup, restored from snapshot and upon restart of kibana it migrated its indexes, so fine with me so far, thanks for the hints. |
Ok, I do not know what I did differently last week, when I got these errors, now I cloned same VM tmeplate again, aga tried again 6.7.1 -> 7.0.0
And it worked. Raul |
That's great @raulk89 - as long as you aren't restoring an old index you should be fine. We good to close this issue now? |
Well, this still is confusing, as why it happened..:) Raul |
Yup, to sum it up: Kibana runs migrations on startup, so if you swap out the underlying index with one from a previous version there are issues which could arise due to the data structure. An easy solution would be to then restart Kibana and allow the migrations to be run on the restored data. |
Pinging @elastic/kibana-operations |
We're seeing this on a few more instances, and the discuss thread has more discussion. Opening for another look and steps for recovering. editing so I don't spam too many notifications:
|
More reference here: Environment: 7.2.0 BC9 cloud instance
Response :
Then deleted the cc @LeeDr |
I've just had this occur after a 6.7.2 -> 7.1.1 kibana+es upgrade. I think this can occur when ES is running slowly on startup. My ES was coming up, reasonably performant but clearly still initializing. I "systemctl start"'d kibana and loaded the browser. Kibana began migrating the indices, but ran into this:
That kibana process exited, and systemctl restarted a new one, which produced the following:
Because systemd was so quick to restart it I had no idea anything went wrong at first. So I think the sum of problems can be described as:
|
The issue @Rasroh referenced here that came from the functional tests canvas smoke test is not related to this as we can tell it is just a test issue. This issue is related to migrations and upgrades. |
Wanted to bump this to say it's still happening, and if there's a way we can run the migrations check more than once or include a more detailed workflow. related: #32237 |
I'm closing this as we haven't seen any further occurrences and the root cause seems to always be one of the following two reasons:
|
Hm... Are you sure it needs to be restarted? If so, why does Kibana need to be restarted after restoring from a snapshot? @rudolf |
@danksim Sorry I missed your comment. When a snapshot with
Even if a snapshot from the same version of Kibana is restored it might lead to inconsistent data / data corruption:
Although it's difficult to give concrete examples for all the plugins, I would say most plugins are susceptible to these scenarios. Although some scenarios could be mitigated by using optimistic concurrency controls (specifying the version field in the saved objects client / API). If you're restoring from a snapshot, I would therefore always recommend first stopping the Kibana process, then restoring the snapshot, and only then bring the Kibana node back online. |
Kibana version: 7.0.0
Elasticsearch version: 7.0.0
Server OS version: Centos 7.6 64 bit
Browser version: Chrome Version 73.0.3683.86 (Official Build) (64-bit)
(tried with IE also)
Browser OS version: Version 73.0.3683.86 (Official Build) (64-bit)
Original install method (e.g. download page, yum, from source, etc.): yum
Describe the bug:
Updated both from 6.7.1 to 7.0.0.
Cluster is green, but when browsing kibana on browser, I get:
Steps to reproduce:
(kibana is using default conf)
Expected behavior: Kibana UI should open up.
Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Elasticsearch has following errors in logfile, when visiting kibana UI:
Any additional context:
I opened this discussion here, and there are lot of people who are having the same problem.
https://discuss.elastic.co/t/kibana-mapping-set-to-strict-dynamic-introduction-of-references-within-doc-is-not-allowed/176403
The text was updated successfully, but these errors were encountered: