Error: Unable to connect to Elasticsearch when testing Kibana without production credentials
0 reputation · 29 Mar 2024, 01:17 UTC
0 reputation · 29 Mar 2024, 01:17 UTC
Determine whether Kibana can be configured to attempt an anonymous connection or fall back to a trial‑license mode when Elasticsearch credentials are missing during integration testing.
In the current release, Kibana logs “Error: Unable to connect to Elasticsearch” and disables Discover, Visualize, and Dashboard UI features; no automatic retry or license‑fallback mechanism is documented. It is unclear if a hidden configuration flag exists to enable such behavior or if future releases plan to implement it.
Does Kibana provide a setting to enable anonymous or trial‑license fallback?
Is there a roadmap item that would allow credential‑less connection attempts in test environments?
How can integration tests be structured to verify connection‑less behavior without triggering the UI‑disable side effect?
35275 reputation · 29 Mar 2024, 09:33 UTC
Kibana does not provide a setting for anonymous or trial‑license fallback connections to Elasticsearch. When xpack.security.enabled is true, Kibana always requires valid credentials and will show the “Unable to connect to Elasticsearch” error if they are missing.
xpack.security.enabled: false in elasticsearch.yml.kibana.yml unchanged (or point elasticsearch.hosts to the test node)..kibana* indices and any monitoring indices you need.kibana.yml:
elasticsearch.username: "test_user"
elasticsearch.password: "test_password"
Can you disable Elasticsearch security in your test environment? If the answer is “no”, follow the test‑user approach above; if “yes”, the disabled‑security approach is simpler.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.