Graylog on Docker: email configuration -solved-

Hi folks, my set-up is Graylog 4.0 based on docker-compose and hosted on my local Ubuntu 18.04 server. Docker-compose.yml and my graylog.conf file are listed below. Installation works fine, several inputs are defined.

I have trouble to get alert email configuration work. The error message is:

Email Transport Configuration is missing or invalid! (triggered a few seconds ago) The configuration for the email transport subsystem has shown to be missing or invalid. Please check the related section of your Graylog server configuration file. This is the detailed error message: Email transport is not enabled in server configuration file!

I tried with a gmail email and with an email adress of ionos with no success. I searched in the community here and in the internet, again with no success.

Would be very pleased to get a hint where I should focus on to get it work.
Thank you!

docker-compose.yml
version: '3'
services:
  # MongoDB: https://hub.docker.com/_/mongo/
  mongo:
    image: mongo:4.2
    volumes:
      -.../graylog/mongo_data:/data/db
    networks:
      - graylog
    logging:
      driver: "gelf"
      options:
        gelf-address: "udp://xxx.xxx.xxx.xxx:12201"
  # Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
    volumes:
      - ../graylog/es_data:/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
    deploy:
      resources:
        limits:
          memory: 1g
    networks:
      - graylog
    logging:
      driver: "gelf"
      options:
        gelf-address: "udp://xxx.xxx.xxx.xxx:12201"
  # Graylog: https://hub.docker.com/r/graylog/graylog/
  graylog:
    image: graylog/graylog:4.0
    volumes:
      - ../graylog/graylog_data:/usr/share/graylog/data
      - ../graylog/graylog_plugin:/usr/share/graylog/plugin
      - ../graylog/geoip:/usr/share/graylog/geoip
    entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 --  /docker-entrypoint.sh
    networks:
      - graylog
    restart: always
    depends_on:
      - mongo
      - elasticsearch
    ports:
      # Graylog web interface and REST API
      - 9150:9000
      # Syslog TCP
      - 1514:1514
      # zusätzlicher Port
      - 5044:5044
      # Syslog UDP
      - 1514:1514/udp
      # GELF TCP
      - 12201:12201
      # GELF UDP
      - 12201:12201/udp
      # SMTP Port email
      - 587:587
      # SMTP GMAIL
      - 465:465
    logging:
      driver: "gelf"
      options:
        gelf-address: "udp://xxx.xxx.xxx.xxx:12201"
networks:
  graylog:
    driver: bridge
my graylog.conf file:
############################
# GRAYLOG CONFIGURATION FILE
############################

is_master = true
node_id_file = /usr/share/graylog/data/config/node-id

password_secret = SECRET
root_username = admin
root_password_sha2 = sha2
root_email = "email@email.de"

bin_dir = /usr/share/graylog/bin
data_dir = /usr/share/graylog/data
plugin_dir = /usr/share/graylog/plugin

###############
# HTTP settings
###############

http_bind_address = 0.0.0.0:9000
http_external_uri = http://xxx.xxx.xxx.xxx:9150/

################
# HTTPS settings
################

# Comma separated list of trusted proxies that are allowed to set the client address with X-Forwarded-For
# header. May be subnets, or hosts.
#trusted_proxies = 127.0.0.1/32, 0:0:0:0:0:0:0:1/128

# List of Elasticsearch hosts Graylog should connect to.
# Need to be specified as a comma-separated list of valid URIs for the http ports of your elasticsearch nodes.
# If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that
# requires authentication.
#
elasticsearch_hosts = http://elasticsearch:9200

rotation_strategy = count
elasticsearch_max_docs_per_index = 20000000
elasticsearch_max_number_of_indices = 5
retention_strategy = delete
elasticsearch_shards = 1
elasticsearch_replicas = 0
elasticsearch_index_prefix = graylog
allow_leading_wildcard_searches = false
allow_highlighting = false
elasticsearch_analyzer = standard

output_batch_size = 500
output_flush_interval = 1

output_fault_count_threshold = 5
output_fault_penalty_seconds = 30

processbuffer_processors = 5
outputbuffer_processors = 3

processor_wait_strategy = blocking
ring_size = 65536

inputbuffer_ring_size = 65536
inputbuffer_processors = 2
inputbuffer_wait_strategy = blocking

message_journal_enabled = true
message_journal_dir = data/journal

lb_recognition_period_seconds = 3

mongodb_uri = mongodb://mongo/graylog
mongodb_max_connections = 1000
mongodb_threads_allowed_to_block_multiplier = 5

# Email transport
transport_email_enabled = true
transport_email_protocol = smtp
transport_email_hostname = smtp.gmail.com
transport_email_port = 465
transport_email_use_auth = true
transport_email_auth_username = email
transport_email_auth_password = password
transport_email_subject_prefix = [graylog]
transport_email_from_name = Graylog4
transport_email_from_email = email
transport_email_web_interface_url = http://xxx.xxx.xxx.xxx:9150

transport_email_use_tls = true
transport_email_use_ssl = true

proxied_requests_thread_pool_size = 32

Solved by myself - the most rediculous errors cost hours and hours. Want to share mine here to help others just to check the very basics: During the setup process I copied a graylog.conf file into a different folder and for some reason I started doing some configurations in this copy. At the end I forgot to copy this version back into the right place… So I was seeing the error, but all my config work was done in the wrong graylog.conf file…

Thanks for sharing :slight_smile:

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