Repository navigation
Description
Environment:
Base-64 19.2.0
Upgraded pkgsrc: bootstrap-trunk-x86_64-20190317-upgrade.tar.gz
$ svcadm enable couchdb
results in error:
cat: @Prefix@/couchdb/releases/start_erl.data: No such file or directory
/opt/local/bin/couchdb[31]: exec: @Prefix@/couchdb/erts-/bin/erlexec: not found
Modify: /opt/local/bin/couchdb and hard coding in some @Prefix...
export ROOTDIR="/opt/local/couchdb"
... and ...
exec "$BINDIR/erlexec" -boot "$ROOTDIR/releases/$APP_VSN/couchdb"
-args_file "/opt/local/couchdb/releases/2.3.1/vm.args"
-config "${SYSCONFIG_FILE}" "$@"
When I run the service, I now get:
{database_does_not_exist,
[{mem3_shards,load_shards_from_db,"_users",
[{file,"src/mem3_shards.erl"},{line,395}]},
I removed the /var/db/couchdb dir that was installed with the pkg and replaced it with a couchdb database directory from a running couchdb instance.
Now, couchdb does not run as a service, it gives error:
Eshell V10.4.4 (abort with ^G)
1> *** Terminating erlang (nonode@nohost)
But, it will run on the shell:
root:/var/db# /opt/local/bin/couchdb
when verifying "Creating Views", I get this error:
/opt/local/couchdb/lib/couch-2.3.1-RC3/priv/couchspawnkillable[20]: exec: /opt/local/couchdb/bin/couchjs: not found
So I copy:
$ mkdir /opt/local/couchdb/bin/
$ cp /opt/local/bin/couchjs /opt/local/couchdb/bin/
Now, I end up with error:
Error in process <0.3244.0> with exit value:
{{badmatch,{error,{nodedown,<<"progress not possible">>}}},
[{ddoc_cache_entry_validation_funs,recover,1,
[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,33}]},
{ddoc_cache_entry,do_open,1,
[{file,"src/ddoc_cache_entry.erl"},{line,297}]}]}
I'm suspecting the database dir, so I purge it:
$ rm -rf /var/db/couchdb
$ mkdir /var/db/couchdb
do a node setup and everything seems to work.
Activity
lsgroup commentedon Oct 28, 2019
Does not run as a service. Only works via command running as root:
root@sandbox4:/var/db/couchdb# /opt/local/bin/couchdb
Verified couchdb ownership on /var/db/couchdb and /var/log/couchdb
root@sandbox4:/var/db# ll
drwxr-xr-x 7 couchdb couchdb 12 Oct 28 14:40 couchdb/
root@sandbox4:/var# ll /var/log/couchdb/
drwxrwx--- 2 couchdb couchdb 3 Oct 27 16:44 ./
drwxr-xr-x 4 root sys 8 Oct 27 16:26 ../
-rw-r--r-- 1 couchdb couchdb 2126545 Oct 28 14:42 couch.log
When running as a service, you get this error message:
=ERROR REPORT==== 28-Oct-2019::14:40:58.109884 ===
Error in process <0.285.0> with exit value:
{badarg,[{ets,member,[mem3_openers,<<"_global_changes">>],[]},
{mem3_shards,maybe_spawn_shard_writer,3,
[{file,"src/mem3_shards.erl"},{line,476}]},
{mem3_shards,load_shards_from_db,2,
[{file,"src/mem3_shards.erl"},{line,381}]},
{mem3_shards,load_shards_from_disk,1,
[{file,"src/mem3_shards.erl"},{line,370}]},
{mem3_shards,for_db,2,[{file,"src/mem3_shards.erl"},{line,59}]},
{fabric_view_all_docs,go,5,
[{file,"src/fabric_view_all_docs.erl"},
{line,24}]},
{couch_db,'-get_design_docs/1-fun-0-',1,
[{file,"src/couch_db.erl"},{line,627}]}]}
Eshell V10.4.4 (abort with ^G)
1> *** Terminating erlang (nonode@nohost)
couchdb: Fix variable expansion in couchdb.in.
jbarfield commentedon Jan 3, 2020
I just provisioned a new 2019Q3-x86_64 image ran 'pkgsrc -fy up && pkgin -y in couchdb'. The install ran as expected. However I had the same problems after running: 'svcadm enable -r couchdb'. I disabled all of the services and rewrote /opt/local/bin/couchdb and then ran 'svcadm enable -r couchdb' and all is well. In the course of testing I screwed up the permissions in var/log/couchdb and in /var/db/couchdb a simple 'chown -R couchdb:couchdb /var/{log,db}/couchdb' should resolve the issue. Here is my /opt/local/bin/couchdb:
I deleted the BSD licensing portion of the script because it was causing gigantic fonts in the post.
#!/bin/sh
export PREFIX=/opt/local
export ROOTDIR=${PREFIX}/couchdb
#START_ERL=$(cat ${ROOTDIR}/releases/start_erl.data)
ERTS_VSN=$(cat ${ROOTDIR}/releases/start_erl.data | awk '{print $1}')
APP_VSN=$(cat ${ROOTDIR}/releases/start_erl.data | awk '{print $2}')
export BINDIR="${ROOTDIR}/erts-${ERTS_VSN}/bin"
export EMU=beam
export PROGNAME=
echo $0 | sed 's/.*\///'export COUCHDB_QUERY_SERVER_JAVASCRIPT="${ROOTDIR}/bin/couchjs ${ROOTDIR}/share/server/main.js"
export COUCHDB_QUERY_SERVER_COFFEESCRIPT="${ROOTDIR}/bin/couchjs ${ROOTDIR}/share/server/main-coffee.js"
ARGS_FILE=${ROOTDIR}/etc/vm.args
SYSCONFIG_FILE=${ROOTDIR}/releases/$APP_VSN/sys.config
exec "${BINDIR}/erlexec" -boot "${ROOTDIR}/releases/$APP_VSN/couchdb"
-args_file "$PREFIX/etc/couchdb/vm.args"
-config "${SYSCONFIG_FILE}" "$@"
devel/ruby-mocha: update to 1.11.2
Update to 3.3.1. From the changelog:
(chat/matterircd) Updated 0.18.4 to 0.19.4
textproc/ruby-coderay: update to 1.1.3
cups-filters: Update to 1.27.5
gegl: Update to 0.4.24
markdown-mode: update to 2.4.
(devel/R-fs) Updated 1.3.1 to 1.5.0
re2c: update to 2.0.3.
devel/ruby-mixlib-shellout: udpate to 3.2.5
(math/R-units) Updated 0.6.5 to 0.7.1
(textproc/R-htmltools) Updated 0.5.1.1 to 0.5.2
86 remaining items
p5-XML-Parser: update to 2.57.
py-aiodns: update to 4.0.3.
py-rpds-py: update to 2026.5.1.
bfs: update to 4.1.3. Changes:
Update to 4.43
devel/feluda: update to 1.15.0
devel/feluda: update to 1.15.0
couchdb: Fix variable expansion in couchdb.in.
Update to 20260402.0
net/xfr: update to 0.11.0
Update to 20260402.0
net/xfr: update to 0.11.0
misc/rozi: update to 0.0.33
asn1c: Update to version 0.9.29
devel/gitpane: update to