Skip to content

[BUG] "Fatal: Dovecot is already running with PID ..." #2578

@coldfix

Description

@coldfix

Miscellaneous first checks

  • I checked that all ports are open and not blocked by my ISP / hosting provider.
  • I know that SSL errors are likely the result of a wrong setup on the user side and not caused by DMS itself. I'm confident my setup is correct.

Affected Component(s)

dovecot

What happened and when does this occur?

I got hundreds of Megabytes of log-messages in `mail.log` and consorts containing
the same message (see below). I've had weeks with 1.6 or even 2.3 Million messages.
That's 2-3 messages every second for the whole week.

In some weeks there are only few or even none of these messages for a whole week.
I'm not sure of the exact circumstances. I reckon it might have something to do with
supervisor not recognizing that dovecot is already running.

Interestingly, I don't seem to have any problems with the service other than tons of log
messages. I can send and receive email without problems using a mail client.

What did you expect to happen?

If the system is running as intended, there should be no error messages.

How do we replicate the issue?

Not sure. I basically just `docker-compose up` the service and I can't say when exactly it is happening.

DMS version

v10.5.0

What operating system is DMS running on?

Linux

What instruction set architecture is DMS running on?

x86_64 / AMD64

What container orchestration tool are you using?

Docker Compose

docker-compose.yml

mailserver:
    image: docker.io/mailserver/docker-mailserver:latest
    restart: always
    hostname: XXX
    domainname: YYY.de
    ports:
      - "25:25"    # SMTP  (explicit TLS => STARTTLS)
      - "143:143"  # IMAP4 (explicit TLS => STARTTLS)
      - "465:465"  # ESMTP (implicit TLS)
      - "587:587"  # ESMTP (explicit TLS => STARTTLS)
      - "993:993"  # IMAP4 (implicit TLS)
    volumes:
      - ./var/mail/conf:/tmp/docker-mailserver
      - ./var/mail/data:/var/mail
      - ./var/mail/state:/var/mail-state
      - ./var/mail/log:/var/log/mail
      - /etc/localtime:/etc/localtime:ro
      - /etc/letsencrypt:/etc/letsencrypt
    environment:
      # services:
      - ENABLE_CLAMAV=1         # Antivirus
      - ENABLE_FAIL2BAN=1       # Ban IPs after 3 failed login attempts
      - ENABLE_POSTGREY=1
      - ENABLE_SPAMASSASSIN=1
      - ENABLE_QUOTAS=0
      - ENABLE_POP3=0
      # options:
      - POSTGREY_DELAY=50
      - SPAMASSASSIN_SPAM_TO_INBOX=1
      - POSTFIX_MESSAGE_SIZE_LIMIT=134217728    # 128 MiB
      - PFLOGSUMM_TRIGGER=logrotate
      - LOGWATCH_INTERVAL=weekly
      - LOGROTATE_INTERVAL=monthly
      - ONE_DIR=1
      - SSL_TYPE=letsencrypt
    stop_grace_period: 1m
    cap_add:
      - NET_ADMIN
      - SYS_PTRACE

Relevant log output

My logwatch of a recent week reads:

--------------------- Dovecot Begin ------------------------ 
Dovecot Fatal Errors:
   master: Fatal: Dovecot is already running with PID 3881495 (read from /run/dovecot/master.pid): 1677776 Time(s)

Dovecot Deliveries: 122
Dovecot IMAP and POP3 Successful Logins: 310

Dovecot disconnects: 916 Total

Unknown users blocked: 40 Total

---------------------- Dovecot End ------------------------- 

Sometimes this starts happening directly after a message like this:

dovecot: master: Warning: Killed with signal 15 (by pid=3772 uid=0 code=kill)

Other relevant information

No response

What level of experience do you have with Docker and mail servers?

  • I am inexperienced with docker
  • I am inexperienced with mail servers
  • I am uncomfortable with the CLI

Code of conduct

Improvements to this form?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions