Discussion:
FreeBSD 9.3, Apache 2.4 and IPv6 Issue.
(too old to reply)
m***@marketbridge.com
2016-06-22 19:31:58 UTC
Permalink
Hello,

Attempting to start up Apache with IPv6 but getting the following error:

hostname nor servname provided, or not known: AH00077: alloc_listener:
failed to set up sockaddr for [2001:470:b008::2]


Anyone have a similar issue?

Martin
Polytropon
2016-06-22 20:25:44 UTC
Permalink
Post by m***@marketbridge.com
Hello,
failed to set up sockaddr for [2001:470:b008::2]
Do you have your hostname defined in /etc/hosts? Without further
investigation (of system configuration and Apache settings), this
looks a bit like a resolver configuration problem...
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
m***@marketbridge.com
2016-06-22 21:04:02 UTC
Permalink
Yes, agreed. I now confirmed that when I attempted a ping6 www.domain.com
however.. I used bsdconfig to pop-up the post-install screen to add an
IPv6 name server. When using that, I cannot enter IPv6 addresses for DNS
server. I tried manually just with VI but no luck.. (the IPv6 DNS server
appears in the config file).

Furthermore, earlier on today, I could actually see some of my services
(except Apache) running IPv6 sockets. And now that's disappeared. At one
point I turned on ipv6_ipv4mapping="YES" but that did not help. I now
disabled it.

Ugh.. banging my head against the wall with what seems to be two separate
problems. I may just take a snapshot in ESX and upgrade to 10.1.

I do have full layer-3 IPv6 connectivity though.

Danke
Post by Polytropon
Post by m***@marketbridge.com
Hello,
failed to set up sockaddr for [2001:470:b008::2]
Do you have your hostname defined in /etc/hosts? Without further
investigation (of system configuration and Apache settings), this
looks a bit like a resolver configuration problem...
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
m***@marketbridge.com
2016-06-22 23:39:58 UTC
Permalink
Well, made some progress.. services (Except apache) are indeed running
over IPv6. All my DNS is fixed. Forward and Reverse works locally for
IPv6 forward and reverse DNS resolution.

But still have not figured out that error below:

Performing sanity check on apache24 configuration:
[Wed Jun 22 19:36:37.057692 2016] [core:crit] [pid 3314] (EAI 8)hostname
nor servname provided, or not known: AH00077: alloc_listener: failed to
set up sockaddr for [2001:470:b008::2]
AH00526: Syntax error on line 54 of /usr/local/etc/apache24/httpd.conf:
Listen setup failed

... 6 hours later.
Post by Polytropon
Post by m***@marketbridge.com
Hello,
failed to set up sockaddr for [2001:470:b008::2]
Do you have your hostname defined in /etc/hosts? Without further
investigation (of system configuration and Apache settings), this
looks a bit like a resolver configuration problem...
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
m***@gmail.com
2016-10-05 10:55:43 UTC
Permalink
Hi,

I am struggling with same problem. Any solution/workaround found for this?

Thanks,
Murthy Ravi.

Kevin P. Neal
2016-06-23 13:22:15 UTC
Permalink
Post by m***@marketbridge.com
Well, made some progress.. services (Except apache) are indeed running
over IPv6. All my DNS is fixed. Forward and Reverse works locally for
IPv6 forward and reverse DNS resolution.
[Wed Jun 22 19:36:37.057692 2016] [core:crit] [pid 3314] (EAI 8)hostname
nor servname provided, or not known: AH00077: alloc_listener: failed to
set up sockaddr for [2001:470:b008::2]
Listen setup failed
Did you specify a fully qualified hostname to any ServerName directives?

Did you put the IPv6 address in [brackets] on any Listen directives?
--
Kevin P. Neal http://www.pobox.com/~kpn/
"14. Re-reading No. 13, I realize that it's quite possible I'm losing my
mind. I'm glad that for the most part I'm not aware it's happening."
-- from "20 things I'm thankful for": Fortune, Nov 29, 2004, page 230
m***@marketbridge.com
2016-06-23 13:36:25 UTC
Permalink
Hi Kevin,

Yes and yes... I tried:

Listen [::]:80
Listen 80
Listen 443

Listen [2001:470:b008::2]:80
Listen 80
Listen 443

ServerName mail.blahblah.com:80

I may also try upgrading Apache.
Post by Kevin P. Neal
Post by m***@marketbridge.com
Well, made some progress.. services (Except apache) are indeed running
over IPv6. All my DNS is fixed. Forward and Reverse works locally for
IPv6 forward and reverse DNS resolution.
[Wed Jun 22 19:36:37.057692 2016] [core:crit] [pid 3314] (EAI 8)hostname
nor servname provided, or not known: AH00077: alloc_listener: failed to
set up sockaddr for [2001:470:b008::2]
Listen setup failed
Did you specify a fully qualified hostname to any ServerName directives?
Did you put the IPv6 address in [brackets] on any Listen directives?
--
Kevin P. Neal http://www.pobox.com/~kpn/
"14. Re-reading No. 13, I realize that it's quite possible I'm losing my
mind. I'm glad that for the most part I'm not aware it's happening."
-- from "20 things I'm thankful for": Fortune, Nov 29, 2004, page 230
m***@marketbridge.com
2016-06-23 15:21:48 UTC
Permalink
So, it's not an IPv6 issue. It's like Apache is not recognizing anything
that is not an IP address or valid FQDN in the Listen directive. For
example, I tried:

Listen asdjfljasdfljsljdfljsadjlljsdf:80

And I get the same error. I tried:

Listen 2001:470:b008::2
Listen [2001:470:b008::2]80

Is not anyone else having this issue?

I can reverse DNS resolve the address 2001:470:b008::2 locally without a
problem.

Martin
Post by Kevin P. Neal
Post by m***@marketbridge.com
Well, made some progress.. services (Except apache) are indeed running
over IPv6. All my DNS is fixed. Forward and Reverse works locally for
IPv6 forward and reverse DNS resolution.
[Wed Jun 22 19:36:37.057692 2016] [core:crit] [pid 3314] (EAI 8)hostname
nor servname provided, or not known: AH00077: alloc_listener: failed to
set up sockaddr for [2001:470:b008::2]
Listen setup failed
Did you specify a fully qualified hostname to any ServerName directives?
Did you put the IPv6 address in [brackets] on any Listen directives?
--
Kevin P. Neal http://www.pobox.com/~kpn/
"14. Re-reading No. 13, I realize that it's quite possible I'm losing my
mind. I'm glad that for the most part I'm not aware it's happening."
-- from "20 things I'm thankful for": Fortune, Nov 29, 2004, page 230
m***@marketbridge.com
2016-06-23 15:43:16 UTC
Permalink
Seeing I posted to the FreeBSD universe, least I can do is respond. For
those of you running into this issue, the problem is apr.

I cannot remember what version of apr I was on.. it was not old.. BUT it
did not support IPv6 properly .. you need the following:

apr-1.5.2.1.5.4

Make sure have the new port, under the port (potentially remove the old
port), make rmconfig, make deinstall (if you have fresh ports and there's
confusion on what's actually running and the port version), make install
clean.

Worked for me! FINALLY
Post by Kevin P. Neal
Post by m***@marketbridge.com
Well, made some progress.. services (Except apache) are indeed running
over IPv6. All my DNS is fixed. Forward and Reverse works locally for
IPv6 forward and reverse DNS resolution.
[Wed Jun 22 19:36:37.057692 2016] [core:crit] [pid 3314] (EAI 8)hostname
nor servname provided, or not known: AH00077: alloc_listener: failed to
set up sockaddr for [2001:470:b008::2]
Listen setup failed
Did you specify a fully qualified hostname to any ServerName directives?
Did you put the IPv6 address in [brackets] on any Listen directives?
--
Kevin P. Neal http://www.pobox.com/~kpn/
"14. Re-reading No. 13, I realize that it's quite possible I'm losing my
mind. I'm glad that for the most part I'm not aware it's happening."
-- from "20 things I'm thankful for": Fortune, Nov 29, 2004, page 230
Loading...