Niklaas Baudet von Gersdorff
2016-06-11 17:48:49 UTC
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
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