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

1 Like

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.

1 Like

Thanks. First step fixed startup for me

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