0

can someone confirm that the single_node parameter described in https://docs.couchdb.org/en/stable/setup/single-node.html only works for CouchDB >= 3.0 or it should also work with CouchDB 2.3.1?

I have set single_node=true in a CouchDB 2.3.1 installation and I keep getting the errors that the _users database is not found:

[error] 2020-08-21T07:15:55.290294Z couchdb@faa10f55f8f6 emulator -------- Error in process <0.1745.0> on node couchdb@faa10f55f8f6 with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,395}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,370}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,86}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,39}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,195}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,142}]}]}

Which means that the _users and _replicator databases haven't been created automatically. I repeat the same experiment with CouchDB 3.1 and the above databases are auto-created and I don't get the error.

Is there any way to make single_node configuration work on 2.3.1?

mgangelov
  • 1
  • 2
  • Yes, single-node configuration was added with CouchDB 2.0.0, when multi-node was added. Prior to that, single-node was the only option. You can browse the documentation for a specific version if you want. Here are the 2.3.1 docs of the same section, for example: https://docs.couchdb.org/en/2.3.1/setup/single-node.html – Jonathan Hall Aug 24 '20 at 19:48
  • Do you perhaps mean 3.0.0? Because the 2.3.1 docs that you linked don't mention the `single_node` configure parameter. Anyways, I managed to resolve my problem by creating a function which queries the `_up` endpoint of the DB until it is up, and then creates the `_users` and `_replicator` databases using `curl`. The function is then executed as part of an overwritten Docker entrypoint of the couchDB image. Thank you for your help! – mgangelov Aug 27 '20 at 14:45
  • I'm sorry, I misread/misunderstood your question originally. You are correct, the `single_node` option was added in 3.x. – Jonathan Hall Aug 27 '20 at 15:01

0 Answers0