httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Hill" <ddh...@zk3.dec.com>
Subject Re: connect to listener warning message
Date Thu, 11 Apr 2002 22:46:50 GMT

I spoke too soon on the libtool thingie.... the box I tried it on had some
other stuff on it. Also, on this particular box, for some reason it did not
find threads (specifically pthread.h according to apr/config.log).

On a cleaner box, I found I had to install GNU m4, then GNU autoconf as well
as libtool before buildconf would work.
So on this box, I unpacked the tarball, ran ./buildconf and then did a:
CC='cc -std1'
./configure --prefix='/usr/internet/httpd2' --enable-debug --enable-maintain
er-mode
and then did a build. The build completed without error. But... no threads.
apr/config.log shows that it barfed on finding pthreads.h because of
no -pthread on the cc line.

I made it CC='cc -std1 -pthread' ./configure and things got better. The
build ran to completion, with prefork as the default (Thought it was
supposed to be perchild?). Is this expected that I need to specify -pthread
?

>kernel lets us get IPv6 socket
>kernel lets us bind to IN6ADDR_ANY (what is your Listen statement?)
>kernel won't let us connect to IN6ADDR_ANY (::)

That would match what I am seeing... I will send you my two test programs so
you can see what I did. I pirated most of the code from the examples that
are published with our OS. BTW, my network guys don't dispute this (yet),
but want more time to look/think.

> Here is something else to try with jist on the weird machine to
> verify:
>
> socket af_inet6
> assign s1 lastfd
> bind s1 :: 5555
> listen s1
> socket af_inet6
> assign s2 lastfd
> connect s2 :: 5555
>
> I suspect that the bind() will work but the connect() will fail.

two runs....

# done on a ipv6 enabled machine
# jist
Enter a command (or "help"):
socket af_inet6
Defaulting to type 1...
Defaulting to protocol 0...
The descriptor is 3.
Enter a command (or "help"):
assign s1 lastfd
Enter a command (or "help"):
bind s1 :: 5555
Enter a command (or "help"):
listen s1
Enter a command (or "help"):
socket af_inet6
Defaulting to type 1...
Defaulting to protocol 0...
The descriptor is 4.
Enter a command (or "help"):
assign s2 lastfd
Enter a command (or "help"):
connect s2 :: 5555
connected...
Enter a command (or "help"):

# machine with no ipv6 enabled
# jist
Enter a command (or "help"):
socket af_inet6
Defaulting to type 1...
Defaulting to protocol 0...
The descriptor is 3.
Enter a command (or "help"):
assign s1 lastfd
Enter a command (or "help"):
bind s1 :: 5555
Enter a command (or "help"):
listen s1
Enter a command (or "help"):
socket af_inet6
Defaulting to type 1...
Defaulting to protocol 0...
The descriptor is 4.
Enter a command (or "help"):
assign s2 lastfd
Enter a command (or "help"):
connect s2 :: 5555
connect: Can't assign requested address
errno 49
The request failed.
Enter a command (or "help"):

> Then either really disable IPv6 (such that you can't bind to ::) or
> really enable IPv6 (make sure loopback has an IPv6 address) and Apache
> should work fine.  (lots of assumptions here :) )

That is easier said than done on the two boxes I am using. Will try to do
that later after I set up another box.

> I wonder if this machine would be considered "properly configured."  I
> wonder how many machines are configured such that this would happen.
> I wonder if Apache, when determining at startup if it should try to do
> IPv6, should make sure something like the jist scenario above will
> actually work (with an ephemeral port, of course) before deciding to
> use IPv6.

The ipv4 machine is a machine with a fairly normal default configuration. I
am under the impression that the networks guys try to do as much fallback to
v4 under the hood as possible. I would have thought that :: would fall back
to the equivilent of 0.0.0.0 if v6 is not enabled.

BTW, I am out Friday, back Monday.

later,
    Dave Hill



Mime
View raw message