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

weatherreport show error when execute #4748

Open
fr2lancer opened this issue Sep 4, 2023 · 6 comments
Open

weatherreport show error when execute #4748

fr2lancer opened this issue Sep 4, 2023 · 6 comments

Comments

@fr2lancer
Copy link

Description

Regarding to the ticket( #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)
@big-r81
Copy link
Contributor

big-r81 commented Sep 4, 2023

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

@fr2lancer
Copy link
Author

fr2lancer commented Sep 5, 2023

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

@big-r81
Copy link
Contributor

big-r81 commented Sep 6, 2023

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

@baylisscg
Copy link

baylisscg commented Sep 8, 2023

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
Copy link

baylisscg commented Sep 8, 2023

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

@big-r81
Copy link
Contributor

big-r81 commented Dec 12, 2023

Linking apache/couchdb-pkg#123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants