Elastic Search can't setup password for Kibana

Hi !
I'm a new user of the ELK suite.
I would like to collect my log files onseveral server and put them on a central server.
To do so, I use rsyslog.
I succeed having them on my server but know I would like to improve security.
With 7.3.0 version, I can enable x-pack security in the YML file elasticsearch.yml.
As written on the tutorial, I have put the following lines :
xpack.security.enabled : true
xpack.security.authc.accept_default_password
discovery.type: single-node
And after, I have put the following lines :
elasticsearch.username: "kibana"
elasticsearch.password: "pass"
There were as comments by default.
But when I run elasticsearch and Kibana there is no login panel.
I have thought that I should have default login and default password but it's not the case.
How can I repair this problem ?

Thank you !

Which tutorial do you use?

We haven't been using default passwords for some time now.

I would start from here and walk through this tutorial

Ok thank you so much for your fast response.
I start this tutorial right now.

Ok I had tried this one.
The problem I have had is that I receive this message from my PowerShell :
"Unexpected response code [405] from calling GET http://127.0.0.1:9200/_security/_authenticate?pretty
It doesn't look like the X-Pack security feature is enabled on this Elasticsearch node.
Please check if you have enabled X-Pack security in your elasticsearch.yml configuration file.

ERROR: X-Pack Security is disabled by configuration."
It comes with error 405.

I presume that GET request is enable by default instead of POST.
But when I modify the request to do a POST I have an error 400.

The error says that you haven't set xpack.security.enabled: true in your elasticsearch.yml which is actually one of the first steps in the link you were to follow in https://www.elastic.co/guide/en/elastic-stack-overview/current/get-started-enable-security.html. Did you do that ?

It's always much more helpful to include information regarding what you have done already and what is your current configuration.

Yet, I have added the command "xpack.security.enabled : true" in my "elasticsearch.yml" file.
This very one loks like this :

    # ======================== 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

    xpack.security.enabled : true 
    # ---------------------------------- Cluster -----------------------------------
    #
    # Use a descriptive name for your cluster:
    #
    #cluster.name: my-application
    #
    # ------------------------------------ Node ------------------------------------
    #
    # Use a descriptive name for the node:
    #
    #node.name: node-1
    #
    # 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: /path/to/data
    #
    # Path to log files:
    #
    #path.logs: /path/to/logs
    #
    # ----------------------------------- 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: 192.168.0.1
    #
    # 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 this node is started:
    # The default list of hosts is ["127.0.0.1", "[::1]"]
    #
    #discovery.seed_hosts: ["host1", "host2"]
    #
    # Bootstrap the cluster using an initial set of master-eligible nodes:
    #
    #cluster.initial_master_nodes: ["node-1", "node-2"]
    #
    # For more information, consult the discovery and cluster formation 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

