willemodendaal opened a new issue #3257:
URL: https://github.com/apache/couchdb/issues/3257


   ## Description
   
   I run a CouchDb server in a local container (for local development only). I 
expect the server to automatically create the system databases on startup (eg. 
"_users") , because I have the `[couchdb] single_node=true` setting in local.ini
   
   According to [the 
documentation](https://docs.couchdb.org/en/stable/setup/single-node.html), this 
should work. But when my server starts up, there are no system databases (even 
after waiting several minutes).
   
   I don't want to initialize the system dbs using the web interface, because I 
need to automate creation of the server.
   
   ## Steps to Reproduce
   
   Use the following dockerfile:
   
   ```
   FROM couchdb:3.1
   WORKDIR /src
   COPY ./mycustom.ini .
   COPY ./local.ini .
   
   RUN cp mycustom.ini /opt/couchdb/etc/local.d/
   RUN cp local.ini /opt/couchdb/etc/
   ```
   
   And use the following local.ini file (on local machine, copied into the 
container). A duplicate of the default couchdb ini file, with added single_node 
line:
   
   ```
   [couchdb]
   single_node=true
   
   [couch_peruser]
   
   [chttpd]
   
   [httpd]
   
   [couch_httpd_auth]
   
   [ssl]
   
   [vhosts]
   
   [admins]
   
   ```
   
   And use the following mycustom.ini file to use different default port. (I 
attempted to set single_node=true here as well, but no luck)
   
   ```
   [couchdb] 
   single_node=true 
   
   [httpd]
   enable_cors = true
   
   [chttpd]
   port = 31986
   ```
   
   Then build and run the container.
   
   Then open the couchDb Fauxton at http://localhost:31986/_utils/ and view 
list of databases.
   
   
   ## Expected Behaviour
   
   The _users database should exist. But no databases exist:
   
   
![image](https://user-images.githubusercontent.com/915354/98678573-6fd89280-2367-11eb-82c2-490a589c72f0.png)
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as 
possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. 
)
   
   * CouchDB version used: 
     * 
{"couchdb":"Welcome","version":"3.1.1","git_sha":"ce596c65d","uuid":"e6520921195ec9c7db9e6c0baecebc1b","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The
 Apache Software Foundation"}}
   
   * Browser name and version:
     * Chrome v86.0.4240.183 (Official Build) (64-bit)
   
   * Operating system and version:
     * Microsoft Windows 10 Pro,  10.0.19041 N/A Build 19041
     * Docker version 19.03.13, build 4484c46d9d
     * Kubernetes version: Client Version: version.Info{Major:"1", Minor:"19", 
GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", 
GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", 
Compiler:"gc", Platform:"windows/amd64"}
   Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", 
GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", 
BuildDate:"2020-10-14T12:41:49Z", GoVersion:"go1.15.2", Compiler:"gc", 
Platform:"linux/amd64"}
   
   ## Additional Context
   
   The couchDb container logs:
   
   [info] 2020-11-10T13:05:33.247999Z nonode@nohost <0.11.0> -------- 
Application couch_log started on node nonode@nohost
   [info] 2020-11-10T13:05:33.259311Z nonode@nohost <0.11.0> -------- 
Application folsom started on node nonode@nohost
   [info] 2020-11-10T13:05:33.311392Z nonode@nohost <0.11.0> -------- 
Application couch_stats started on node nonode@nohost
   [info] 2020-11-10T13:05:33.311526Z nonode@nohost <0.11.0> -------- 
Application khash started on node nonode@nohost
   [info] 2020-11-10T13:05:33.322683Z nonode@nohost <0.11.0> -------- 
Application couch_event started on node nonode@nohost
   [info] 2020-11-10T13:05:33.322819Z nonode@nohost <0.11.0> -------- 
Application hyper started on node nonode@nohost
   [info] 2020-11-10T13:05:33.331710Z nonode@nohost <0.11.0> -------- 
Application ibrowse started on node nonode@nohost
   [info] 2020-11-10T13:05:33.340585Z nonode@nohost <0.11.0> -------- 
Application ioq started on node nonode@nohost
   [info] 2020-11-10T13:05:33.340716Z nonode@nohost <0.11.0> -------- 
Application mochiweb started on node nonode@nohost
   [info] 2020-11-10T13:05:33.346874Z nonode@nohost <0.216.0> -------- 
Preflight check: Asserting Admin Account
   
   [info] 2020-11-10T13:05:33.350830Z nonode@nohost <0.216.0> -------- Apache 
CouchDB 3.1.1 is starting.
   
   [info] 2020-11-10T13:05:33.350889Z nonode@nohost <0.217.0> -------- Starting 
couch_sup
   [notice] 2020-11-10T13:05:33.386403Z nonode@nohost <0.82.0> -------- config: 
[admins] admin set to ****redacted**** for reason nil
   [info] 2020-11-10T13:05:33.435463Z nonode@nohost <0.216.0> -------- Apache 
CouchDB has started. Time to relax.
   
   [info] 2020-11-10T13:05:33.438418Z nonode@nohost <0.11.0> -------- 
Application couch started on node nonode@nohost
   [info] 2020-11-10T13:05:33.438559Z nonode@nohost <0.11.0> -------- 
Application ets_lru started on node nonode@nohost
   [notice] 2020-11-10T13:05:33.456718Z nonode@nohost <0.250.0> -------- 
rexi_server : started servers
   [notice] 2020-11-10T13:05:33.460052Z nonode@nohost <0.254.0> -------- 
rexi_buffer : started servers
   [info] 2020-11-10T13:05:33.460249Z nonode@nohost <0.11.0> -------- 
Application rexi started on node nonode@nohost
   [warning] 2020-11-10T13:05:33.496314Z nonode@nohost <0.262.0> -------- 
creating missing database: _nodes
   [info] 2020-11-10T13:05:33.496376Z nonode@nohost <0.263.0> -------- 
open_result error {not_found,no_db_file} for _nodes
   [warning] 2020-11-10T13:05:33.590652Z nonode@nohost <0.278.0> -------- 
creating missing database: _dbs
   [warning] 2020-11-10T13:05:33.590694Z nonode@nohost <0.277.0> -------- 
creating missing database: _dbs
   [info] 2020-11-10T13:05:33.590730Z nonode@nohost <0.280.0> -------- 
open_result error {not_found,no_db_file} for _dbs
   [notice] 2020-11-10T13:05:33.618702Z nonode@nohost <0.292.0> -------- 
mem3_reshard_dbdoc start init()
   [notice] 2020-11-10T13:05:33.624984Z nonode@nohost <0.294.0> -------- 
mem3_reshard start init()
   [notice] 2020-11-10T13:05:33.625040Z nonode@nohost <0.295.0> -------- 
mem3_reshard db monitor <0.295.0> starting
   [notice] 2020-11-10T13:05:33.628318Z nonode@nohost <0.294.0> -------- 
mem3_reshard starting reloading jobs
   [notice] 2020-11-10T13:05:33.628361Z nonode@nohost <0.294.0> -------- 
mem3_reshard finished reloading jobs
   [info] 2020-11-10T13:05:33.629079Z nonode@nohost <0.11.0> -------- 
Application mem3 started on node nonode@nohost
   [info] 2020-11-10T13:05:33.629182Z nonode@nohost <0.11.0> -------- 
Application fabric started on node nonode@nohost
   [info] 2020-11-10T13:05:33.662937Z nonode@nohost <0.11.0> -------- 
Application chttpd started on node nonode@nohost
   [info] 2020-11-10T13:05:33.675574Z nonode@nohost <0.11.0> -------- 
Application couch_index started on node nonode@nohost
   [info] 2020-11-10T13:05:33.675639Z nonode@nohost <0.11.0> -------- 
Application couch_mrview started on node nonode@nohost
   [info] 2020-11-10T13:05:33.675743Z nonode@nohost <0.11.0> -------- 
Application couch_plugins started on node nonode@nohost
   [notice] 2020-11-10T13:05:33.678567Z nonode@nohost <0.324.0> -------- 
chttpd_auth_cache changes listener died because the _users database does not 
exist. Create the database to silence this notice.
   [error] 2020-11-10T13:05:33.678665Z nonode@nohost emulator -------- Error in 
process <0.325.0> with exit value:
   
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,374}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,96}]},{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,198}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,145}]}]}
   
   [info] 2020-11-10T13:05:33.719995Z nonode@nohost <0.11.0> -------- 
