Deploying the following docker-compose with a Trusted CA Signed SSL Certificates I get error to start inputs
(but messages are received) and other operations (e.g. /system/archives) with
2022-04-08 09:33:36,898 WARN : org.graylog2.shared.rest.resources.ProxiedResource - Unable to call https://192.168.0.4:9000/api/system/metrics/multiple on node <d57c0b62-616c-437d-b0db-157f81192c7e>: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
In practice: the address of the certificate (with actual IP) does not correspond to the one graylog addresses (a docker local IP).
The docker-compose uses
version: '2'
services:
mongodb:
image: mongo:4.2
volumes:
- /data/mongo_db:/data/db
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
volumes:
- /data/elasticsearch:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
graylog:
image: graylog/graylog-enterprise:4.2
volumes:
- /data/graylog:/usr/share/graylog/data
- /data/certs:/data/certs
- /data/support_data:/data/support_data
environment:
- GRAYLOG_PASSWORD_SECRET=XXX
- GRAYLOG_ROOT_PASSWORD_SHA2=YYY
- GRAYLOG_HTTP_EXTERNAL_URI=https://mysite.com:9000/
- GRAYLOG_WEB_ENDPOINT_URI=https://mysite.com:9000/api
- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
- GRAYLOG_ROOT_TIMEZONE=Europe/Rome
- GRAYLOG_HTTP_ENABLE_TLS=true
- GRAYLOG_HTTP_TLS_CERT_FILE=/data/certs/mysite.cer
- GRAYLOG_HTTP_TLS_KEY_FILE=/data/certs/mysite.key
entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
links:
- mongodb:mongo
- elasticsearch
restart: always
depends_on:
- mongodb
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 1514:1514
# Syslog UDP
- 1514:1514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
# needed ? anyway no changes in this problem
- 443:9000
How to solve?
Thanks.
GS