Aryan
26 August 2020 16:56
1
When wanting to update cntools to 5.4.0, it said updating from cntools wasn’t enough and gave the following commands :
So i ran those commands. Then running ./cntools.sh again, I get the following message :
"Warn : node socket path wrongly configured or node not running, please verify that socket set in env
file match what is used to run the node."
My node is running and i already tried removing the node0.socket in sockets folder.
When i click on “c” to continue i get the following message :
"./cntools.library: line 51: /opt/Cardano/cnode/logs/cntools-history.log: Permission denied"
When i sudo ./cntools.sh, i get :
"Yo do not have a cardano-cli binary available in $PATH. Please make it available before using
CNTools. Refer to guild-operators documentation for the same"
Please help, i don’t see my wallets while using cntools offline.
Hi Aryan,
Can you share the contents of your .bashrc?
The node socket path should look something like this in your .bashrc:
export CARDANO_NODE_SOCKET_PATH=~/cardano-node/db/node.socket
If it’s there, I would suggest sourcing your .bashrc via
source .bashrc
and if sourcing .bashrc works, I would suggest adding this to your .bash_profile
test -f ~/.bashrc && source ~/.bashrc
Your friend, FROG
1 Like
Aryan
26 August 2020 18:28
3
I was actually going through the posts to see if somebody had the same issue as me so i came across what you had written here :
it sounds like you might not have the appropriate PATH reference
add this to your .bashrc
export PATH="~/.local/bin:$PATH"
export CARDANO_NODE_SOCKET_PATH=~/cardano-node/db/node.socket
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
make sure the cardano-node/db/node.socket reference correctly points to your node.socket file
then then source .bashrc (just do this if the above is already in your .bashrc)
then tr…
So i added what you wrote and now this is exactly what I have in my .bashrc :
“export PATH=”~/.local/bin:$PATH"
export CNODE_HOME=/opt/cardano/cnode
export CARDANO_NODE_SOCKET_PATH=/opt/cardano-node/sockets/node0.socket
export LD_LIBRARY_PATH=“/usr/local/lib:$LD_LIBRARY_PATH”
export PKG_CONFIG_PATH=“/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH”"
My node.socket file is called node0.socket and it’s in sockets folder not dB.
I did source .bashrc but still have the issue
sorry I had to crash for a couple hours - ok and you can confirm node is running via
cardano-cli shelley query tip --mainnet
and running the command without sudo?
“Warn : node socket path wrongly configured or node not running, please verify that socket set in env
file match what is used to run the node.”
would imply creation of an “env” file - do you see that, and do the contents match the path of your actual socket file?
Thanks in avance,
Your friend, FROG
Aryan
26 August 2020 21:25
5
No problem. I rebuilt the node by moving db to db-old and creating a new db. The node is running and cntools.sh still has the same issue.
When i do cardano-cli shelley query tip --mainnet, i get
“Network.socket.connect: <socket: 11>: permission denied (permission denied)”
And when i do sudo cardano shelley query tip --mainnet, i get :
“cardano-cli : command not found”
Yes, i see an “env” file, here is what i have within in the file :
Which seems to match the socket file location (/opt/cardano/cnode/sockets/node0.socket).
Aryan
26 August 2020 22:09
6
May I dm you on telegram, it would make it easier to communicate the problem. I believe I might have permission problems or ownership of files (root/user).
Thank you for the help!
Hi Aryan,
Sorry I’ve been out of the office today. You can hit me on telegram but content here is more helpful to all users.
I’m not sure that’s the case, and I wouldn’t be much help regarding cntools specific support.
I recommend trying to start the node manually so we can narrow down what’s going on.
First let’s confirm where the cardano-cli binaries are located. On my machines I have “.cabal” in my path vs “.local”
cd ~/.local
ls
is cardano-cli here?
cd ~/.cabal
ls
is cardano-cli here?
When you try to start the node manually, what do your logs say?
Where is your cardano-node binary located?
Has the node run before and has it successfully synced with the network?
Thanks, Aryan
FROG
Hi Aryan,
Based on our conversation, and the above message, please update your .bashrc to the following:
export PATH=”~/.cabal/bin:$PATH"
export CNODE_HOME=/opt/cardano/cnode
export CARDANO_NODE_SOCKET_PATH=/opt/cardano-node/sockets/node0.socket
export LD_LIBRARY_PATH=“/usr/local/lib:$LD_LIBRARY_PATH”
export PKG_CONFIG_PATH=“/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH”
As you can see, we changed .local/bin to .cabal/bin where your node binaries are located
Let me know if this works.
Your friend, FROG
Aryan
27 August 2020 14:58
9
Thanks to @ADAfrog and @lauris , we found a fix :
So, my node and cntools files and folders were switched to root user when using “sudo” curl update of prereqs. You can see that by doing “ls -la” command in folders :
So I had to switch the core node files and folders back to regular user by using the following command as root :
"chown -R [USERNAME] /opt"
Going back to regular user, when restarting the node, I got the following message :
"A Cardano node is already running, please terminate
this node before starting a new one with this script"
I tried all the kill commands on cardano-node, which didn’t solve the problem (removing node0.socket in sockets folder solves the problem).
In nano .bashrc i did what @ADAfrog wrote above and source .bashrc :
Hi Aryan,
Based on our conversation, and the above message, please update your .bashrc to the following:
export PATH=”~/.cabal/bin:$PATH"
export CNODE_HOME=/opt/cardano/cnode
export CARDANO_NODE_SOCKET_PATH=/opt/cardano-node/sockets/node0.socket
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
As you can see, we changed .local/bin to .cabal/bin where your node binaries are located
Let me know if this works.
You…
I should have probably just removed node0.socket and restarted the node but i chose to rebuild db after the following command :
"mv db db-old && mkdir db"
After restarting the node, everything is working fine!
Thanks again to @ADAfrog and @lauris for the help!
I hope this will help anybody else who has the same issue.
Kind regards, Aryan
2 Likes
jSolx
29 August 2020 07:57
10
cool if i could get a simple step to step to perform this please
“chown -R [USERNAME] /opt”
how did you do it ?
Aryan
31 August 2020 11:51
11
You need to check “who” are the users that “own” your folders and files concerning everything you need for your block producer node ("/opt" or “cnode” folder, “.bashrc” file, “Cardano node” folder…)
Check with “ls -la” within each folder.
If it’s “root” user and you use another user then switch over ownership of your files and folders to the user.
1 Like
jSolx
31 August 2020 14:31
12
cool i got it thank you !
1 Like