Application couch_replicator started on node nonode@nohost
   [info] 2020-11-10T13:05:33.750550Z nonode@nohost <0.11.0> -------- 
Application couch_peruser started on node nonode@nohost
   [info] 2020-11-10T13:05:33.792142Z nonode@nohost <0.11.0> -------- 
Application ddoc_cache started on node nonode@nohost
   [info] 2020-11-10T13:05:33.804017Z nonode@nohost <0.11.0> -------- 
Application dreyfus started on node nonode@nohost
   [info] 2020-11-10T13:05:33.824547Z nonode@nohost <0.11.0> -------- 
Application global_changes started on node nonode@nohost
   [info] 2020-11-10T13:05:33.824584Z nonode@nohost <0.11.0> -------- 
Application jiffy started on node nonode@nohost
   [info] 2020-11-10T13:05:33.840372Z nonode@nohost <0.11.0> -------- 
Application jwtf started on node nonode@nohost
   [info] 2020-11-10T13:05:33.869704Z nonode@nohost <0.11.0> -------- 
Application ken started on node nonode@nohost
   [info] 2020-11-10T13:05:33.891545Z nonode@nohost <0.11.0> -------- 
Application mango started on node nonode@nohost
   [info] 2020-11-10T13:05:33.900346Z nonode@nohost <0.11.0> -------- 
