Login is currently disabled.issue


(Nuwan Vithanage) #1

I am trying elastic 6 and elastic is running fine. But Kibana Login page is disabled. I didn't found anything in the kibana logs to resolve this issue.

Got following error too

[root@915453-elastic2 elasticsearch]# /usr/share/elasticsearch/bin/x-pack/setup-passwords interactive

Connection failure to: http://127.0.0.1:9200/_xpack/security/_authenticate?pretty failed: Connection refused (Connection refused)

ERROR: Failed to connect to elasticsearch at http://127.0.0.1:9200/_xpack/security/_authenticate?pretty. Is the URL correct and elasticsearch running?
[root@915453-elastic2 elasticsearch]#


(Ioannis Kakavas) #2

So is Elasticsearch starting up fine with no errors in the logs? How do you access it ?

Where is Elasticsearch installed ? Is it on the same machine as Kibana ?

I see you access Kibana on 172.24.36.217 but setup-passwords is trying to access Elasticsearch at localhost which means that your elasticsearch.yml contains 127.0.0.1 as the host.

The problem you're facing is that Kibana can't access Elasticsearch, and the reason for that will be in your kibana logs.

Can you share the relevant parts of your config and logs?


(Nuwan Vithanage) #3

‚óŹ elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-05-08 08:32:56 EDT; 18min ago
Docs: http://www.elastic.co
Process: 78337 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 78337 (code=exited, status=1/FAILURE)

May 08 08:32:49 915453-elastic2.newfrontierdata.com systemd[1]: Started Elasticsearch.
May 08 08:32:49 915453-elastic2.newfrontierdata.com systemd[1]: Starting Elasticsearch...
May 08 08:32:56 915453-elastic2.newfrontierdata.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
May 08 08:32:56 915453-elastic2.newfrontierdata.com systemd[1]: Unit elasticsearch.service entered failed state.
May 08 08:32:56 915453-elastic2.newfrontierdata.com systemd[1]: elasticsearch.service failed

Kibana also installed in same machine

which config and logs do you require ?


(Nuwan Vithanage) #4

[root@915453-elastic2 elasticsearch]# cat elasticsearch.yml

======================== Elasticsearch Configuration =========================

NOTE: Elasticsearch comes with reasonable defaults for most settings.

Before you set out to tweak and tune the configuration, make sure you

understand what are you trying to accomplish and the consequences.

The primary way of configuring a node is via this file. This template lists

the most important settings you may want to configure for a production cluster.

Please consult the documentation for further information on configuration options:

https://www.elastic.co/guide/en/elasticsearch/reference/index.html

---------------------------------- Cluster -----------------------------------

Use a descriptive name for your cluster:

#cluster.name: newfrontierdata-cluster

------------------------------------ Node ------------------------------------

Use a descriptive name for the node:

#node.name: 915453-Elastic2.newfrontierdata.com

Add custom attributes to the node:

#node.attr.rack: r1

----------------------------------- Paths ------------------------------------

Path to directory where to store the data (separate multiple locations by comma):

path.data: /var/lib/elasticsearch

Path to log files:

path.logs: /var/log/elasticsearch

----------------------------------- Memory -----------------------------------

Lock the memory on startup:

#bootstrap.memory_lock: true

Make sure that the heap size is set to about half the memory available

on the system and that the owner of the process is allowed to use this

limit.

Elasticsearch performs poorly when the system is swapping the memory.

---------------------------------- Network -----------------------------------

Set the bind address to a specific IP (IPv4 or IPv6):

#network.host: 0.0.0.0

Set a custom port for HTTP:

#http.port: 9200

For more information, consult the network module documentation.

--------------------------------- Discovery ----------------------------------

Pass an initial list of hosts to perform discovery when new node is started:

The default list of hosts is ["127.0.0.1", "[::1]"]

#discovery.zen.ping.unicast.hosts: ["172.24.32.216", "172.24.36.217" , "172.24.36.218", "172.24.32.209"]

Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

#discovery.zen.minimum_master_nodes: 4

For more information, consult the zen discovery module documentation.

---------------------------------- Gateway -----------------------------------

Block initial recovery after a full cluster restart until N nodes are started:

#gateway.recover_after_nodes: 3

For more information, consult the gateway module documentation.

---------------------------------- Various -----------------------------------

Require explicit names when deleting indices:

#action.destructive_requires_name: true

xpack.security.transport.ssl.enabled: true

set license type (follow is the trial license)
xpack.license.self_generated.type: trial

set Monitoring (enabled)

xpack.monitoring.enabled: true

set Security (disabled)

xpack.security.enabled: false

set Watcher (disabled)

xpack.watcher.enabled: false

set Machine learning (disabled)

xpack.ml.enabled: false


(Ioannis Kakavas) #5

Please make the effort to format your post to be as readable as possible - there's a live preview panel for exactly this reasons.
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Config files should be entered as preformatted text (the </> button) so that they display correctly and can be read by the people who are trying help you.

Elasticsearch is not running fine as it failed to start. Kibana can't connect to it for that reason, and this is the problem you need to address first.

Check the elasticsearch log (/var/log/elasticsearch/elasticsearch.log) for indications on what is actually wrong.


(Nuwan Vithanage) #6

Sorry for that.I'm going to uninstall X-pack and reinstall it.


(Ioannis Kakavas) #7

I think a better approach might be to check the logs and see what's failing. Feel free to share the relevant parts here so that we can assist you. If this is a configuration error for instance, reinstalling X-Pack won't accomplish much with regards to solving your issue.


(Nuwan Vithanage) #8

Yes absolutely correct . Problem fixed

xpack.license.self_generated.type: trial
xpack.monitoring.enabled: true

enable Security

xpack.security.enabled: true
xpack.watcher.enabled: false
xpack.ml.enabled: false


(Nuwan Vithanage) #9

Thank you very much for helping me ........:grinning:


(system) #10

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