[Solved] Kibana 6.8.1 unable to connect to Elastic with xpack settings disabled

Hello,

I did the upgrade from ELK 5.6.4 to 6.8.1.

The kibana use to work in the simple way as possible, without authentication.

The ES cluster is already running with xpack.security.enabled: false in elasticsearch.yml:

$  curl -s -XGET 'localhost:9200/_xpack' | jq .[].security
{
  "description": "Security for the Elastic Stack",
  "available": true,
  "enabled": false
}

But kibana says "Cannot connect to the Elasticsearch cluster" by default.

If I use the config xpack.security.enabled: false in kibana.yml, I got: "This page isn’t working localhost redirected you too many times"

$ curl -I http://localhost:5601/ -L
HTTP/1.1 302 Found
location: /app/kibana
kbn-name: kibana
content-type: text/html; charset=utf-8
cache-control: no-cache
content-length: 0
connection: close
Date: Sat, 29 Jun 2019 21:22:28 GMT

HTTP/1.1 302 Found
location: /
kbn-name: kibana
content-type: text/html; charset=utf-8
cache-control: no-cache
content-length: 0
connection: close
Date: Sat, 29 Jun 2019 21:22:28 GMT

HTTP/1.1 302 Found
location: /app/kibana
kbn-name: kibana
content-type: text/html; charset=utf-8
cache-control: no-cache
content-length: 0
connection: close
Date: Sat, 29 Jun 2019 21:22:28 GMT
....
curl: (47) Maximum (50) redirects followed

This is a new installation, with new machine and new index (.kibana-testing)

Relevant logs:

"Request will be handled by proxy GET:/app/kibana."
"Verifying access to space \"default\""
"Unable to navigate to space \"default\", redirecting to Space Selector. Error: Saved object [space/default] not found"
"GET /app/kibana 302 30ms - 9.0B"
"Event is being forwarded: connection"
"Request will be handled by proxy GET:/."
"GET / 302 30ms - 9.0B"
"Event is being forwarded: connection"
"Request will be handled by proxy GET:/app/kibana."
"Verifying access to space \"default\""
"Unable to navigate to space \"default\", redirecting to Space Selector. Error: Saved object [space/default] not found"
"GET /app/kibana 302 32ms - 9.0B"
"Event is being forwarded: connection"
"Request will be handled by proxy GET:/."
"GET / 302 40ms - 9.0B"
"Event is being forwarded: connection"
"Request will be handled by proxy GET:/app/kibana."
"Verifying access to space \"default\""
"Unable to navigate to space \"default\", redirecting to Space Selector. Error: Saved object [space/default] not found"
"GET /app/kibana 302 37ms - 9.0B"
"Event is being forwarded: connection"
"Request will be handled by proxy GET:/."

What can we do to just use Kibana 6.8.1?
Thanks!

sup @Tiago_Cruz

Change your ElasticSearch yml around and try this

xpack.ml.enabled: false
xpack.security.enabled: false
pack.license.self_generated.type: basic
xpack.security.authc.anonymous.roles: superuser
1 Like

if you need any help I can give you my discord. Had this same issue :smiley:

Thanks jordan!

I believe that the correct line is xpack.license.self_generated.type, right?

Many thanks by your help, I do trust in you, hahahaha... But I need do schedule the cluster rolling restart to apply this change... anyway, I'll post here the result as soon as possible.

Thanks!

1 Like

xpack.license.self_generated.type: basic

Let me make a quick edit (it is xpack.license.self_generated.type: basic not pack.license.self_generated.type: basic)

xpack.ml.enabled: false
xpack.security.enabled: false
xpack.license.self_generated.type: basic
xpack.security.authc.anonymous.roles: superuser

Xpack will self sign a cert when you do xpack.license.self_generated.type: basic

I am like 90% positive of that

1 Like

Thanks @iukea!

You're the guy, it worked perfectly!

[tiago.cruz@creta1 ~]$ sudo grep ^xpack /etc/elasticsearch/elasticsearch.yml
xpack.security.authc.accept_default_password: false
xpack.ml.enabled: false
xpack.license.self_generated.type: basic
xpack.security.authc.anonymous.roles: superuser
xpack.security.enabled: false

Many thanks!

woooot!!!

message me if you ever need any help :smiley:

Hi Jordan, I work with Tiago, just to complement. First of all, I needed to create a license:

curl -X POST "localhost:9200/_license/start_basic"

ah cool thanks for the update!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.