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

CouchDB 2.1.1 crashes and keeps restarting - macOS High Sierra 10.13.1 #1015

Closed
mr-bobz opened this issue Nov 24, 2017 · 12 comments
Closed

CouchDB 2.1.1 crashes and keeps restarting - macOS High Sierra 10.13.1 #1015

mr-bobz opened this issue Nov 24, 2017 · 12 comments
Labels

Comments

@mr-bobz
Copy link

mr-bobz commented Nov 24, 2017

Updated from macOS Sierra to High Sierra (10.13.1)

Reinstalled CouchDB to latest (2.1.1), downloaded from http://couchdb.apache.org/

Current Behavior

Cannot connect to DB from app, but the following works:

curl http://localhost:5984

{"couchdb":"Welcome","version":"2.1.1","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}}

http://127.0.0.1:5984/_utils/

Fauxton loads fine, but restart below fails

curl http://localhost:5984/_restart

{"error":"not_found","reason":"Database does not exist."}

CouchDB2.log flooded with this:

[notice] 2017-11-24T03:10:37.191333Z couchdb@localhost <0.334.0> -------- chttpd_auth_cache changes listener died database_does_not_exist at mem3_shards:load_shards_from_db/6(line:403) <= mem3_shards:load_shards_from_disk/1(line:378) <= mem3_shards:load_shards_from_disk/2(line:407) <= mem3_shards:for_docid/3(line:91) <= fabric_doc_open:go/3(line:38) <= chttpd_auth_cache:ensure_auth_ddoc_exists/2(line:187) <= chttpd_auth_cache:listen_for_changes/1(line:134)
[error] 2017-11-24T03:10:37.191394Z couchdb@localhost emulator -------- Error in process <0.1701.0> on node couchdb@localhost with exit value:
{database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,403}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,378}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,407}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,91}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,38}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,187}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,134}]}]}

Possible Solution

None, install via homebrew?

Steps to Reproduce (for bugs)

  1. Update to latest macOS
  2. Update to latest CouchDB
  3. Check log

Context

No white space in mounts - #732, #840

/bin/df -lk
Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s1 488347692 311004840 175607980 64% 3356060 9223372036851419747 0% /
/dev/disk1s4 488347692 1048596 175607980 1% 1 9223372036854775806 0% /private/var/vm

There are no DBs created. Created one, still same error

[notice] 2017-11-24T03:27:07.461656Z couchdb@localhost <0.17549.0> be1954d2d2 127.0.0.1:5984 127.0.0.1 undefined GET /testdb1?_=1511494027049 200 ok 1

Uninstalled homebrew and all packages to avoid conflicts! No change.

Your Environment

CouchDB 2.1.1
macOS High Sierra 10.13.1

@mr-bobz
Copy link
Author

mr-bobz commented Nov 24, 2017

Found some info here that I need to setup database before using. Don't remember doing this last time, may be too long! Would have been great if this was shown as welcome page in Fauxton console :-)

https://issues.apache.org/jira/browse/COUCHDB-3163
https://stackoverflow.com/questions/41553458/couchdb-2-0-installation-error
#739

Created the tables using the following:

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

Now log flooded with:

[info] 2017-11-24T07:43:09.316275Z couchdb@localhost <0.218.0> -------- couch_proc_manager <0.1739.4> died normal
[error] 2017-11-24T07:43:09.316293Z couchdb@localhost <0.5611.1> 8acc89488f OS Process Error <0.1739.4> :: {os_process_error,{exit_status,134}}

@snollygolly
Copy link

I have the same problem as well. Any idea what's causing those errors? I'm unable to create views from inside of Fauxton or within my app.

@mr-bobz
Copy link
Author

mr-bobz commented Nov 27, 2017

Yes, creating index/view seems to be where it is failing for me too now:

[{"id":"_design/resources","error":"unknown_error","reason":"undefined"},{"id":"_design/annotations","error":"unknown_error","reason":"undefined"}]

@lyudmil
Copy link

lyudmil commented Nov 28, 2017

@snollygolly, @mr-bobz, I think you might want to take a look at #979. The current workaround seems to be brew install nspr, but the real fix is probably going to end up being packaging the missing libraries into the app.

@snollygolly
Copy link

Thanks @lyudmil!

I installed that package like you suggested and I was able to create a view with no problems.

@brendand
Copy link

brendand commented Dec 2, 2017

I don't have a brew command on my Mac, so I can't install nspr.

Is there a way to get this into the package itself so it's not a third-party dependency?

@mr-bobz
Copy link
Author

mr-bobz commented Dec 4, 2017

Ideally CouchDB package for macOS should handle it.

For now, you can install brew from here
https://brew.sh/
eg:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

and run

brew install nspr

@brendand
Copy link

brendand commented Dec 5, 2017

Yup. I did that and it does work. I was just hoping to not have to have home-brew on my Mac. Just more stuff to keep track of. Plus teaching my customers how to install home brew isn't the most pleasant thing to have to do. Kind of takes the whole "it just works" thing on the Mac to a bad place.

@craftzdog
Copy link

I've got below error log flooded:

[error] 2017-12-06T05:48:15.347175Z couchdb@localhost <0.1994.0> -------- OS Process Error <0.6574.1> :: {os_process_error,{exit_status,134}}

After having brew install nspr, it got fixed! Thanks @lyudmil.

@kocolosk kocolosk added the macos label Dec 14, 2017
@sauoq
Copy link

sauoq commented Dec 15, 2017

Installing homebrew is not a satisfactory solution as brew and macports don't always play well together. I use macports. Manually linking or copying the library to the brew install location is less than ideal.

@johs
Copy link

johs commented Jan 2, 2018

Installing homebrew or macports requires installing/updating Xcode, so by the time a new user has figured out that this is the workaround to make CouchDB work on a Mac, I am afraid we have host her/him forever.

@wohali
Copy link
Member

wohali commented Jan 16, 2018

Duplicate of #979.

@wohali wohali closed this as completed Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants