Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OS of the server running the container:
Ubuntu 24.04 LTS
Docker:
docker-ce/noble,now 5:27.5.1-1~ubuntu.24.04~noble amd64
docker-compose-plugin/noble,now 2.32.4-1~ubuntu.24.04~noble amd64
Docker images:
opensearchproject/opensearch:latest
opensearchproject/opensearch-dashboards:latest
Describe the issue:
I created a self-signed certificate and docker-compose.yml following the official documentation.
After starting each container, when accessing https://<Host_IP_Address>:5601 remotely, the page displays:
“OpenSearch Dashboards server is not ready yet”, and the OpenSearch Dashboards screen does not load.
Configuration:
Regarding the self-signed certificate, I followed the steps from “Generate a private key” to “Generate an admin certificate” on the following site to generate admin.pem
, admin-key.pem
, and root-ca.pem
.
https://opensearch.org/docs/latest/security/configuration/generate-certificates/
For the docker-compose.yml
file, I referred to the configuration values at the bottom of the following page:
https://opensearch.org/docs/latest/install-and-configure/install-dashboards/tls/
The specific content of docker-compose.yml
is attached below.
services:
opensearch:
image: opensearchproject/opensearch:latest
hostname: opensearch-node1
container_name: opensearch-node1
environment:
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- bootstrap.memory_lock=true
- "DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI=true"
- cluster.routing.allocation.disk.threshold_enabled=false
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- node.store.allow_mmap=false
- network.host=0.0.0.0
- discovery.seed_hosts=opensearch-node1
- cluster.initial_cluster_manager_nodes=opensearch-node1
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-node1-data:/usr/share/opensearch/data
ports:
- 9200:9200
networks:
- opensearch-net
restart: unless-stopped
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:latest
container_name: opensearch-dashboards
environment:
SERVER_HOST: '0.0.0.0'
SERVER_SSL_ENABLED: true
SERVER_SSL_CERTIFICATE: /usr/share/opensearch-dashboards/config/admin.pem
SERVER_SSL_KEY: /usr/share/opensearch-dashboards/config/admin-key.pem
OPENSEARCH_HOSTS: '["https://opensearch-node1:9200"]'
OPENSEARCH_SSL_VERIFICATIONMODE: full
OPENSEARCH_SSL_CERTIFICATEAUTHORITIES: '["/usr/share/opensearch-dashboards/config/root-ca.pem"]'
OPENSEARCH_USERNAME: "kibanaserver"
OPENSEARCH_PASSWORD: "kibanaserver"
OPENSEARCH_REQUESTHEADERSALLOWLIST: '[ authorization,securitytenant ]'
OPENSEARCH_SECURITY_MULTITENANCY_ENABLED: true
OPENSEARCH_SECURITY_MULTITENANCY_TENANTS_PREFERRED: '["Private", "Global"]'
OPENSEARCH_SECURITY_READONLY_MODE_ROLES: '["kibana_read_only"]'
OPENSEARCH_SECURITY_COOKIE_SECURE: true
ports:
- 5601:5601
expose:
- '5601'
volumes:
- ./config/admin.pem:/usr/share/opensearch-dashboards/config/admin.pem
- ./config/admin-key.pem:/usr/share/opensearch-dashboards/config/admin-key.pem
- ./config/root-ca.pem:/usr/share/opensearch-dashboards/config/root-ca.pem
networks:
- opensearch-net
volumes:
opensearch-node1-data:
networks:
opensearch-net:
Relevant Logs or Screenshots:
After starting each container, I ran the command $ docker compose logs opensearch-dashboards
, and the output was as follows:
opensearch-dashboards | {“type”:“log”,“@timestamp”:“2025-02-25T09:34:51Z”,“tags”:[“error”,“opensearch”,“data”],“pid”:1,“message”:“[ConnectionError]: unable to verify the first certificate”}