Version:
opensearch 2.19.2
Describe the issue:
opensearch log shown in sudo docker logs opensearch-master1 | less
but not in /usr/share/opensearch/logs
only gc and performance analyzer log available
[opensearch@kmsdb1 logs]$ ls /usr/share/opensearch/logs
PerformanceAnalyzer.log gc.log gc.log.00
Configuration:
docker compose:
services:
opensearch-master1:
restart: always
image: opensearchproject/opensearch:2.19.2
container_name: opensearch-master1
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-master1
- network.host=0.0.0.0
- network.publish_host=${VM1_IP}
- discovery.seed_hosts=${VM1_HOST}:9300,${VM2_HOST}:9300,${VM3_HOST}:9300
- cluster.initial_cluster_manager_nodes=opensearch-master1,opensearch-master2,opensearch-master3
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms6g -Xmx6g"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=false"
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD}"
- plugins.security.ssl.transport.pemkey_filepath=/usr/share/opensearch/config/privatekey.pem
- plugins.security.ssl.transport.pemkey_password=xxxxxxxx
- plugins.security.ssl.transport.pemcert_filepath=/usr/share/opensearch/config/publickey.pem
- plugins.security.ssl.transport.pemtrustedcas_filepath=/usr/share/opensearch/config/ca.crt
- plugins.security.ssl.http.pemcert_filepath=/usr/share/opensearch/config/publickey.pem
- plugins.security.ssl.http.pemkey_filepath=/usr/share/opensearch/config/privatekey.pem
- plugins.security.ssl.http.pemkey_password=xxxxxxxx
- plugins.security.ssl.http.pemtrustedcas_filepath=/usr/share/opensearch/config/ca.crt
- plugins.security.ssl.http.enabled=true
#- plugins.security.ssl.transport.enforce_hostname_verification=false
- TZ=Asia/Hong_Kong
- plugins.security.restapi.admin.enabled=true
privileged: true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./certs/ca.crt:/usr/share/opensearch/config/ca.crt
- ./certs/admin.crt:/usr/share/opensearch/config/admin.crt
- ./certs/decrypted_privatekey.pem:/usr/share/opensearch/config/decrypted_privatekey.pem
- ./certs/privatekey.pem:/usr/share/opensearch/config/privatekey.pem
- ./certs/publickey.pem:/usr/share/opensearch/config/publickey.pem
- ./data:/usr/share/opensearch/data
- ./conf/analysis/synonyms.txt:/usr/share/opensearch/config/analysis/synonyms.txt
- ./conf/opensearch.yml:/usr/share/opensearch/config/opensearch.yml
- ./plugins/analysis-icu:/usr/share/opensearch/plugins/analysis-icu
- ./plugins/analysis-smartcn:/usr/share/opensearch/plugins/analysis-smartcn
- ./conf/opensearch.keystore:/usr/share/opensearch/config/opensearch.keystore
network_mode: "host"
extra_hosts:
- "opensearch1.xxxx-xxxxx.com:192.168.80.31"
- "opensearch2.xxxx-xxxxx.com:192.168.80.32"
- "opensearch3.xxxx-xxxxx.com:192.168.80.40"
logging:
driver: local
no opensearch.yml mounted, only inject settings with environment
question:
default log4j2 to console only but not file?
expect there is a log file and would rotate automatically
seems others got similar issues on the forum but not resolved
ref: