Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   apache2's handling of IP version 6 (http://www.linux-archive.org/debian-user/709344-apache2s-handling-ip-version-6-a.html)

Stan Hoeppner 10-03-2012 02:41 PM

apache2's handling of IP version 6
 
On 10/3/2012 9:08 AM, Satoru Otsubo wrote:
> I'm Satoru Otsubo
>
> I have some problems concerning apache2's handling of IP version 6.
>
> My PC: Linux squeeze Japanese version clean install.
> I use the normal apache2 package prepared by debian maintainers, that is, I did not compile apache2.
> This is server use, that is, no Grafical User Interface.
> (Current kernel version: 2.6.32-5-686)
>
> I think apache2 is using IPv4-mapped addresses, that is, apache2 lets only IPv6's ports open, and apache2 handles both the IPv6 and IPv4 tcp packets from IPv6's ports.
> Therefore I think apache2 normally has to listen IPv6's ports after booting PC.
>
> But,
> (i) After apache2 starts by booting my PC, apache2 listens only IPv4's 80 and 443 tcp ports.
> (ii) Then after I execute
> # /etc/init.d/apache2 restart,
> apache2 becomes normal, that is, apache2 becomes to listen only IPv6's 80 and 443 tcp ports.
>
> I have repeated many times.
> But after booting, apache2 always listens only IPv4's 80 and 443 tcp ports.
> And after
> # /etc/init.d/apache2 restart,
> apache2 always becomes normal.
>
> Why this phenoma happens ?
> In what situations apache2 falls back to use IPv4's 80 and 443 tcp ports
> instead of IPv6's 80 and 443 tcp ports ?
> If I know these situations, I might let apache2 listen IPv6's 80 and 443 tcp ports after booting my PC, by repairing files, etc. of my PC.

Read this:

http://www.cyberciti.biz/faq/ipv6-apache-configuration-tutorial/

--
Stan



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506C4E94.1020403@hardwarefreak.com">http://lists.debian.org/506C4E94.1020403@hardwarefreak.com

Satoru Otsubo 10-03-2012 07:53 PM

apache2's handling of IP version 6
 
Thanks, Stan

>
> Read this:
>
> http://www.cyberciti.biz/faq/ipv6-apache-configuration-tutorial/
>

I modified /etc/apache2/ports.conf as follows:
Listen a.b.c.d:80
Listen [pppp:qqqq:....:rrrr]:80
Listen a.b.c.d:443
Listen [pppp:qqqq:....:rrrr]:443

