weatherreport show error when execute
Description
Regarding to the ticket( https://github.com/apache/couchdb/issues/4747 ) I wanted to use a diagnostic tool weatherreport
when I executed this it shows
in /opt/couchdb/bin ./weatherreport /usr/bin/env: ‘escript’: No such file or directory
so I appended the PATH=$PATH:/opt/couchdb/erts-12.3.2.10/bin
and it got {"init terminating in do_boot",{'cannot get bootfile','no_dot_erlang.boot'}} init terminating in do_boot ({cannot get bootfile,no_dot_erlang.boot})
Expected Behaviour
- expecting weatherrepot runs smoothly
Your Environment
- CouchDB version used: couchdb-3.3.2-1.el8 in RHEL8 packages
- Operating system and version: 2 * Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz Mem 4G Red Hat Enterprise Linux release 8.8 (Ootpa)(4.18.0-477.10.1.el8_8.x86_64)
You need to add the path to you couchdb config dir.
$ ./bin/weatherreport --help
Usage: weatherreport [-c <etc>] [-d <level>] [-e] [-h] [-l] [-a] [-t <timeout>] [check_name ...]
-c, --etc Path to the CouchDB configuration directory
-d, --level Minimum message severity level (default: notice)
-e, --expert Perform more detailed diagnostics
-h, --help Display help/usage
-l, --list Describe available diagnostic tasks
-a, --all-nodes Run weatherreport on all cluster nodes
-t, --timeout Timeout value (in ms) for each diagnostic check
check_name A specific check to run
Hi @big-r81 Thanks for the commenting.
Just a bit hard to get it,
export PATH=$PATH:/opt/couchdb/erts-12.3.2.10/bin/ export PATH=$PATH:/opt/couchdb/etc/ <- is that what you meant?
./bin/weatherreport {"init terminating in do_boot",{'cannot get bootfile','no_dot_erlang.boot'}} init terminating in do_boot ({cannot get bootfile,no_dot_erlang.boot})
Crash dump is being written to: erl_crash.dump...done
export PATH=$PATH:/opt/couchdb/etc/ <- is that what you meant?
No.
You need to add the path to the CouchDB etc directory as an argument to weatherreport like
$ ./bin/weatherreport --etc /path/to/couchdb/etc
That doesn't work. It looks like weatherreport relies on the no_dot_erlang.boot binary that's part of Erlang but not included in the erts distribution Couch bundles. So out-of-the-box weatherreport won't run at least from the official packages.
Edit: installing erlang-base on Ubuntu adds no_dot_erlang.boot. It still doesn't work but it's actually doing something now and returning Could not connect to the local cluster node
Looks like there needs to be a wrapper script like for remsh you can kick it off using what's in the package with
/opt/couchdb/erts-12.3.2.10/bin/erl +B -boot /opt/couchdb/releases/3.3.2/start_clean -noshell weatherreport/weatherreport/ebin -run escript start -extra /opt/couchdb/bin/weatherreport --etc /opt/couchdb/etc/ -d debug
But, again, it throws Could not connect to the local cluster node and a bunch of Bad rpc call executing errors but that's a different problem
Linking https://github.com/apache/couchdb-pkg/issues/123