0

I have trouble getting nginx and dovecot to start on boot under Ubuntu 17.10. The errors I get are e.g.

dovecot[721]: Error: bind(2a02:c207:xxxx:xxxx::x, 4190) failed: Cannot assign requested address
dovecot[721]: Error: service(managesieve-login): listen(mail.domain.tld, 4190) failed: Cannot assign requested address
nginx[726]: nginx: [emerg] bind() to [2a02:c207:xxxx:xxxx::x:x]:80 failed (99: Cannot assign requested address)

The IPs are defined in /etc/network/interfaces, the hosts are defined in /etc/hosts and if I manually start the services after the server booted, everything works fine.

I even tried adding an override using systemctl edit dovecot and adding

[Unit]
After=network-online.target

But no change.

Any idea what I am missing? The weird thing is that the SSH daemon is also bound to a specific IP and starts on boot without problems.

0

1 Answer 1

0

The problem was that the IPs were defined using

up ip addr add xxx.xxx.xxx.xxx/24 dev $IFACE

The problem is solved if the IPs are specified using multiple iface eth0 inet static blocks as defined here: https://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_one_Interface

You must log in to answer this question.