-
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
Discover crashes when the primary index pattern is empty (Case: APM) #56375
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
Can you share the proxy pass configuration? Is kibana configured route under a subfolder? |
Seeing this too, homebrew install, defaults, no subfolder. I did change my primary/default index pattern |
I thought I had changed it, it switched to an empty apm index pattern, switching it back fixed it. |
Hi i've this error too, everything were working ok but just fuckd up. I dont use proxy. @edit , i didnt see reply from matthew , switching index from apm to another fixed problem. From journal |
We had the same issue on our Kibana server, as @matthewford said. Changing the default index pattern solves the issue. Our default was The setting can be found under "Management > Kibana > Index Patterns", go into an index and press the star at the top right. |
I can confirm that this fixed the problem in my installation. Thanks @erictuvesson |
I have the same issue and also was fixed by changing the default index |
Such a simple solution... Even i had the same error and it was solved by changing the default index in kibana from *apm to anyone of our index. |
I am having a hard time reproducing this issue.
After installing Kibana, I assume you then setup APM? Is there anything else you did? Is anyone still able to reproduce that could provide a HAR of the full-page load? |
Pinging @elastic/apm-ui (Team:apm) |
Tagging APM since based on the comments this has something to do with the APM index pattern. |
@tylersmalley yes I was clicking on all the tabs on the nav to see what they do, and I must have activated apm (but did not use it). |
I think I know what's going on: When APM app is opened an APM index pattern is created automatically. If no other index patterns have been created, the APM index pattern will be the default. When opening Discover it calls I think there are a two possible fixes for this problem 1) Quick fix: 2) Long term fix |
Pinging @elastic/kibana-app (Team:KibanaApp) |
In theory Discover should be able to handle this. In most cases it will just show this screen: I agree though that your message would be even better @sqren - would be a nice improvement. I looked into the problem a bit and it seems this occurs because the index pattern tries to refresh its fields - this produces a generic not found error because of this catch all: https://github.com/elastic/kibana/blob/master/src/plugins/data/server/index_patterns/routes.ts#L118 The route handler goes through a few layers and finally hits the field caps api here: https://github.com/elastic/kibana/blob/master/src/plugins/data/server/index_patterns/fetcher/lib/es_api.ts#L66 This function documents it will throw when no data is present. IMHO the index pattern service should handle the situation more gracefully. Pulling in app arch as this is ultimately caused by the index pattern service and can also occur in all other places index patterns are used (because of the generic error discover currently can't differentiate between a no-data situation and a something-went-very-wrong-in-general situation). |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
Sound like a bug that was fixed in 7.6 -> #55836 |
I missed this one, @kertal. This definitely improves the situation, but I'm not sure whether it's sufficient for all cases. AFAIK In some scenarios it seems like this can crash all of discover and show up in a lot of other places: https://discuss.elastic.co/t/error-not-found-at-http-localhost-5601-bundles-commons-bundle-js1376093/218720 |
It's not really clear to me given the state this issue is in at the moment, what's the state and if there's still work expected. It seems like the described issue here is fixed, but there might be other "related" issues? I'll go ahead and close this for now, and please feel free to reopen it and update with a clear description what's failing or open new issues if there are other related issues. |
Temporary workaround:
Changing the default index pattern from
apm-*
to something else fixes the issueKibana version:
7.5.2
Elasticsearch version:
7.5.2
Server OS version:
Ubuntu 18.04.03
Browser version:
Chrome 79.0.3945.130 / FireFox 72.0.2 (64-bit)
Browser OS version:
Windows 10
Original install method (e.g. download page, yum, from source, etc.):
Installed from offical repository with APT
Describe the bug:
When clicking "Discover" button in left hand toolbar i get the following error
"Error fetching fields", Error: Not Found at https://elk.xxxx..no/bundles/commons.bundle.js:3:1371537
Steps to reproduce:
Expected behavior:
To get discover page
Screenshots (if relevant):
Errors in browser console (if relevant):
VM6:1 GET https://xxxxxxxxx.no/api/index_patterns/_fields_for_wildcard?pattern=apm-*&meta_fields=_source&meta_fields=_id&meta_fields=_type&meta_fields=_index&meta_fields=_score 404 (Not Found) (anonymous) @ VM6:1 _callee6$ @ commons.bundle.js:3 tryCatch @ vendors.bundle.dll.js:489 invoke @ vendors.bundle.dll.js:489 forEach.prototype.<computed> @ vendors.bundle.dll.js:489 asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 fetcher @ commons.bundle.js:3 Promise.then (async) _callee7$ @ commons.bundle.js:3 tryCatch @ vendors.bundle.dll.js:489 invoke @ vendors.bundle.dll.js:489 forEach.prototype.<computed> @ vendors.bundle.dll.js:489 asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 _callee8$ @ commons.bundle.js:3 tryCatch @ vendors.bundle.dll.js:489 invoke @ vendors.bundle.dll.js:489 forEach.prototype.<computed> @ vendors.bundle.dll.js:489 asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 fetch @ commons.bundle.js:3 _request @ commons.bundle.js:3 getFieldsForWildcard @ commons.bundle.js:3 fetchForWildcard @ commons.bundle.js:3 fetch @ commons.bundle.js:3 _callee9$ @ commons.bundle.js:3 tryCatch @ vendors.bundle.dll.js:489 invoke @ vendors.bundle.dll.js:489 forEach.prototype.<computed> @ vendors.bundle.dll.js:489 asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 _fetchFields @ commons.bundle.js:3 refreshFields @ commons.bundle.js:3 _callee$ @ commons.bundle.js:3 tryCatch @ vendors.bundle.dll.js:489 invoke @ vendors.bundle.dll.js:489 forEach.prototype.<computed> @ vendors.bundle.dll.js:489 asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 indexFields @ commons.bundle.js:3 _callee2$ @ commons.bundle.js:3 tryCatch @ vendors.bundle.dll.js:489 invoke @ vendors.bundle.dll.js:489 forEach.prototype.<computed> @ vendors.bundle.dll.js:489 asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 updateFromElasticSearch @ commons.bundle.js:3 _callee3$ @ commons.bundle.js:3 tryCatch @ vendors.bundle.dll.js:489 invoke @ vendors.bundle.dll.js:489 forEach.prototype.<computed> @ vendors.bundle.dll.js:489 asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 Promise.then (async) asyncGeneratorStep @ commons.bundle.js:3 _next @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 init @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 (anonymous) @ kibana.bundle.js:3 Promise.then (async) ip @ kibana.bundle.js:3 invoke @ vendors.bundle.dll.js:435 (anonymous) @ commons.bundle.js:3 processQueue @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:435 $digest @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:435 completeTask @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:435 setTimeout (async) Browser.self.defer @ vendors.bundle.dll.js:435 $evalAsync @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:435 scheduleProcessQueue @ vendors.bundle.dll.js:435 $$resolve @ vendors.bundle.dll.js:435 doResolve @ vendors.bundle.dll.js:435 Promise.then (async) $$resolve @ vendors.bundle.dll.js:435 resolvePromise @ vendors.bundle.dll.js:435 Deferred.resolve @ vendors.bundle.dll.js:435 _module.service.Promise.resolve @ commons.bundle.js:3 _module.service.Promise.try @ commons.bundle.js:3 (anonymous) @ commons.bundle.js:3 _module.service.Promise.map @ commons.bundle.js:3 invokeEach @ commons.bundle.js:3 doWork @ commons.bundle.js:3 invoke @ vendors.bundle.dll.js:435 __prep__ @ commons.bundle.js:3 invoke @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:257 forEach @ vendors.bundle.dll.js:435 resolveLocals @ vendors.bundle.dll.js:257 processQueue @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:435 $digest @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:435 (anonymous) @ vendors.bundle.dll.js:435 forEach @ vendors.bundle.dll.js:435 fireStateOrUrlChange @ vendors.bundle.dll.js:435 cacheStateAndFireUrlChange @ vendors.bundle.dll.js:435 dispatch @ vendors.bundle.dll.js:429 elemData.handle @ vendors.bundle.dll.js:429 Show 36 more frames
Provide logs and/or server output (if relevant):
Any additional context:
Using nginx as proxy_pass
The text was updated successfully, but these errors were encountered: