Comments (11)
Thanks! The new snap works like a charm.
from couchdb.
Hi,
However, with 3.3.3 a cookie is required (installation documentation: "sudo snap set couchdb admin={password} setcookie={cookie}"), since the old configuration does not have a cookie, couchdb stops with "Monster detected ohno!, aborting startup."
The cookie value with this message is "monster", which isn't allowed anymore. Can you look into your vm.args
file and change it to another value and try to restart your server?
from couchdb.
Hey,
I changed it to a custom value. But then I get "initialize_nodelist(line 110) fails to initialize" which I tried to explain in the issue.
To verify: the user is expected to change vm.args and then it should work?
Why is the documentation stating something else (it should be set with "snap set ..."?
Best, Steffen
from couchdb.
The snap hook should be found here.
ls -l /snap/couchdb/current/snap/hooks/configure
-rwxr-xr-x 1 root root 1672 Nov 17 18:05 /snap/couchdb/current/snap/hooks/configure
You can try this to see if the script is working for you
$ cd /var/snap/couchdb/current/etc
$ grep setcookie vm.args
-setcookie dOAAd8fWUua3Ca8cmaSdGU3gAn35gPH0z7Xmi4GLx4Q8E9Os
$ sudo snap set couchdb setcookie=`echo $(dd if=/dev/random bs=1 count=38 status=none | base64 | tr -cd '[:alnum:]')`
$ grep setcookie vm.args
-setcookie ySKMODxwg8qeY6OmtaTVe7LfFtSaQAZ4Z0UQVIXlIDtRu3E
But you can also edit the file by hand and restart the snap.
initialize_nodelist(line 110) fails to initialize
sounds like a different issue. What else is in the logs?
from couchdb.
Hey,
When I run it:
$ ls -l /snap/couchdb/current/snap/hooks/configure
ls: cannot access '/snap/couchdb/current/snap/hooks/configure': No such file or directory
That might be the reason why 'sudo snap set' does not work.
Manual setting:
$ grep setcookie vm.args
-setcookie UNX4319uTTWLyhyEl6WC0H2v492WFO5kGZAYzsh8cj1WIBvMU8
$ sudo snap restart couchdb
$ curl http://127.0.0.1:5984/
curl: (7) Failed to connect to 127.0.0.1 port 5984 after 0 ms: Connection refused
also does not work.
Here the log
$ tail -n 20 /var/log/syslog
Jan 4 10:51:57 abcde kernel: [ 7945.270124] audit: type=1400 audit(1704361917.930:6492): apparmor="DENIED" operation="open" profile="snap.couchdb.server" name="/sys/fs/cgroup/cgroup.controllers" pid=322552 comm="beam.smp" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Jan 4 10:51:57 abcde kernel: [ 7945.271858] audit: type=1400 audit(1704361917.934:6493): apparmor="DENIED" operation="open" profile="snap.couchdb.server" name="/sys/fs/cgroup/cgroup.controllers" pid=322552 comm="beam.smp" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.429844Z [email protected] <0.254.0> -------- Preflight check: Checking For Monsters
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.429920Z [email protected] <0.254.0> -------- Preflight check: Asserting Admin Account
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.432461Z [email protected] <0.254.0> -------- Apache CouchDB 3.3.3 is starting.
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.432512Z [email protected] <0.255.0> -------- Starting couch_sup
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.469990Z [email protected] <0.254.0> -------- Apache CouchDB has started. Time to relax.
Jan 4 10:51:58 abcde couchdb.server[322552]: [notice] 2024-01-04T09:51:58.474650Z [email protected] <0.377.0> -------- rexi_server : started servers
Jan 4 10:51:58 abcde couchdb.server[322552]: [notice] 2024-01-04T09:51:58.475527Z [email protected] <0.381.0> -------- rexi_buffer : started servers
Jan 4 10:51:58 abcde couchdb.server[322552]: [warning] 2024-01-04T09:51:58.495393Z [email protected] <0.389.0> -------- creating missing database: _nodes
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.495437Z [email protected] <0.390.0> -------- open_result error {not_found,no_db_file} for _nodes
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.496611Z [email protected] <0.394.0> -------- open_result error {not_found,no_db_file} for _nodes
Jan 4 10:51:58 abcde couchdb.server[322552]: [error] 2024-01-04T09:51:58.496863Z [email protected] <0.387.0> -------- Supervisor mem3_sup had child mem3_nodes started with mem3_nodes:start_link() at undefined exit with reason no case clause matching {not_found,no_db_file} at mem3_util:ensure_exists/1(line:344) <= mem3_nodes:initialize_nodelist/0(line:110) <= mem3_nodes:init/1(line:55) <= gen_server:init_it/2(line:423) <= gen_server:init_it/6(line:390) <= proc_lib:init_p_do_apply/3(line:226) in context start_error
Jan 4 10:51:58 abcde couchdb.server[322552]: [error] 2024-01-04T09:51:58.497016Z [email protected] <0.387.0> -------- Supervisor mem3_sup had child mem3_nodes started with mem3_nodes:start_link() at undefined exit with reason no case clause matching {not_found,no_db_file} at mem3_util:ensure_exists/1(line:344) <= mem3_nodes:initialize_nodelist/0(line:110) <= mem3_nodes:init/1(line:55) <= gen_server:init_it/2(line:423) <= gen_server:init_it/6(line:390) <= proc_lib:init_p_do_apply/3(line:226) in context start_error
Jan 4 10:51:58 abcde couchdb.server[322552]: [error] 2024-01-04T09:51:58.497147Z [email protected] <0.389.0> -------- CRASH REPORT Process (<0.389.0>) with 0 neighbors crashed with reason: no case clause matching {not_found,no_db_file} at mem3_util:ensure_exists/1(line:344) <= mem3_nodes:initialize_nodelist/0(line:110) <= mem3_nodes:init/1(line:55) <= gen_server:init_it/2(line:423) <= gen_server:init_it/6(line:390) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {mem3_nodes,init,['Argument__1']}, ancestors: [mem3_sup,<0.386.0>], message_queue_len: 0, links: [<0.387.0>], dictionary: [{io_priority,{system,<<"_nodes">>}}], trap_exit: false, status: running, heap_size: 987, stack_size: 29, reductions: 48397
Jan 4 10:51:58 abcde couchdb.server[322552]: [error] 2024-01-04T09:51:58.497251Z [email protected] <0.389.0> -------- CRASH REPORT Process (<0.389.0>) with 0 neighbors crashed with reason: no case clause matching {not_found,no_db_file} at mem3_util:ensure_exists/1(line:344) <= mem3_nodes:initialize_nodelist/0(line:110) <= mem3_nodes:init/1(line:55) <= gen_server:init_it/2(line:423) <= gen_server:init_it/6(line:390) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {mem3_nodes,init,['Argument__1']}, ancestors: [mem3_sup,<0.386.0>], message_queue_len: 0, links: [<0.387.0>], dictionary: [{io_priority,{system,<<"_nodes">>}}], trap_exit: false, status: running, heap_size: 987, stack_size: 29, reductions: 48397
Jan 4 10:51:58 abcde couchdb.server[322552]: [error] 2024-01-04T09:51:58.497387Z [email protected] <0.385.0> -------- CRASH REPORT Process (<0.385.0>) with 0 neighbors exited with reason: {{shutdown,{failed_to_start_child,mem3_nodes,{{case_clause,{not_found,no_db_file}},[{mem3_util,ensure_exists,1,[{file,"src/mem3_util.erl"},{line,344}]},{mem3_nodes,initialize_nodelist,0,[{file,"src/mem3_nodes.erl"},{line,110}]},{mem3_nodes,init,1,[{file,"src/mem3_nodes.erl"},{line,55}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{mem3_app,start,[normal,...]}} at application_master:init/4(line:142) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {application_master,init,['Argument__1','Argument__2',...]}, ancestors: [<0.384.0>], message_queue_len: 1, links: [<0.384.0>,<0.16.0>], dictionary: [], trap_exit: true, status: running, heap_size: 987, stack_size: 29, reductions: 205
Jan 4 10:51:58 abcde couchdb.server[322552]: [error] 2024-01-04T09:51:58.497624Z [email protected] <0.385.0> -------- CRASH REPORT Process (<0.385.0>) with 0 neighbors exited with reason: {{shutdown,{failed_to_start_child,mem3_nodes,{{case_clause,{not_found,no_db_file}},[{mem3_util,ensure_exists,1,[{file,"src/mem3_util.erl"},{line,344}]},{mem3_nodes,initialize_nodelist,0,[{file,"src/mem3_nodes.erl"},{line,110}]},{mem3_nodes,init,1,[{file,"src/mem3_nodes.erl"},{line,55}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{mem3_app,start,[normal,...]}} at application_master:init/4(line:142) <= proc_lib:init_p_do_apply/3(line:226); initial_call: {application_master,init,['Argument__1','Argument__2',...]}, ancestors: [<0.384.0>], message_queue_len: 1, links: [<0.384.0>,<0.16.0>], dictionary: [], trap_exit: true, status: running, heap_size: 987, stack_size: 29, reductions: 205
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.497814Z [email protected] <0.16.0> -------- Application mem3 exited with reason: {{shutdown,{failed_to_start_child,mem3_nodes,{{case_clause,{not_found,no_db_file}},[{mem3_util,ensure_exists,1,[{file,"src/mem3_util.erl"},{line,344}]},{mem3_nodes,initialize_nodelist,0,[{file,"src/mem3_nodes.erl"},{line,110}]},{mem3_nodes,init,1,[{file,"src/mem3_nodes.erl"},{line,55}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{mem3_app,start,[normal,...]}}
Jan 4 10:51:58 abcde couchdb.server[322552]: [info] 2024-01-04T09:51:58.497919Z [email protected] <0.16.0> -------- Application mem3 exited with reason: {{shutdown,{failed_to_start_child,mem3_nodes,{{case_clause,{not_found,no_db_file}},[{mem3_util,ensure_exists,1,[{file,"src/mem3_util.erl"},{line,344}]},{mem3_nodes,initialize_nodelist,0,[{file,"src/mem3_nodes.erl"},{line,110}]},{mem3_nodes,init,1,[{file,"src/mem3_nodes.erl"},{line,55}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{mem3_app,start,[normal,...]}}
Thanks for your help!
Best, SB
from couchdb.
For additional information
$ snap info couchdb
name: couchdb
summary: RESTful document oriented database - Apache CouchDB has started. Time to relax.
publisher: Apache CouchDB
store-url: https://snapcraft.io/couchdb
license: unset
description: |
Apache CouchDB ™ lets you access your data where you need it. The Couch Replication Protocol is [...]
https://github.com/apache/couchdb-pkg/blob/main/README-SNAP.md
commands:
- couchdb
- couchdb.couchjs
- couchdb.remsh
services:
couchdb.server: simple, enabled, active
snap-id: i06N6KdQXS4HwhSkymgGClpopBOojRAt
tracking: latest/stable
refresh-date: today at 08:43 CET
channels:
latest/stable: 3.3.3 2024-01-02 (15) 47MB -
latest/candidate: 3.3.3 2024-01-02 (15) 47MB -
latest/beta: ↑
latest/edge: ↑
2.x/stable: 2.3.1 2020-03-18 (5) 46MB -
2.x/candidate: ↑
2.x/beta: ↑
2.x/edge: ↑
installed: 3.3.3 (15) 47MB -
from couchdb.
Okay, those hooks are missing. You'll need to change by hand for the moment.
cd /var/snap/couchdb/current/etc
edit local.ini
Ensure that you have this stanza
[couchdb]
database_dir = /var/snap/couchdb/common/data
view_index_dir = /var/snap/couchdb/common/data
.
.
then snap restart and check the logs again.
from couchdb.
That fixes the issue for me
$ curl http://127.0.0.1:5984/
{"couchdb":"Welcome","version":"3.3.3","git_sha":....
Thank you!
How will this issue continue: will there be a fix to do things automatically or should the user do things manually?
from couchdb.
Good. The next snap revision will include the hooks.
from couchdb.
Great
from couchdb.
Recreated and uploaded the snap packages!
from couchdb.
Related Issues (20)
- `config:reload/0` ignores delete markers HOT 3
- Replication stopped for several databases after some days, couchdb version 3.3.1 HOT 6
- no match of right hand value HOT 5
- Configurable "Special Character" to allow JSON fieldnames beginning with underscore "_" HOT 3
- Chttpd request processing does not reset pdict predictably HOT 7
- Database size growing unexpectdly after upgrading couchdb to 3.2.2 from 3.1 HOT 1
- FreeBSD ARM64 CI Failures HOT 2
- Regex containing umlauts in square brackets not matching HOT 4
- Huge ram usage HOT 4
- Connection refused in Macbook M1 HOT 2
- Documentation: add default values HOT 1
- Database not reachable after snap auto refresh to 3.3.3 HOT 5
- Flaky PasswordCacheTest failure HOT 1
- Enhancement Proposal: Improved UI/UX for CouchDB HOT 8
- couchspawnkillable: Cannot allocate memory HOT 2
- Allow for proxy provided `nonce` in chttpd HOT 4
- view has the wrong signature HOT 20
- until parameter for change request HOT 9
- Unable to query fields indexed by nouveau HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchdb.