Cannot disable security in 8.1

I need Elasticsearch without any security. In 7.17 it was enough to set xpack.security.enabled: false, but in 8.1.0 got error on startup:
org.elasticsearch.ElasticsearchSecurityException: invalid configuration for xpack.security.transport.ssl - [xpack.security.transport.ssl.enabled] is not set, but the following settings have been configured in elasticsearch.yml : [xpack.security.transport.ssl.keystore.secure_password,xpack.security.transport.ssl.truststore.secure_password]
but my Elasticsearch.yml is pretty simple

cluster.name: test
node.name: test1
path.data: /var/lib/Elasticsearch
path.logs: /var/log/Elasticsearch
network.host: 0.0.0.0
http.port: 80
xpack.security.enabled: false

Please help

Hi there, as you have figured out, security features are enabled and configured by default. We strongly suggest that you keep it this way so that your data are protected. If this doesn't fit your use case and you still want to disable security, you can

Before starting Elasticsearch for the first time

Set xpack.security.enabled: false and then start Elasticsearch

After you have started Elasticsearch for the first time

You have two options here

  1. Set

    xpack.security.enabled: false
    xpack.security.transport.ssl.enabled: false
    xpack.security.http.ssl.enabled: false
    

    and then start Elasticsearch.

  2. Run

    bin/elasticsearch-keystore remove xpack.security.transport.ssl.keystore.secure_password
    bin/elasticsearch-keystore remove xpack.security.transport.ssl.truststore.secure_password
    bin/elasticsearch-keystore remove xpack.security.http.ssl.keystore.secure_password
    

    Set

    xpack.security.enabled: false
    

    and then start Elasticsearch.

Thanks. First step fixed startup for me

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