-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Feature:Saved ObjectsTeam:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//
Description
Tested on newest master revision of kibana: 32ab00be5c3519955d91ac79d4818ac944ce07eb
First time when forking the kibana repository, after running yarn kbn bootstrap and want to run yarn start you might get this error:
$ node --trace-warnings --throw-deprecation scripts/kibana --dev
log [22:17:22.363] [warning][plugins-discovery] Explicit plugin paths [D:\Projects\kibana\x-pack] are only supported in development. Relative imports will not work in production.
log [22:17:22.922] [info][plugins-service] Plugin "endpoint" is disabled.
log [22:17:22.956] [warning][legacy-plugins] Unable to scan directory for plugins "D:\Projects\kibana\plugins"
log [22:17:29.702] [info][plugins-service] Plugin initialization disabled.
log [22:17:29.881] [fatal][root] TypeError: Cannot read property 'properties' of undefined
at assertIsSupportedIndex (D:\Projects\kibana\src\core\server\saved_objects\migrations\core/elastic_index.ts:284:32)
at fetchInfo (D:\Projects\kibana\src\core\server\saved_objects\migrations\core/elastic_index.ts:60:10)
at process._tickCallback (internal/process/next_tick.js:68:7)
FATAL TypeError: Cannot read property 'properties' of undefined
This happens because it is assumed that fetchInfo will always return an amount of indicies. If the elasticsearch.host is misconfigured or the username/password applied is wrong however, it will break like this.
It might be wise to apply a pre-check before running fetchInfo or catch the error somehow here:
https://github.com/elastic/kibana/blob/master/src/core/server/saved_objects/migrations/core/elastic_index.ts#L43
Metadata
Metadata
Assignees
Labels
Feature:Saved ObjectsTeam:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//