couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

weatherreport show error when execute

Open fr2lancer opened this issue 2 years ago • 6 comments

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

  1. 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)

fr2lancer avatar Sep 04 '23 02:09 fr2lancer

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

big-r81 avatar Sep 04 '23 18:09 big-r81

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

fr2lancer avatar Sep 05 '23 23:09 fr2lancer

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

big-r81 avatar Sep 06 '23 10:09 big-r81

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

baylisscg avatar Sep 08 '23 04:09 baylisscg

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

baylisscg avatar Sep 08 '23 05:09 baylisscg

Linking https://github.com/apache/couchdb-pkg/issues/123

big-r81 avatar Dec 12 '23 09:12 big-r81