nosqlerlangcouchdb

Why is couchdb looking for "_users" database?


What does this error mean in CouchDB logs? I see that it is looking for some "_users" database. But I don't have a database with that name. Is there anything I can do to stop these errors?

[notice] 2021-10-12T14:36:18.259160Z [email protected] <0.328.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:395) <= mem3_shards:load_shards_from_disk/1(line:370) <= mem3_shards:load_shards_from_disk/2(line:399) <= mem3_shards:for_docid/3(line:86) <= fabric_doc_open:go/3(line:39) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:195) <= chttpd_auth_cache:listen_for_changes/1(line:142)
              
[error] 2021-10-12T14:36:18.259219Z [email protected] emulator -------- Error in process <0.2113.0> on node '[email protected]' 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}]}]}

Solution

  • I found the solution in Couchdb documentation

    https://docs.couchdb.org/en/latest/setup/single-node.html

    Make sure to create the three system databases manually on startup:

    curl -X PUT http://127.0.0.1:5984/_users

    curl -X PUT http://127.0.0.1:5984/_replicator

    curl -X PUT http://127.0.0.1:5984/_global_changes

    Note that the last of these is not necessary if you do not expect to be using the global changes feed. Feel free to delete this database if you have created it, it has grown in size, and you do not need the function (and do not wish to waste system resources on compacting it regularly.)