uyouthe opened a new issue #61: couchdb failed to start
URL: https://github.com/apache/couchdb-docker/issues/61
 
 
   When I do `docker-compose up` with couchdb, it fails to start and produces 
the following messages:
   ```
   couchdb_1      | [info] 2018-01-30T20:43:10.781634Z nonode@nohost <0.7.0> 
-------- Application couch_log started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:10.802063Z nonode@nohost <0.7.0> 
-------- Application folsom started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:10.938142Z nonode@nohost <0.7.0> 
-------- Application couch_stats started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:10.938478Z nonode@nohost <0.7.0> 
-------- Application khash started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:10.977016Z nonode@nohost <0.7.0> 
-------- Application couch_event started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:10.988872Z nonode@nohost <0.7.0> 
-------- Application ibrowse started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:11.005356Z nonode@nohost <0.7.0> 
-------- Application ioq started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:11.005657Z nonode@nohost <0.7.0> 
-------- Application mochiweb started on node nonode@nohost
   couchdb_1      | [info] 2018-01-30T20:43:11.041878Z nonode@nohost <0.195.0> 
-------- Apache CouchDB 2.1.1 is starting.
   couchdb_1      | 
   couchdb_1      | [info] 2018-01-30T20:43:11.042771Z nonode@nohost <0.196.0> 
-------- Starting couch_sup
   couchdb_1      | [notice] 2018-01-30T20:43:11.115307Z nonode@nohost <0.82.0> 
-------- config: [admins] admin set to 
-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41a4b436cc2f80f9fcc48022b388aa3,10
 for reason nil
   couchdb_1      | [error] 2018-01-30T20:43:11.121831Z nonode@nohost <0.82.0> 
-------- gen_server config terminated with reason: no match of right hand value 
{error,enospc} at config_writer:save_to_file/2(line:38) <= 
config:handle_call/3(line:242) <= gen_server:handle_msg/5(line:580) <= 
proc_lib:init_p_do_apply/3(line:237)
   couchdb_1      |   last msg: 
{set,"admins","admin","-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41a4b436cc2f80f9fcc48022b388aa3,10",true,nil}
   couchdb_1      |      state: 
{config,[],["/opt/couchdb/bin/../etc/default.ini","/opt/couchdb/bin/../etc/local.ini","/opt/couchdb/bin/../etc/local.d/local.ini"],"/opt/couchdb/bin/../etc/local.d/local.ini"}
   couchdb_1      | [error] 2018-01-30T20:43:11.122386Z nonode@nohost <0.82.0> 
-------- CRASH REPORT Process config (<0.82.0>) with 0 neighbors exited with 
reason: no match of right hand value {error,enospc} at 
config_writer:save_to_file/2(line:38) <= config:handle_call/3(line:242) <= 
gen_server:handle_msg/5(line:580) <= proc_lib:init_p_do_apply/3(line:237) at 
gen_server:terminate/6(line:737) <= proc_lib:init_p_do_apply/3(line:237); 
initial_call: {config,init,['Argument__1']}, ancestors: [config_sup,<0.80.0>], 
messages: [], links: [<0.81.0>], dictionary: [], trap_exit: false, status: 
running, heap_size: 75113, stack_size: 27, reductions: 67251
   couchdb_1      | [error] 2018-01-30T20:43:11.126458Z nonode@nohost <0.195.0> 
-------- Error starting Apache CouchDB:
   couchdb_1      | 
   couchdb_1      |     
{error,{shutdown,{failed_to_start_child,couch_primary_services,{shutdown,{failed_to_start_child,couch_server,{{{badmatch,{error,enospc}},[{config_writer,save_to_file,2,[{file,"src/config_writer.erl"},{line,38}]},{config,handle_call,3,[{file,"src/config.erl"},{line,242}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]},{gen_server,call,[config,{set,"admins","admin","-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41a4b436cc2f80f9fcc48022b388aa3,10",true,nil},30000]}}}}}}}
   couchdb_1      | 
   couchdb_1      | 
   couchdb_1      | [error] 2018-01-30T20:43:11.132799Z nonode@nohost <0.81.0> 
-------- Supervisor config_sup had child config started with 
config:start_link(["/opt/couchdb/bin/../etc/default.ini","/opt/couchdb/bin/../etc/local.ini","/opt/couchdb/bin/../..."])
 at <0.82.0> exit with reason no match of right hand value {error,enospc} at 
config_writer:save_to_file/2(line:38) <= config:handle_call/3(line:242) <= 
gen_server:handle_msg/5(line:580) <= proc_lib:init_p_do_apply/3(line:237) in 
context child_terminated
   couchdb_1      | [error] 2018-01-30T20:43:11.133521Z nonode@nohost <0.201.0> 
-------- CRASH REPORT Process  (<0.201.0>) with 0 neighbors exited with reason: 
{{{badmatch,{error,enospc}},[{config_writer,save_to_file,2,[{file,"src/config_writer.erl"},{line,38}]},{config,handle_call,3,[{file,"src/config.erl"},{line,242}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]},{gen_server,call,[config,{set,"admins","admin","-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41a4b436cc2f80f9fcc48022b388aa3,10",true,nil},30000]}}
 at gen_server:init_it/6(line:330) <= proc_lib:init_p_do_apply/3(line:237); 
initial_call: {couch_server,init,['Argument__1']}, ancestors: 
[couch_primary_services,couch_sup,<0.195.0>], messages: [], links: [<0.198.0>], 
dictionary: [], trap_exit: false, status: running, heap_size: 987, stack_size: 
27, reductions: 1072
   couchdb_1      | [error] 2018-01-30T20:43:11.140149Z nonode@nohost <0.198.0> 
-------- Supervisor couch_primary_services had child couch_server started with 
couch_server:sup_start_link() at undefined exit with reason 
{{{badmatch,{error,enospc}},[{config_writer,save_to_file,2,[{file,"src/config_writer.erl"},{line,38}]},{config,handle_call,3,[{file,"src/config.erl"},{line,242}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]},{gen_server,call,[config,{set,"admins","admin","-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41a4b436cc2f80f9fcc48022b388aa3,10",true,nil},30000]}}
 in context start_error
   couchdb_1      | [error] 2018-01-30T20:43:11.145309Z nonode@nohost <0.196.0> 
-------- Supervisor couch_sup had child couch_primary_services started with 
couch_primary_sup:start_link() at undefined exit with reason 
{shutdown,{failed_to_start_child,couch_server,{{{badmatch,{error,enospc}},[{config_writer,save_to_file,2,[{file,"src/config_writer.erl"},{line,38}]},{config,handle_call,3,[{file,"src/config.erl"},{line,242}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]},{gen_server,call,[config,{set,"admins","admin","-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41a4b436cc2f80f9fcc48022b388aa3,10",true,nil},30000]}}}}
 in context start_error
   couchdb_1      | [error] 2018-01-30T20:43:11.146192Z nonode@nohost <0.194.0> 
-------- CRASH REPORT Process  (<0.194.0>) with 0 neighbors exited with reason: 
{{shutdown,{failed_to_start_child,couch_primary_services,{shutdown,{failed_to_start_child,couch_server,{{{badmatch,{error,enospc}},[{config_writer,save_to_file,2,[{file,"src/config_writer.erl"},{line,38}]},{config,handle_call,3,[{file,"src/config.erl"},{line,242}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]},{gen_server,call,[config,{set,"admins","admin","-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41...",...},...]}}}}}},...}
 at application_master:init/4(line:133) <= 
proc_lib:init_p_do_apply/3(line:237); initial_call: 
{application_master,init,['Argument__1','Argument__2',...]}, ancestors: 
[<0.193.0>], messages: [{'EXIT',<0.195.0>,normal}], links: [<0.193.0>,<0.7.0>], 
dictionary: [], trap_exit: true, status: running, heap_size: 987, stack_size: 
27, reductions: 158
   couchdb_1      | [info] 2018-01-30T20:43:11.154073Z nonode@nohost <0.7.0> 
-------- Application couch exited with reason: 
{{shutdown,{failed_to_start_child,couch_primary_services,{shutdown,{failed_to_start_child,couch_server,{{{badmatch,{error,enospc}},[{config_writer,save_to_file,2,[{file,"src/config_writer.erl"},{line,38}]},{config,handle_call,3,[{file,"src/config.erl"},{line,242}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]},{gen_server,call,[config,{set,"admins","admin","-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41...",...},...]}}}}}},...}
   couchdb_1      | Error writing to pipe: Broken pipe
   couchdb_1      | [os_mon] cpu supervisor port (cpu_sup): Error writing to 
Erlang
   couchdb_1      | {"Kernel pid 
terminated",application_controller,"{application_start_failure,couch,{{shutdown,{failed_to_start_child,couch_primary_services,{shutdown,{failed_to_start_child,couch_server,{{{badmatch,{error,enospc}},[{config_writer,save_to_file,2,[{file,\"src/config_writer.erl\"},{line,38}]},{config,handle_call,3,[{file,\"src/config.erl\"},{line,242}]},{gen_server,handle_msg,5,[{file,\"gen_server.erl\"},{line,580}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,237}]}]},{gen_server,call,[config,{set,\"admins\",\"admin\",\"-pbkdf2-da45cb31041812a59a39d1bdae20729842c198a6,a41a4b436cc2f80f9fcc48022b388aa3,10\",true,nil},30000]}}}}}},{couch_app,start,[normal,[]]}}}"}
   couchdb_1      | 
   couchdb_1      | Crash dump was written to: erl_crash.dump
   couchdb_1      | Kernel pid terminated (application_controller) 
({application_start_failure,couch,{{shutdown,{failed_to_start_child,couch_primary_services,{shutdown,{failed_to_start_child,couch_server,{{{badmatch,{e
   infrastructure_couchdb_1 exited with code 1
   ```
   
   My `Dockerfile` is pretty straightforward:
   ```
   FROM couchdb:2.1.1
   
   COPY local.ini /opt/couchdb/etc
   
   ENV NAME Couchdb
   EXPOSE 5984
   ```
   
   and `local.ini` only enables CORS and sets admin username and password.
   
   ## Environment
   * Version used: 2.1.1
   * Operating System and version: Ubuntu 16.04
   
   
   I've tried to fix that just like @wohali 
[recommended](https://github.com/apache/couchdb/issues/774), by setting 
`ulimit` higher, and that didn't worked.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to