apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.26k stars 1.03k forks source link

IPv6 cluster #3973

Open j3k0 opened 2 years ago

j3k0 commented 2 years ago

I cannot setup a IPv6 cluster, because the _cluster_setup action add_node doesn't accept IPv6.

curl -H 'Content-type: application/json' "admin:password@host1.vlan0:5984/_cluster_setup" -d '{"action": "add_node", "host":"host2.vlan0", "port": 5984, "username": "admin", "password":"password"}' | jq
{
  "error": "invalid_ejson",
  "reason": "{conn_failed,{error,nxdomain}}",
  "ref": 878456848
}

When trying to set the "host" to the IPv6 address, I get:

{
  "error": "invalid_ejson",
  "reason": "{url_parsing_failed,{error,invalid_uri}}",
  "ref": 878456848
}

I also try to include the IPv6 between [ ] (thinking maybe couchdb tries to setup a URL like http://{ host }:{ port }) ... but it fails with the same error as if I used an hostname (error, nxdomain). (I wonder if there's a regex figuring out if the thing is an IP that only matches IPv4?)

Note: another hiccup was that apache.jfrog.io does not resolve in IPv6 (solved by downloading and copying the deb file manually... meh). But that's a different issue.

CanRau commented 2 years ago

Tried the same yesterday and got "invalid URL" it's a pity 🥺

big-r81 commented 2 years ago

Can you append the section of your log where the error occurs?

AstraLuma commented 2 months ago

The latter might be related to #5223, it looks like there's some URL string manipulation bugs.