Do I have to put a special command on my Powershell like like "-f" for logstash ?
As you can see, evertything is set to default except xpack.security.
I first run elasticsearch using .\elasticsearch and then kibana with .\kibana.bat.
The configuration file for Kibana is the following :

    # Kibana is served by a back end server. This setting specifies the port to use.
        #server.port: 5601

    # Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
    # The default is 'localhost', which usually means remote machines will not be able to connect.
    # To allow connections from remote users, set this parameter to a non-loopback address.
    #server.host: "localhost"

    # Enables you to specify a path to mount Kibana at if you are running behind a proxy.
    # Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
    # from requests it receives, and to prevent a deprecation warning at startup.
    # This setting cannot end in a slash.
    #server.basePath: ""

    # Specifies whether Kibana should rewrite requests that are prefixed with
    # `server.basePath` or require that they are rewritten by your reverse proxy.
    # This setting was effectively always `false` before Kibana 6.3 and will
    # default to `true` starting in Kibana 7.0.
    #server.rewriteBasePath: false

    # The maximum payload size in bytes for incoming server requests.
    #server.maxPayloadBytes: 1048576

    # The Kibana server's name.  This is used for display purposes.
    #server.name: "your-hostname"

    # The URLs of the Elasticsearch instances to use for all your queries.
    #elasticsearch.hosts: ["http://localhost:9200"]

    # When this setting's value is true Kibana uses the hostname specified in the server.host
    # setting. When the value of this setting is false, Kibana uses the hostname of the host
    # that connects to this Kibana instance.
    #elasticsearch.preserveHost: true

    # Kibana uses an index in Elasticsearch to store saved searches, visualizations and
    # dashboards. Kibana creates a new index if the index doesn't already exist.
    #kibana.index: ".kibana"

    # The default application to load.
    #kibana.defaultAppId: "home"

    # If your Elasticsearch is protected with basic authentication, these settings provide
    # the username and password that the Kibana server uses to perform maintenance on the Kibana
    # index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
    # is proxied through the Kibana server.
    elasticsearch.username: "kibana"
    elasticsearch.password: "pass"

    # Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
    # These settings enable SSL for outgoing requests from the Kibana server to the browser.
    #server.ssl.enabled: false
    #server.ssl.certificate: /path/to/your/server.crt
    #server.ssl.key: /path/to/your/server.key

    # Optional settings that provide the paths to the PEM-format SSL certificate and key files.
    # These files validate that your Elasticsearch backend uses the same key files.
    #elasticsearch.ssl.certificate: /path/to/your/client.crt
    #elasticsearch.ssl.key: /path/to/your/client.key

    # Optional setting that enables you to specify a path to the PEM file for the certificate
    # authority for your Elasticsearch instance.
    #elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

    # To disregard the validity of SSL certificates, change this setting's value to 'none'.
    #elasticsearch.ssl.verificationMode: full

    # Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
    # the elasticsearch.requestTimeout setting.
    #elasticsearch.pingTimeout: 1500

    # Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
    # must be a positive integer.
    #elasticsearch.requestTimeout: 30000

    # List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
    # headers, set this value to [] (an empty list).
    #elasticsearch.requestHeadersWhitelist: [ authorization ]

    # Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
    # by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
    #elasticsearch.customHeaders: {}

    # Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
    #elasticsearch.shardTimeout: 30000

    # Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
    #elasticsearch.startupTimeout: 5000

    # Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
    #elasticsearch.logQueries: false

    # Specifies the path where Kibana creates the process ID file.
    #pid.file: /var/run/kibana.pid

    # Enables you specify a file where Kibana stores log output.
    #logging.dest: stdout

    # Set the value of this setting to true to suppress all logging output.
    #logging.silent: false

    # Set the value of this setting to true to suppress all logging output other than error messages.
    #logging.quiet: false

    # Set the value of this setting to true to log all events, including system usage information
    # and all requests.
    #logging.verbose: false

    # Set the interval in milliseconds to sample system and process performance
    # metrics. Minimum is 100ms. Defaults to 5000.
    #ops.interval: 5000

    # Specifies locale to be used for all localizable strings, dates and number formats.
    # Supported languages are the following: English - en , by default , Chinese - zh-CN . 
    #i18n.locale: "en"

let's focus on Elasticsearch for now. Can you try to run elasticsearch-setup-passwords interactive again and share the exact output of the command and the elasticserach.log file contents ?

The following is the result in my PowerShell for .\elasticsearch-setup-passwords interactive

			Connection failure to: http://127.0.0.1:9200/_security/_authenticate?pretty failed: Connection refused: connect

			ERROR: Failed to connect to elasticsearch at http://127.0.0.1:9200/_security/_authenticate?pretty. Is the URL correct and elasticsearch running?

And the last log file I have in my C:\ProgramData\Elastic\Elasticsearch\logs repository says :

