Shadowghost / mailcow-mailman3-dockerized

Mailcow combined with Mailman3
35 stars 3 forks source link

somtimes mailman failed after system reboot #9

Closed maphy-psd closed 1 year ago

maphy-psd commented 5 years ago

Hi!

The containers mailman-web, mailman-core and database failed to start with the error "Address already in use" after a system reboot.

With docker inspect I found out, that sometimes an other container starts before mailman-web/core and get the (dynamic) ip like 172.19.199.2. The container mailman-core failed to start, because his (static) ip is already used.

A simple docker-compose stop/start or down/up solves the problem. Or give all containers a static ip in docker-compose.yml.

What do you think?

Shadowghost commented 5 years ago

I'm aware of this problem. That's why every container in this setup requires mailman-web and mailman-core to be up and running before anything else. You shouldn't get this error at all if you reboot - are you on latest master? Do you have any other docker-based services runnig? I can't control the starting order of different compose projects, so maybe they use up the required IPs. Can't do anything about that though. Sadly the IPs of the mailman containers can't be configured with env vars because they're hardcoded inside the image and I don't want to build and maintain the images by myself. Originally mailcow wanted to include their own mailman3 implementation, so this project was meant to be a temporary solution.