From owner-freebsd-questions@freebsd.org Fri Jul 17 21:10:10 2015 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 EC0169A31A8 for ; Fri, 17 Jul 2015 21:10:10 +0000 (UTC) (envelope-from jasonmader@gmail.com) Received: from mail-qg0-x23a.google.com (mail-qg0-x23a.google.com [IPv6:2607:f8b0:400d:c04::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A72DF19F9 for ; Fri, 17 Jul 2015 21:10:10 +0000 (UTC) (envelope-from jasonmader@gmail.com) Received: by qgy5 with SMTP id 5so43407988qgy.0 for ; Fri, 17 Jul 2015 14:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:subject:mime-version:content-type; bh=jNzvY6uFT8fx9eLlNdBxJUwnxcDfCaAAGJeSoirEkoc=; b=Khbgdzk+MiDJOr4qjoU6SQY8i6obwnAzNW4V+h7Y5gOE/KRuEdCZBtuy1JwVCkXszL 62vKaF7mbTWPqUK39buhBCdgMuAd3AXZkghXvlYRe11ZfWwua7NkRsooG4XW4QwVwCV3 hZ5ud+auWwrVxydak5xhkSoqrvqZyvUSNgjsMN9wEB7m8BM0zDv/fW5yqzhjLCz96Zgi 0WnZiTG9bat9R4F46N4dpZGnyf9NQ7bKm4M1Sven5DO//Kbo7lSpd4ILegdWtI6G6c6L md8VCfQVBmBwsjoTBhvaPfjfnuAnNz/VNgK3EKF094Bnx8PMuSSmTIbhK2SLsI5kQ/3r KJ1Q== X-Received: by 10.140.86.105 with SMTP id o96mr350406qgd.11.1437167409627; Fri, 17 Jul 2015 14:10:09 -0700 (PDT) X-Google-Doc-Id: 66fced80b71015fd X-Google-Web-Client: true Date: Fri, 17 Jul 2015 14:10:08 -0700 (PDT) From: jasonmader@gmail.com To: ml-freebsd-questions@googlegroups.com Message-Id: <1f160fed-4d9f-49c7-a27c-d5d0a9b37e93@googlegroups.com> Subject: IPv6 bind() errno 49 in jail MIME-Version: 1.0 X-Google-IP: 129.174.182.23 X-Mailman-Approved-At: Fri, 17 Jul 2015 21:19:16 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 21:10:11 -0000 In FreeBSD 10.1 I=CA=BCve encountered an error trying to use IPv6 in a jail= .=20 When nginx starts with, listen [2620:10e:6024:f004::141]:443 ssl; and jail.conf is configured, ip6.addr =3D 2620:10e:6024:f004::141; It=E2=80=99s the following error, [emerg] 2124#0: bind() to [2620:10e:6024:f004::141]:443 failed (49: Can't= =20 assign requested address) Output from truss shows, socket(PF_INET6,SOCK_STREAM,0) =3D 8 (0x8) setsockopt(0x8,0xffff,0x4,0x7fffffffe854,0x4,0x0) =3D 0 (0x0) setsockopt(0x8,0x29,0x1b,0x7fffffffe848,0x4,0x0) =3D 0 (0x0) ioctl(8,FIONBIO,0xffffe7fc) =3D 0 (0x0) bind(8,{ AF_INET6 [40be:bd00:800:0:9fe8:ffff:100:0]:36096 },28) ERR#49=20 'Can't assign requested address' write(3,"2015/07/17 16:49:24 [emerg] 4760"...,121) =3D 121 (0x79) nginx: [emerg] bind() to [2620:10e:6024:f004::141]:443 failed (49: Can't=20 assign requested address) So it=E2=80=99s pretty straight forward that bind() will fail. But where is= the=20 address [40be:bd00:800:0:9fe8:ffff:100:0]:36096 coming from?