(where,
a.b.c.d = my web server's IPv4 address
pppp:qqqq:....:rrrr = my web server's IPv6 address)

And I rebooted my PC.

Then I found the following in the boot sequence:
Starting web server: apache2[Thu Oct 04 01:02:03 2012]: [crit] (EAI 9)Address family for hostname not supported: Alloc_listener: failed to set up sockaddr for pppp:qqqq:....:rrrr
Syntax error on line 2 of /etc/apache2/ports.conf
Listen setup failed.
Action 'start' failed.
The Apache error log may have more information.
failed!

(There was nothing related to this error in /var/log/apache2/error.log)

Then I executed the following:
# /etc/init.d/apache2 restart

And the Apache started successfully with the dual stack:

Why apache2 succeeded to start when I executed # /etc/init.d/apache2 restart, after apache2 failed to start when booting ?

Is this because there are any wrong in my apache2's settings ?


Satoru


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121004045323.c81902fa.trnsnt@otip.jp">http://lists.debian.org/20121004045323.c81902fa.trnsnt@otip.jp

Tom H 10-03-2012 11:34 PM

apache2's handling of IP version 6
 
On Wed, Oct 3, 2012 at 3:53 PM, Satoru Otsubo <trnsnt@otip.jp> wrote:
>
> Thanks, Stan
>>
>> Read this:
>>
>> http://www.cyberciti.biz/faq/ipv6-apache-configuration-tutorial/
>
> I modified /etc/apache2/ports.conf as follows:
> Listen a.b.c.d:80
> Listen [pppp:qqqq:....:rrrr]:80
> Listen a.b.c.d:443
> Listen [pppp:qqqq:....:rrrr]:443
>
> (where,
> a.b.c.d = my web server's IPv4 address
> pppp:qqqq:....:rrrr = my web server's IPv6 address)
>
> And I rebooted my PC.
>
> Then I found the following in the boot sequence:
> Starting web server: apache2[Thu Oct 04 01:02:03 2012]: [crit] (EAI 9)Address family for hostname not supported: Alloc_listener: failed to set up sockaddr for pppp:qqqq:....:rrrr
> Syntax error on line 2 of /etc/apache2/ports.conf
> Listen setup failed.
> Action 'start' failed.
> The Apache error log may have more information.
> failed!
>
> (There was nothing related to this error in /var/log/apache2/error.log)
>
> Then I executed the following:
> # /etc/init.d/apache2 restart
>
> And the Apache started successfully with the dual stack:
>
> Why apache2 succeeded to start when I executed # /etc/init.d/apache2 restart, after apache2 failed to start when booting ?

Did you see, on the page that Stan sent you that you need a
"VirtualHost" stanza for ipv6:
<VirtualHost 74.86.48.99>
<VirtualHost [2607:f0d0:1002:11::4]>
or
<VirtualHost 74.86.48.99 [2607:f0d0:1002:11::4]>

(Also, "Listen 80" covers both ipv4 and ipv6.)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAOdo=Sx97KYKRTOcvEx_Q8TW0JWwnYbsJC3uMp67gyxH+ev+N Q@mail.gmail.com

Satoru Otsubo 10-04-2012 03:40 AM

apache2's handling of IP version 6
 
Thanks, Stan

>
> Did you see, on the page that Stan sent you that you need a
> "VirtualHost" stanza for ipv6:
> <VirtualHost 74.86.48.99>
> <VirtualHost [2607:f0d0:1002:11::4]>
> or
> <VirtualHost 74.86.48.99 [2607:f0d0:1002:11::4]>
>
> (Also, "Listen 80" covers both ipv4 and ipv6.)
>

I changed ports.conf as described on the previous mailing.
And
I changed files in /etc/apache2/sites-available/ as follows:
Concerning *80, as follows:
NameVirtualHost a.b.c.d:80
NameVirtualHost [pppp:qqqq:....:rrrr]:80
<VirtualHost a.b.c.d:80 [pppp:qqqq:....:rrrr]:80>
....
And
Concerning *443, as follows:
NameVirtualHost a.b.c.d:443
NameVirtualHost [pppp:qqqq:....:rrrr]:443
<VirtualHost a.b.c.d:443 [pppp:qqqq:....:rrrr]:443>
....

But the phenomena are same, that is,
When booting my PC, apache2 failed to start.
And when I executed the following:
# /etc/init.d/apache2 restart
apache2 started successfully with the dual stack.

Why this phenomena happens ?


Satoru


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121004124059.0495fc78.trnsnt@otip.jp">http://lists.debian.org/20121004124059.0495fc78.trnsnt@otip.jp

Rick Thomas 10-04-2012 08:46 AM

apache2's handling of IP version 6
 
On Oct 3, 2012, at 8:40 PM, Satoru Otsubo wrote:



But the phenomena are same, that is,
When booting my PC, apache2 failed to start.
And when I executed the following:
# /etc/init.d/apache2 restart
apache2 started successfully with the dual stack.

Why this phenomena happens ?



Is the apache2 daemon starting before the ipv6 part of the network
configuration is completely up?


Try putting "ipv6" in your /etc/modules file...

Rick


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: EDF66603-9C79-4CFD-BD22-8379BBE5E514@pobox.com">http://lists.debian.org/EDF66603-9C79-4CFD-BD22-8379BBE5E514@pobox.com

Stan Hoeppner 10-04-2012 11:23 AM

apache2's handling of IP version 6
 
On 10/4/2012 3:46 AM, Rick Thomas wrote:
>
> On Oct 3, 2012, at 8:40 PM, Satoru Otsubo wrote:
>
>>
>> But the phenomena are same, that is,
>> When booting my PC, apache2 failed to start.
>> And when I executed the following:
>> # /etc/init.d/apache2 restart
>> apache2 started successfully with the dual stack.
>>
>> Why this phenomena happens ?
>>
>
> Is the apache2 daemon starting before the ipv6 part of the network
> configuration is completely up?

His log error does seem to indicate Apache is starting before the ipv6
stack is available--one of the downsides of parallel init.

> Try putting "ipv6" in your /etc/modules file...

--
Stan



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 506D7194.4080506@hardwarefreak.com">http://lists.debian.org/506D7194.4080506@hardwarefreak.com

Satoru Otsubo 10-04-2012 01:29 PM

apache2's handling of IP version 6
 
Thank you, Rick

>
> Is the apache2 daemon starting before the ipv6 part of the network
> configuration is completely up?
>
> Try putting "ipv6" in your /etc/modules file...
>

My PC: Linux squeeze Japanese version clean install.
Current kernel version: 2.6.32-5-686

After I executed,
# /etc/init.d/apache2 restart,

I tried,
# lsmod | grep -i ipv6
But nothing is displayed.

kernel version 2.6.32-5-686 does, from the begining, have ipv6 as an integrated part, not as a module ?
If so, is there a possibility that the apache2 daemon is starting before the ipv6 part of the network configuration is completely up ?


Satoru


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20121004222950.a254d00b.trnsnt@otip.jp">http://lists.debian.org/20121004222950.a254d00b.trnsnt@otip.jp

Bonno Bloksma 10-04-2012 01:53 PM

apache2's handling of IP version 6
 
Hello Satoru,

>> Is the apache2 daemon starting before the ipv6 part of the network
>> configuration is completely up?
>>
>> Try putting "ipv6" in your /etc/modules file...
>>
>
> My PC: Linux squeeze Japanese version clean install.
> Current kernel version: 2.6.32-5-686
>
> After I executed,
> # /etc/init.d/apache2 restart,
>
>I tried,
># lsmod | grep -i ipv6
>But nothing is displayed.
>
>kernel version 2.6.32-5-686 does, from the begining, have ipv6 as an integrated part, not as a module ?
>If so, is there a possibility that the apache2 daemon is starting before the ipv6 part of the network configuration is completely up ?

As of Debian Squeeze the ipv6 support is integrated at kernel level and no longer a module.
Just do a "ifconfig eth0" or "ip addr show eth0" and you will always see an ipv6 line.

Putting ipv6 in etcmodprobe.dlacklist.conf to prevent ipv6 support also no longer works as some may have noticed.

Bonno Bloksma


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 89D1798A7351D040B4E74E0A043C69D70F0760E7@EinExch-01.tio.nl">http://lists.debian.org/89D1798A7351D040B4E74E0A043C69D70F0760E7@EinExch-01.tio.nl

Tom H 10-04-2012 05:06 PM

apache2's handling of IP version 6
 
On Thu, Oct 4, 2012 at 7:23 AM, Stan Hoeppner <stan@hardwarefreak.com> wrote:
> On 10/4/2012 3:46 AM, Rick Thomas wrote:
>> On Oct 3, 2012, at 8:40 PM, Satoru Otsubo wrote:
>>>
>>> But the phenomena are same, that is,
>>> When booting my PC, apache2 failed to start.
>>> And when I executed the following:
>>> # /etc/init.d/apache2 restart
>>> apache2 started successfully with the dual stack.
>>>
>>> Why this phenomena happens ?
>>>
>>
>> Is the apache2 daemon starting before the ipv6 part of the network
>> configuration is completely up?
>
> His log error does seem to indicate Apache is starting before the ipv6
> stack is available--one of the downsides of parallel init.

Where did you see the log?

apache2 depends on $network. Wouldn't the ipv6 stack be available
after the network's brought up?

Doesn't "Required-Start: $local_fs $remote_fs $network $syslog $named"
mean that apache2 starts once $network is satisfied/reached (meaning,
I hope!, that the network's up).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/CAOdo=Swdogc8qib7aCATRNSb5ucoor6wMto9Z_CHipkKW8xFe A@mail.gmail.com

Chris Bannister 10-05-2012 10:04 AM

apache2's handling of IP version 6
 
On Thu, Oct 04, 2012 at 04:53:23AM +0900, Satoru Otsubo wrote:
> Syntax error on line 2 of /etc/apache2/ports.conf

What about this syntax error?

--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20121005100437.GB26889@tal


All times are GMT. The time now is 10:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.