When your server boots too fast: How to slow it down?

Niklaas Baudet von Gersdorff stdin at niklaas.eu
Sat Jun 11 18:12:08 UTC 2016


For the last days I have been wondering why some daemons don't
start during boot process e.g., ssh, tinc and postfix. Today
I noticed the following /var/log/messages:

8<----
	Jun 11 17:52:52 box-hlm-03 postfix[908]: fatal: parameter inet_interfaces: no local interface found for <my-IPv6>
	Jun 11 17:52:53 box-hlm-03 sshd[970]: error: Bind to port 22 on <my-IPv6> failed: Can't assign requested address.
8<----

`sockstat -46lj 0` shows that postfix isn't running at all and
sshd only listens on IPv4.

But if I issue

	service sshd restart
	service postfix restart
	service tincd restart

all (re)start without any problems. Checking `sockstat`, then,
they listen on IPv4 and IPv6.

I assume that it takes a bit for my server to get its public
IPv6. So it isn't assigned when sshd, postfix, and tincd are
started; thus all of them (partly) fail. It's just an
assumption, the only idea I have to explain this behaviour.

Can I configure the machine to sleep a short while before
starting the programs mentioned above or after bringing the
public interface up, assigning the IP address?

    Niklaas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20160611/e2dae0ad/attachment.sig>


More information about the freebsd-questions mailing list