Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core dump, docker official image, export ERL_FLAGS=" -name couchdb " #5195

Open
juanbrein opened this issue Aug 22, 2024 · 2 comments
Open

Comments

@juanbrein
Copy link

Description

When I run the official docker image using these environment variables it cores dump:

export COUCHDB_ERLANG_COOKIE=XXX
export COUCHDB_PASSWORD=XXX
export COUCHDB_SECRET=XXX
export COUCHDB_USER=admin
export ERL_FLAGS=" -name couchdb "

Steps to Reproduce

$ docker run -ti --rm \
--env COUCHDB_ERLANG_COOKIE=JIxa5jYokaO2IlE5Hf1l \
--env COUCHDB_PASSWORD=password \
--env COUCHDB_SECRET=77qz5K82uAkbIrBFBsgG \
--env COUCHDB_USER=admin \
--env COUCHDB_VERSION=3.3.3 \
--env ERL_FLAGS=" -name couchdb " \
couchdb
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}})

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

Expected Behaviour

Should be able to run couchdb

Your Environment

  • CouchDB version used: 3.3.3
  • Operating system and version: ubuntu:22.04

Additional Context

The reason I need this is because I run couchdb in Kubernetes using the official helm chart. I also have a plain docker compose configuration in my local machine. When I copy the data from one environment to another I get the infamous error message "This database failed to load."

I read on different forums that the cluster name has to be the same in order for that work.

I can't find any documentation related unfortunately.

@nickva
Copy link
Contributor

nickva commented Aug 22, 2024

Thank you for your report @juanbrein

{'EXIT',nodistribution}} indicates an issue with erlang distribution (that's the erlang VM inter-node clustering system).

Unfortunately I don't use couchdb with docker much so don't have an exact reason for the failure. It may be a networking issue or a permissions issue.

Also try to take a look at https://hub.docker.com/_/couchdb it's one of experiments of creating a cluster with compose and running some basic load testing https://gist.github.com/nickva/cf9cac975ceb062b61872f7857a0e104. Maybe that will give you some hints.

@juanbrein
Copy link
Author

Thanks for the hint! I tried using NODENAME, but the problem is that it sets the -name flag to [email protected] if NODENAME is 127.0.0.1 ... and that name is different from the one assigned on kubernetes -name couchdb ....

Another way would be to change the node name in the shard files... but that is not documented either...

I have to say that even though the restore process from / to same configurations work... if you are in scenarios like myself... which I believe is not so radical... it doesn't work, the errors are not very useful and is not documented...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants