How to disable SSL locally?

Hey all - I have a single test instance of opensearch running locally via this docker command:

docker run -d --name os1 -p 9200:9200 -p 9300:9300 -e " true" -e "opendistro_security.ssl.http.enabled: false" -e "discovery.type=single-node" -e "script.painless.regex.enabled=true" opensearchproject/opensearch:1.0.0

I am not able to get the regular response running curl localhost:9200 - it is always throwing this exception:

io.netty.handler.codec.DecoderException: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record

I thought I disabled what I needed in the docker run command (opendistro_security.ssl.http.enabled: false and true), but perhaps not?

Would love any tips. Thanks!

FWIW, passing these params via docker run didn’t work - I had to ssh into the docker container using docker exec -it <container-id> /bin/bash and then modified the /usr/share/opensearch/config/opensearch.yml file – I just replaced all the demo security config settings in there with a single line true

Stopping and starting the container with the same command then caused the curl localhost:9200 to come back without the SSL exception.


Alternatively, you could attach opensearch.yml file with desired settings to your docker run and avoid doing it manually inside the docker.