From owner-freebsd-questions@freebsd.org Sat Jun 11 18:12:07 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA3FAF0899 for ; Sat, 11 Jun 2016 18:12:07 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: from box-hlm-03.niklaas.eu (box-hlm-03.niklaas.eu [84.22.110.84]) by mx1.freebsd.org (Postfix) with ESMTP id BBE012CF0 for ; Sat, 11 Jun 2016 18:12:07 +0000 (UTC) (envelope-from stdin@niklaas.eu) Received: by box-hlm-03.niklaas.eu (Postfix, from userid 1001) id 81D723855CC; Sat, 11 Jun 2016 19:48:49 +0200 (CEST) Date: Sat, 11 Jun 2016 19:48:49 +0200 From: Niklaas Baudet von Gersdorff To: freebsd-questions@freebsd.org Subject: When your server boots too fast: How to slow it down? Message-ID: <20160611174849.GA2453@box-hlm-03.niklaas.eu> Mail-Followup-To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2016 18:12:08 -0000 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Jun 11 17:52:53 box-hlm-03 sshd[970]: error: Bind to port 22 on 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 --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXXE70AAoJEG2fODeJrIU/njsP/23MPT7NuQwJv1U5szfmoYYZ cDTiy2r6v9lf0VQf3OlQs7Eb9Iah3Xtczds4W35S/xEYl9xLLUhtZ+59HB44ORvH 5zTa3dQheZ+S0UQRbuM2J+4ekS5Y+LT68CAHPd+okTNxqXf7CyzWA6mC2ZvzA9tj NbghjnMRM7zfJ946BjEVu8LqNOif90vF2B5voylSaKqCXozbozHfWW8sFr5bRTVw ZJmpMTdP2oG1cXDxxbj5F5UHd4NFQ6+ML6kzi/qwsgr/+3GYJZSR2phKimN5W0U8 vCKxi6eGCg6YRvHiWQo38zPhgfMQrlJKy+BLGM7+d1YqLmagQxlSpCcsV7iUOUNh Yc5sx01xGRM/9AoBTMlHL5XTr5b5zzv2Zz7nL2zKJN0S4dxU+jxajAnsirGhSzfw FYJzthZ0VRx1KLgUgviJi6I0VwbEuKZdZ4k10LpM3ArP+Tga7j7qynrGfhv8f9zm 2OmPr14ysIFpUtNOuQOphrswzpFeX+q0r61d0b39YZE71mIHEtnX1H6ahc9H1WhW T7iE13EMcGzS2p4sae0DChBxFqOevU7tvk+MWWSeF03lEoe1sXn4+q08yGBDsrtM a80X1A2Q2nap02cX3s6rWcl6BHLSU0Fnt75FOKzewWEf+pZYAnuZmn9lWqEaIxYG lbd+HG0eIEfJw4DzneAh =VtMk -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--