Application setup started on node nonode@nohost
   [info] 2020-11-10T13:05:33.936550Z nonode@nohost <0.11.0> -------- 
Application smoosh started on node nonode@nohost
   [info] 2020-11-10T13:05:33.936570Z nonode@nohost <0.11.0> -------- 
Application snappy started on node nonode@nohost
   [info] 2020-11-10T13:05:33.936590Z nonode@nohost <0.11.0> -------- 
Application recon started on node nonode@nohost
   [notice] 2020-11-10T13:05:38.687870Z nonode@nohost <0.324.0> -------- 
chttpd_auth_cache changes listener died because the _users database does not 
exist. Create the database to silence this notice.
   [error] 2020-11-10T13:05:38.693616Z nonode@nohost emulator -------- Error in 
process <0.463.0> with exit value:
   
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,374}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,96}]},{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,198}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,145}]}]}
   
   [notice] 2020-11-10T13:05:38.693711Z nonode@nohost <0.346.0> -------- 
couch_replicator_clustering : cluster stable
   [notice] 2020-11-10T13:05:38.767402Z nonode@nohost <0.356.0> -------- 
Started replicator db changes listener <0.464.0>
   [info] 2020-11-10T13:05:38.768057Z nonode@nohost <0.466.0> -------- 
open_result error {not_found,no_db_file} for _replicator
   [notice] 2020-11-10T13:05:43.690260Z nonode@nohost <0.324.0> -------- 
chttpd_auth_cache changes listener died because the _users database does not 
exist. Create the database to silence this notice.
   [error] 2020-11-10T13:05:43.690398Z nonode@nohost emulator -------- Error in 
process <0.518.0> with exit value:
   
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,374}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,96}]},{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,198}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,145}]}]}
   
   [notice] 2020-11-10T13:05:48.457433Z nonode@nohost <0.250.0> -------- 
rexi_server : cluster stable
   [notice] 2020-11-10T13:05:48.457475Z nonode@nohost <0.254.0> -------- 
rexi_buffer : cluster stable
   [notice] 2020-11-10T13:05:48.691218Z nonode@nohost <0.324.0> -------- 
chttpd_auth_cache changes listener died because the _users database does not 
exist. Create the database to silence this notice.
   [error] 2020-11-10T13:05:48.691335Z nonode@nohost emulator -------- Error in 
process <0.551.0> with exit value:
   
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,374}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,96}]},{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,198}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,145}]}]}
   
   [notice] 2020-11-10T13:05:53.692250Z nonode@nohost <0.324.0> -------- 
chttpd_auth_cache changes listener died because the _users database does not 
exist. Create the database to silence this notice.
   [error] 2020-11-10T13:05:53.692382Z nonode@nohost emulator -------- Error in 
process <0.600.0> with exit value:
   
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,374}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,96}]},{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,198}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,145}]}]}
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to