apache / couchdb-docker

Semi-official Apache CouchDB Docker images
https://github.com/apache/couchdb-docker
Apache License 2.0
261 stars 136 forks source link

CouchDB 3.2.2 now crashes when specifying COUCHDB_ERLANG_COOKIE #241

Closed adam8797 closed 1 year ago

adam8797 commented 1 year ago

Expected Behavior

CouchDB should start with a designated COUCHDB_ERLANG_COOKIE, and ERL_FLAGS

Current Behavior

The container crashes immediately

Possible Solution

I believe this is related to #234 as this was working without issue before

Steps to Reproduce (for bugs)

Execute

docker run --name test --rm -it -e COUCHDB_ERLANG_COOKIE=thisisatest -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=admin -e ERL_FLAGS="-name couchdb" couchdb:3.2.2

CouchDB crashes immediately with this output:

{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{{error,\"Error when reading /root/.erlang.cookie: eacces\"},[{auth,init_cookie,0,[{file,\"auth.erl\"},{line,290}]},{auth,init,1,[{file,\"auth.erl\"},{line,144}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,417}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,385}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]}}}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{{error,"Error when reading /root/.erl

Crash dump is being written to: erl_crash.dump...done

Your Environment

Crashes both on Windows WSL and in our Kubernetes environment

adam8797 commented 1 year ago

It could also be related to #236, as it was also pushed overtop the 3.2.2 tag

willholley commented 1 year ago

@adam8797 the fix (#237) is in the apache/couchdb image - I think there's a delay before the official docker couchdb image picks up the fix.

adam8797 commented 1 year ago

Thanks, I just saw someone push a new image to dockerhub. Is it safe to assume that would be built from the current head of this repo?

I can re-test tomorrow and see if pulling a new image fixes the issue.

adam8797 commented 1 year ago

Looks like the image built yesterday works correctly. Thanks for the assist.

Used tag 3.2.2@sha256:f0bfde87b296fe0c4a08b769e4a5cfcfb79d72d010fb34609d632e9193c78644 for future reference