[2019-08-14T10:10:33,521][INFO ][o.e.e.NodeEnvironment    ] [DESKTOP-6CO7VPM] using [1] data paths, mounts [[Windows  (C:)]], net usable_space [39.6gb], net total_space [191gb], types [NTFS]
			[2019-08-14T10:10:33,554][INFO ][o.e.e.NodeEnvironment    ] [DESKTOP-6CO7VPM] heap size [1.9gb], compressed ordinary object pointers [true]
			[2019-08-14T10:10:33,694][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] node name [DESKTOP-6CO7VPM], node ID [aFPF-fuCTnC81UhMuQaQvw], cluster name [elasticsearch]
			[2019-08-14T10:10:33,694][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] version[7.3.0], pid[7404], build[default/zip/de777fa/2019-07-24T18:30:11.767338Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/12.0.1/12.0.1+12]
			[2019-08-14T10:10:33,694][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] JVM home [C:\Users\dalho\OneDrive\Bureau\ELK\elasticsearch-7.3.0-windows-x86_64\elasticsearch-7.3.0\jdk]
			[2019-08-14T10:10:33,694][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=C:\Users\dalho\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -Xmx2048m, -Xms2048m, -Dio.netty.allocator.type=pooled, -XX:MaxDirectMemorySize=1073741824, -Delasticsearch, -Des.path.home=C:\Users\dalho\OneDrive\Bureau\ELK\elasticsearch-7.3.0-windows-x86_64\elasticsearch-7.3.0, -Des.path.conf=C:\ProgramData\Elastic\Elasticsearch\config, -Des.distribution.flavor=default, -Des.distribution.type=zip, -Des.bundled_jdk=true]
			[2019-08-14T10:10:50,706][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [aggs-matrix-stats]
			[2019-08-14T10:10:50,707][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [analysis-common]
			[2019-08-14T10:10:50,708][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [data-frame]
			[2019-08-14T10:10:50,708][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [flattened]
			[2019-08-14T10:10:50,709][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [ingest-common]
			[2019-08-14T10:10:50,709][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [ingest-geoip]
			[2019-08-14T10:10:50,710][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [ingest-user-agent]
			[2019-08-14T10:10:50,711][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [lang-expression]
			[2019-08-14T10:10:50,712][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [lang-mustache]
			[2019-08-14T10:10:50,712][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [lang-painless]
			[2019-08-14T10:10:50,712][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [mapper-extras]
			[2019-08-14T10:10:50,713][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [parent-join]
			[2019-08-14T10:10:50,713][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [percolator]
			[2019-08-14T10:10:50,713][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [rank-eval]
			[2019-08-14T10:10:50,714][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [reindex]
			[2019-08-14T10:10:50,714][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [repository-url]
			[2019-08-14T10:10:50,715][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [transport-netty4]
			[2019-08-14T10:10:50,715][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [vectors]
			[2019-08-14T10:10:50,716][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-ccr]
			[2019-08-14T10:10:50,716][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-core]
			[2019-08-14T10:10:50,716][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-deprecation]
			[2019-08-14T10:10:50,717][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-graph]
			[2019-08-14T10:10:50,717][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-ilm]
			[2019-08-14T10:10:50,720][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-logstash]
			[2019-08-14T10:10:50,720][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-ml]
			[2019-08-14T10:10:50,720][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-monitoring]
			[2019-08-14T10:10:50,721][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-rollup]
			[2019-08-14T10:10:50,721][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-security]
			[2019-08-14T10:10:50,721][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-sql]
			[2019-08-14T10:10:50,722][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-voting-only-node]
			[2019-08-14T10:10:50,722][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] loaded module [x-pack-watcher]
			[2019-08-14T10:10:50,723][INFO ][o.e.p.PluginsService     ] [DESKTOP-6CO7VPM] no plugins loaded
			[2019-08-14T10:10:54,921][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [DESKTOP-6CO7VPM] [controller/16552] [Main.cc@110] controller (64 bit): Version 7.3.0 (Build ff2f774f78ce63) Copyright (c) 2019 Elasticsearch BV
			[2019-08-14T10:10:55,749][INFO ][o.e.d.DiscoveryModule    ] [DESKTOP-6CO7VPM] using discovery type [zen] and seed hosts providers [settings]
				[2019-08-14T10:10:56,397][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] initialized
			[2019-08-14T10:10:56,397][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] starting ...
			[2019-08-14T10:10:57,380][INFO ][o.e.t.TransportService   ] [DESKTOP-6CO7VPM] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
			[2019-08-14T10:10:57,386][WARN ][o.e.b.BootstrapChecks    ] [DESKTOP-6CO7VPM] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
			[2019-08-14T10:10:57,390][INFO ][o.e.c.c.Coordinator      ] [DESKTOP-6CO7VPM] cluster UUID [fYpMGnUsRmO8nM6Gn8UKNg]
			[2019-08-14T10:10:57,402][INFO ][o.e.c.c.ClusterBootstrapService] [DESKTOP-6CO7VPM] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered
			[2019-08-14T10:10:57,509][INFO ][o.e.c.s.MasterService    ] [DESKTOP-6CO7VPM] elected-as-master ([1] nodes joined)[{DESKTOP-6CO7VPM}{aFPF-fuCTnC81UhMuQaQvw}{LyGAgIERSmWfCFw2-0pTWg}{127.0.0.1}{127.0.0.1:9300}{dim}{ml.machine_memory=8480055296, xpack.installed=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 12, version: 212, reason: master node changed {previous [], current [{DESKTOP-6CO7VPM}{aFPF-fuCTnC81UhMuQaQvw}{LyGAgIERSmWfCFw2-0pTWg}{127.0.0.1}{127.0.0.1:9300}{dim}{ml.machine_memory=8480055296, xpack.installed=true, ml.max_open_jobs=20}]}
			[2019-08-14T10:10:57,772][INFO ][o.e.c.s.ClusterApplierService] [DESKTOP-6CO7VPM] master node changed {previous [], current [{DESKTOP-6CO7VPM}{aFPF-fuCTnC81UhMuQaQvw}{LyGAgIERSmWfCFw2-0pTWg}{127.0.0.1}{127.0.0.1:9300}{dim}{ml.machine_memory=8480055296, xpack.installed=true, ml.max_open_jobs=20}]}, term: 12, version: 212, reason: Publication{term=12, version=212}
			[2019-08-14T10:10:57,944][INFO ][o.e.c.s.ClusterSettings  ] [DESKTOP-6CO7VPM] updating [xpack.monitoring.collection.enabled] from [false] to [true]
			[2019-08-14T10:10:58,703][INFO ][o.e.l.LicenseService     ] [DESKTOP-6CO7VPM] license [da84006e-3f9e-4ed5-b393-22c9525a1489] mode [basic] - valid
			[2019-08-14T10:10:58,719][INFO ][o.e.g.GatewayService     ] [DESKTOP-6CO7VPM] recovered [21] indices into cluster_state
			[2019-08-14T10:10:58,750][INFO ][o.e.h.AbstractHttpServerTransport] [DESKTOP-6CO7VPM] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
			[2019-08-14T10:10:58,751][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] started
			[2019-08-14T10:11:01,696][INFO ][o.e.c.r.a.AllocationService] [DESKTOP-6CO7VPM] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana_task_manager][0]] ...]).
			[2019-08-14T10:11:08,325][INFO ][o.e.c.m.MetaDataCreateIndexService] [DESKTOP-6CO7VPM] [.monitoring-es-7-2019.08.14] creating index, cause [auto(bulk api)], templates [.monitoring-es], shards [1]/[0], mappings [_doc]
			[2019-08-14T10:56:42,064][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] stopping ...
			[2019-08-14T10:56:42,119][INFO ][o.e.x.w.WatcherService   ] [DESKTOP-6CO7VPM] stopping watch service, reason [shutdown initiated]
			[2019-08-14T10:56:42,152][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [DESKTOP-6CO7VPM] [controller/16552] [Main.cc@150] Ml controller exiting
			[2019-08-14T10:56:42,157][INFO ][o.e.x.m.p.NativeController] [DESKTOP-6CO7VPM] Native controller process has stopped - no new native processes can be started
			[2019-08-14T10:56:43,165][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] stopped
			[2019-08-14T10:56:43,166][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] closing ...
			[2019-08-14T10:56:43,194][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] closed
[2019-08-14T10:10:58,751][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] started
[2019-08-14T10:11:01,696][INFO ][o.e.c.r.a.AllocationService] [DESKTOP-6CO7VPM] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana_task_manager][0]] ...]).
[2019-08-14T10:11:08,325][INFO ][o.e.c.m.MetaDataCreateIndexService] [DESKTOP-6CO7VPM] [.monitoring-es-7-2019.08.14] creating index, cause [auto(bulk api)], templates [.monitoring-es], shards [1]/[0], mappings [_doc]
[2019-08-14T10:56:42,064][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] stopping ...
[2019-08-14T10:56:42,119][INFO ][o.e.x.w.WatcherService   ] [DESKTOP-6CO7VPM] stopping watch service, reason [shutdown initiated]
[2019-08-14T10:56:42,152][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [DESKTOP-6CO7VPM] [controller/16552] [Main.cc@150] Ml controller exiting
[2019-08-14T10:56:42,157][INFO ][o.e.x.m.p.NativeController] [DESKTOP-6CO7VPM] Native controller process has stopped - no new native processes can be started
[2019-08-14T10:56:43,165][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] stopped
[2019-08-14T10:56:43,166][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] closing ...
[2019-08-14T10:56:43,194][INFO ][o.e.n.Node               ] [DESKTOP-6CO7VPM] closed

Your node started at 10:10:58 and then stopped at 10:56:42.

Given your error above :

Connection failure to: http://127.0.0.1:9200/_security/_authenticate?pretty failed: Connection refused: connect
ERROR: Failed to connect to elasticsearch at http://127.0.0.1:9200/_security/_authenticate?pretty. Is the URL correct and elasticsearch running?

it looks like you ran the command after 10:56:42 when elasticsearch was already stopped. Is this the case?

p.s note that this is not the error message that you originally reported getting.

1 Like

Ok I just notice that there is another config file in another repository.

    bootstrap.memory_lock: false
    cluster.name: elasticsearch
    http.port: 9200
    node.data: true
    node.ingest: true
    node.master: true
    node.name: DESKTOP-6CO7VPM
    path.data: C:\ProgramData\Elastic\Elasticsearch\data
    path.logs: C:\ProgramData\Elastic\Elasticsearch\logs
    transport.tcp.port: 9300
    xpack.license.self_generated.type: basic
    xpack.security.enabled: true

But when I do .\elasticsearch-setup-password interactive, I have the following result.

.\elasticsearch-setup-passwords interactive
Connection failure to: http://127.0.0.1:9200/_security/_authenticate?pretty failed: Connection refused: connect
ERROR: Failed to connect to elasticsearch at http://127.0.0.1:9200/_security/_authenticate?pretty. Is the URL correct and elasticsearch running?

I think this is because I connect myself to elasticsearch with localhost:9200 instead of 127.0.0.1:9200.
What do you think about it ?

Ok I've changed the configuration file to :

    bootstrap.memory_lock: false
    cluster.name: elasticsearch
    http.port: 9200
    network.host : localhost
    node.data: true
    node.ingest: true
    node.master: true
    node.name: DESKTOP-6CO7VPM
    path.data: C:\ProgramData\Elastic\Elasticsearch\data
    path.logs: C:\ProgramData\Elastic\Elasticsearch\logs
    transport.tcp.port: 9300
    xpack.license.self_generated.type: basic
    xpack.security.enabled: true

This is now working on 127.0.0.1:9200 with an login panel at the begining of the connection.
Then I've started .\elasticsearch-setup-passwords interactive and I changed passwords for elastic/apm_system/kibana/logstash_system/beats_system/remote_monitoring_user.

After that I could connect my self to elasticsearch.
I will now try to do it with kibana.

Thank you for your useful help.
I've just succeed to create my profiles.
It works now on Kibana.

1 Like

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