cardano-community / guild-operators

Artifacts and scripts created by Guild operators
https://cardano-community.github.io/guild-operators
MIT License
353 stars 179 forks source link

gLiveview startup error #1659

Closed ids4ucmoi closed 1 year ago

ids4ucmoi commented 1 year ago

Hi,

New SPO here. Trying to run gLiveView as a monitoring tool.

env file was downloaded and configured as follows :

######################################

User Variables - Change as desired

Leave as is if unsure

######################################

USESYSVARS="N" # Whether to use environment variable from shell session for CNODE_HOME

CNODEBIN="${HOME}/.local/bin/cardano-node" # Override automatic detection of cardano-node executable

CCLI="${HOME}/.local/bin/cardano-cli" # Override automatic detection of cardano-cli executable

CNCLI="${HOME}/.local/bin/cncli" # Override automatic detection of executable (https://github.com/AndrewWestberg/cncli)

CNODE_HOME="${HOME}/production" # Override default CNODE_HOME path (defaults to /opt/cardano/cnode)

CNODE_PORT=1338 # Set node port

CONFIG="${CNODE_HOME}/config.json" # Override automatic detection of node config path

SOCKET="${CNODE_HOME}/db/node.socket" # Override automatic detection of path to socket

TOPOLOGY="${CNODE_HOME}/topology.json" # Override default topology.json path

LOG_DIR="${CNODE_HOME}/logs" # Folder where your logs will be sent to (must pre-exist)

DB_DIR="${CNODE_HOME}/db" # Folder to store the cardano-node blockchain db

UPDATE_CHECK="N" # Check for updates to scripts, it will still be prompted before proceeding (Y|N).

TMP_DIR="/tmp/cnode" # Folder to hold temporary files in the various scripts, each script might create additional subf

olders

USE_EKG="Y" # Use EKG metrics from the node instead of Prometheus. Prometheus metrics yield slightly better p

erformance but can be unresponsive at times (default EKG)

EKG_HOST=127.0.0.1 # Set node EKG host IP

EKG_PORT=12788 # Override automatic detection of node EKG port

PROM_HOST=127.0.0.1 # Set node Prometheus host IP

PROM_PORT=12798 # Override automatic detection of node Prometheus port

EKG_TIMEOUT=3 # Maximum time in seconds that you allow EKG request to take before aborting (node metrics)

CURL_TIMEOUT=10 # Maximum time in seconds that you allow curl file download to take before aborting (GitHub updat

e process)

BLOCKLOG_DIR="${CNODE_HOME}/logs" # Override default directory used to store block data for core node

BLOCKLOG_TZ="UTC" # TimeZone to use when displaying blocklog - https://en.wikipedia.org/wiki/List_of_tz_database_ti

me_zones

SHELLEY_TRANS_EPOCH=208 # Override automatic detection of shelley epoch start, e.g 208 for mainnet

TG_BOT_TOKEN="" # Uncomment and set to enable telegramSend function. To create your own BOT-token and Chat-Id fol

low guide at:

TG_CHAT_ID="" # https://cardano-community.github.io/guild-operators/Scripts/sendalerts

TIMEOUT_LEDGER_STATE=300 # Timeout in seconds for querying and dumping ledger-state

IP_VERSION=4 # The IP version to use for push and fetch, valid options: 4 | 6 | mix (Default: 4)

ENABLE_KOIOS=Y # (Y|N) Enable KOIOS API. If disabled, local node queries will be used instead with increased sys

tem resource requirements (default Y)

KOIOS_API="https://api.koios.rest/api/v0" # Koios API for blockchain queries instead of local cli lookup.

                                                    # Leave commented for automatic network detection between MainNet, Preview, Preprod or Guild netw

ork.

https://www.koios.rest/

DBSYNC_QUERY_FOLDER="${CNODE_HOME}/files/dbsync/queries" # [advanced feature] Folder containing DB-Sync chain analysis queries

G_ACCOUNT="cardano-community" # Override default github repository if you forked project

...

All paths configured in env are checked and correct. However when running gLiveView I get the following error:

Checking for script updates... Node socket not set in env file and automatic detection failed! [source: gLiveView.sh]

ERROR: gLiveView failed to load common env file Please verify set values in 'User Variables' section in env file or log an issue on GitHub

My node.socket file is present in the configured directory so why this error ?

Any help welcome

rdlrt commented 1 year ago

We have seen this occur when going through a very old env file that hasnt kept up with the announcements on tg channel or had manual changes - but not sure if that applies to your case since you mention you're a new pool operator.

Having said that, you can always revert by renaming the env_bkp file that would have been created before update in your scripts folder back to env and then starting your gLiveView again.

ids4ucmoi commented 1 year ago

I can't get gLiveView to work, whatever I try. I'm following strictu sensu the instructions though. It keeps duming this error: Checking for script updates... Node socket not set in env file and automatic detection failed! [source: gLiveView.sh]

ERROR: gLiveView failed to load common env file Please verify set values in 'User Variables' section in env file or log an issue on GitHub

I tried reinstalling the script and the env file, I tried editing the paths in the env file. I tried rebooting the machine.

It just does not work and I do not know why.

By the wauy, there is soemthign strange that might be the issue in the env file : a path is requested to a non existing file : #SOCKET="${CNODE_HOME}/files/node0.socket" However there is no such file on a cardano stake pool. The closest I find is node.socket in the DB directory. But even when I correct this file name in the env file, I keep geeting the same error.

What'is going on with this script ? Not up to date maybe for the lateste Cardano node version (8.1.1) ??

rdlrt commented 1 year ago

It just does not work and I do not know why.

Since you're not following official documentation, it is your responsibility to set up the environment variables in User Variables section to point to your environment accordingly.

By the wauy, there is soemthign strange that might be the issue in the env file : a path is requested to a non existing file : #SOCKET="${CNODE_HOME}/files/node0.socket" However there is no such file on a cardano stake pool.

You seem to be coming from another documentation elsewhere, but regardless - the SOCKET line you mentioned is commented out, and by default - it would check the paths from your runtime arguments to cardano-node (see here ). Of course, your runtime arguments could be different to node setup based on documentation you follow - but as a Stake pool Operator, you are expected to know what those variables are and point them accordingly in your environment. For instance, your CNODEBIN could be not in one of the expected locations , your node execution command may/may not specify port/socket location, etc.

Not up to date maybe for the lateste Cardano node version (8.1.1) ??

The script works fine with 8.1.1, there are thousands of operators running it 🙂 , that's kinda jumping to conclusion skipping the learning + troubleshooting process

ids4ucmoi commented 1 year ago

I have no problem to admit it could be some faults/config issues on my side. I'm not in a finger pointing game here. Just trying to identify the issue(s) to make it work. But all I get is a defensive answer and no real help. I guess I'll look for another monitoring tool then.

rdlrt commented 1 year ago

But all I get is a defensive answer and no real help.

I did try to point, but prolly did a bad job:

official documentation

you are expected to know what those variables are and point them accordingly in your environment. For instance, your CNODEBIN could be not in one of the expected locations , your node execution command may/may not specify port/socket location, etc.

Sorry, but the important distinction for this repository is to not have as much usage queries, focusing on code and replicable issues from experienced ops. There is announcement and linked support group (in profile there) which will have better discussion scope for 1:1 chat assistance if applicable based on timezone availabilities of folks who are online.