You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Nick North <no...@gmail.com> on 2012/07/08 19:04:01 UTC

Binding to both IPv4 and IPv6 addresses

Is it possible to bind a CouchDb server to both IPv4 and IPv6 addresses?
I'm running CouchDb 1.2 on Windows 7 and I seem to be able to bind to
the public IPv4 address with bind_address = 0.0.0.0, or to the IPv6 address
with bind_address = ::, but I don't know if there is a way to specify both.

Nick North

Re: Binding to both IPv4 and IPv6 addresses

Posted by Nick North <no...@gmail.com>.
Thanks Dave. I also saw that bit of code and was hoping there was something I could do in the CouchDb config to influence it, but apparently not.

It's actually not critical to do this: the underlying problem is the .NET WebRequest trying the IPv6 address for localhost before the IPv4 one, which introduces a one second delay to calls. I can work around it by resolving localhost to an IPv4 address before the WebRequest. That's probably easier than the alternatives.

Nick

On 8 Jul 2012, at 22:22, Dave Cottlehuber <da...@muse.net.nz> wrote:

> On 8 July 2012 19:04, Nick North <no...@gmail.com> wrote:
> 
>> Is it possible to bind a CouchDb server to both IPv4 and IPv6 addresses?
>> I'm running CouchDb 1.2 on Windows 7 and I seem to be able to bind to
>> the public IPv4 address with bind_address = 0.0.0.0, or to the IPv6 address
>> with bind_address = ::, but I don't know if there is a way to specify both.
>> 
>> Nick North
>> 
> 
> Hi Nick,
> 
> CouchDB uses Mochweb to handle the http/ip layer. Reading
> https://github.com/mochi/mochiweb/blob/master/src/mochiweb_socket_server.erl#L174
> implies that it might be if the OS can handle it. But I'm not sure I read
> it right,
> or if Windows allows you to do that.
> 
> If not, your best bet is likely to set up a teredo forwarder of some sort.
> This is out of my experience,  but
> http://technet.microsoft.com/en-us/library/dd379548%28v=WS.10%29.aspx
> has some stuff that might point you in the right direction.
> 
> A+
> Dave

Re: Binding to both IPv4 and IPv6 addresses

Posted by Dave Cottlehuber <da...@muse.net.nz>.
On 8 July 2012 19:04, Nick North <no...@gmail.com> wrote:

> Is it possible to bind a CouchDb server to both IPv4 and IPv6 addresses?
> I'm running CouchDb 1.2 on Windows 7 and I seem to be able to bind to
> the public IPv4 address with bind_address = 0.0.0.0, or to the IPv6 address
> with bind_address = ::, but I don't know if there is a way to specify both.
>
> Nick North
>

Hi Nick,

CouchDB uses Mochweb to handle the http/ip layer. Reading
https://github.com/mochi/mochiweb/blob/master/src/mochiweb_socket_server.erl#L174
implies that it might be if the OS can handle it. But I'm not sure I read
it right,
or if Windows allows you to do that.

If not, your best bet is likely to set up a teredo forwarder of some sort.
This is out of my experience,  but
http://technet.microsoft.com/en-us/library/dd379548%28v=WS.10%29.aspx
has some stuff that might point you in the right direction.

A+
Dave