Hello,
I´m having a problem that can´t solve. I can run topologyUpdater.sh manually and get a correct answer to be listed, but when I configure it into the crontab it is not running. I have connected the /script/ to the $PATH and have checked all setting but not working.
In a log activated in the cron line, I get the error “You do not have a cardano-cli binary available in $PATH.” but if I check the $PATH it´s listed.
Any idea of what it could be happening or any other solution to keep updated the Relay into the network?
Hello,
Can u show how u configured in crontab?
Also go to the folder where topology updater script is located and type pwd… that that path should be set in crontab;
If I try to download and run the updater from another user I get this error.
Could not find shelley genesis file in default location or ‘ShelleyGenesisFile’ from the node configuration file
It should be because the node installation is under root user.
when you execute a program (without specifying the path to it) the system searches through $PATH variable, examining each directory from left to right in the list, looking for a command that matches the command name you executed.
so, when you execute cardano-cli or cardano-node, the system looks for the file, and in your case, it hasn’t found in any of the directories.
you can check which paths are specified in the variable by executing:
echo $PATH
you can check if the system can find cardano-cli by typing:
type -p cardano-cli
most probably you don’t have the path set to the cardano-cli binary (executive) file.
please check where you have placed it, usually, it’s either in ~/.local/bin or ~/.cabal/bin
if it’s in ~/.local/bin, the to add a path to the $PATH variable you can execute this:
echo “export PATH=~/.local/bin:$PATH” >> ~/.bashrc
source ~/.bashrc
echo $PATH
and then check if you have set everything correctly:
type -p cardano-cli
if you see a path to the file, then you are good to go.
It depends on the user that runs the cron job. What works for the current user, may not work for the cron job.
How about you do whoami or echo id -u in another cronjob (paralell to the one in trouble) tho check if this gives you the user that you expect.
The error message comes from here. As you can see, this first checks the CCLI variable like this …
#CCLI="${HOME}/.cabal/bin/cardano-cli"
introspection of the $PATH is only the fallback. Therefore, it’s probably best to set CCLI to the absolute path of where your cardano-cli can really be found.
Also, please note, that guild-operators have changed their default branch from master to alpha. This is of course highly problematic, because everyone naively cloning this repository, will get some alpha (i.e. possibly broken) script.
Alternatively, you might prefer not to worry about all of this - no compile, no cabal, no fuzzing around with topology or live view (in alpha versions) - just run.
Yes, I have checked that before contacting because it can find the program cardano-cli from any directorie.
This is the result
root@serv3:~/cardano-my-node/scripts# echo $PATH
~/.local/bin:/root/.local/bin:/root/.local/bin:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
root@serv3:~/cardano-my-node/scripts#
root@serv3:~/cardano-my-node/scripts# type -p cardano-cli
/root/.local/bin/cardano-cli
root@serv3:~/cardano-my-node/scripts#
In your other line, I have checked but the folder bin with cardano-cli is not listed into /.cabal/ folder. I have made a copy of the /bin/ folder from /.local/ and the cron result now is this other.
Could not find shelley genesis file in default location or ‘ShelleyGenesisFile’ from the node configuration file
I’d say @Alexd1985 is your man if you want to stick with your bare metal setup. He is brilliant and usually gets it working eventually when folks are in trouble. I personally prefer to have a docker image that I can just run. All those zillion build, install and setup steps should be done for me IMHO - like this for example. I can run this image on my Mac, on an AWS server and on a RaspberryPi just the same. Every SPO has his/her preferences I guess.