couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Replication test fails, Error: could not resolve http://any:5984/verifytestdb/

Open till opened this issue 1 year ago • 4 comments

Description

Was trying to run the verify installation steps, and noticed a failure in the replication test:

Error: could not resolve http://any:5984/verifytestdb/

Steps to Reproduce

  • start a CouchDB docker container
  • go on fauxton
  • verify installation

Expected Behaviour

No errors

Your Environment

  • CouchDB version used: 3.3.2
  • Browser name and version: any
  • Operating system and version: Docker/OSX

Additional Context

I haven't seen the any:5984 notation before. It should be 0.0.0.0:5984 to work across devices. AFAIR, even Windows supports that these days.

till avatar Jun 29 '23 10:06 till

Hi,

I think something might wrong with your setup. Please check your config, I didn’t saw this „any“ before…

big-r81 avatar Jun 29 '23 10:06 big-r81

@big-r81 I see any in many places: https://github.com/apache/couchdb/blob/16f47d758c6d630c391cf35c78c6959240ff4f1d/src/couch/src/couch_httpd.erl#L131-L137

(Search the code base for bind_address.)

I don't know enough Erlang to find out what any maps to. But it seems like a type?

I used some env vars when I started the container (COUCHDB_USERNAME, NODENAME, etc.) and I put one .ini file into it myself. Otherwise, it's all stock.

;/opt/couchdb/etc/local.d/setup.ini
[couchdb]
single_node=true

The (official) Docker image also creates a 10-docker-default.ini:

; CouchDB Configuration Settings

; Custom settings should be made in this file. They will override settings
; in default.ini, but unlike changes made to default.ini, this file won't be
; overwritten on server upgrade.

[chttpd]
bind_address = any

More any. :)

till avatar Jun 30 '23 11:06 till

Mhhh, thats strange. Does 0.0.0.0 work?

big-r81 avatar Jul 02 '23 12:07 big-r81

I don't know enough Erlang to find out what any maps to. But it seems like a type?

The third parameter of the config:get/3 function is the default value when no value could be found for the key under the section (identified by the first and second parameters). That is, any in this context, the default value of bind_address in the http section.

pgj avatar Jul 05 '23 13:07 pgj