We have a pool running since last Thursday and we were surprised yesterday as we noticed that our transactions had suddenly stopped. We continue to be connected to 20 peers, but it seems to have no impact on restarting our transactions. We´ve tried to run the topologyUpdater.sh manually 4 times (as requested) and we get the following message:
We then receive a mail from Cron Daemon saying that:
/bin/sh: cardano-cli: command not found
We don´t find any explanation for this to be happening since cardano-cli is installed in our machine. It seems as cron doesn´t have the clearence to run topologyUpdater.sh even after running chmod -x topologyUpdater.sh.
We´re kinda lost at this point. Does any one have any idea on how we might solve this?
I hope this finds you well. As @waldmops suggested, put absolute paths everywhere. In the crontab, but also in the file you wish the cron daemon to execute for you, eg:
CNODE_HOSTNAME=“CHANGE ME” # (Optional) Must resolve to the IP you are requesting from
CNODE_LOG_DIR="/path/to/log/dir" # Folder where your logs will be sent to (must pre-exist)
CNODE_VALENCY=1 # (Optional) for multi-IP hostnames
CNODE_TOPOLOGY="/path/to/your/new/topology/file.json" # Destination topology.json file you’d want to write output to
MAX_PEERS=15 # Maximum number of peers to return on successful fetch
#CUSTOM_PEERS=“None” # Additional custom peers to (IP:port[:valency]) to add to your target topology.json, eg: "10.0.0.1:3001|10.0.0.2:>
The above has worked for me, I was getting the same headache with trying to execute topologyUpdater.sh with cron.
Thank you very much for you quick response! Good to be part of this community!
We’ve defined the absolute paths on both files but we still have some conflicts with libsodium versioning. This time, cron seems to find cardano-cli but is not able to execute it. We receive the following error message:
/user/.local/bin/cardano-cli: error while loading shared libraries: libsodium.so.23: cannot open shared object file: No such file or directory
We’re now trying to fix this conflicts and hopefully solving our problems.
.bashrc will not necessarily work in the crontab context, but there are ways to set environment variables there as well. If all else fails, just call a shell script from crontab which sets all necessary environment variables. If I’m not mistaken, cardano-cli also needs a variable pointing to the node socket for certain operations.
We couldn´t make it work with cron, even after adding the full path to our crontab file, so we’ve replaced it with a Python scheduler which is working fine since last night. It’s not the same solution but it does the job.