Wietse Venema <wietse <at> porcupine.org> writes: > > Sam: > > Hello! > > > > I have a server running FreeBSD 8.1 with FreeBSD 8.1 jails running on it. I have > > ipv6 running on both the main server and jails and that is all fine. > > > > I'm running into a strange problem when it comes to postfix though and was > > wondering if anyone has any clues. What's happening is that postfix will > > not > > start automatically when the jail is started when 'inet_protocols' is set > > to > > either 'all' or 'ipv4, ipv6'. The error in the logs is: fatal: bind :: port 25: > > Can't assign requested address. > > Translation: the attempt to bind to "::" port 25 failed, because > the jail network interface does not have an IPv6 address. > > This means that Postfix is started before the network address is > configured on the jail interface.
That's interesting, I was wondering about that but it looked to me that the network was started before the other daemons. I will ask on the FreeBSD mailing lists like you suggested. My question though is why does it start fine when only ipv4 is used but not when ipv6 is used either by it's self or with ipv4? > > The odd thing is that I can enter the jail right away and start > > postfix from the command line and it works fine. Also, if I specify > > the '-D' flag in rc.conf and set the debug command in main.cf to > > 'sleep 3' then postfix will start automatically when the jail is > > started. > > You have a race condition where Postfix is started before the jail > network interface is fully initialized. > > The workaround is to insert some delay before Postfix starts. I guess this is why starting it with 'sleep 3' allowed postfix to start automatically. > The solution is to file a bug report with FreeBSD. The /etc/rc.d > scripts must not start network daemons before the network is ready. See my question above about postfix starting fine when only ipv4 is used. Also, apache and sshd start fine and they start at the same time postfix does if I'm not mistaken. I'm no expert though so I'm probably missing something somewhere. I will contact FreeBSD about this though. Thanks for the suggestion. > Wietse Thanks Wietse, I appreciate your time and help. -Sam