Command failed: query tip Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: "CARDANO_NODE_SOCKET_PATH"

Ok at least we are sure now that you are running the node as root. I’d rather reconfigure the script and update file and folder permissions in the node directory compared to doing a clean install.

You can continue to do it with sudo. sudo -E cardano-cli query tip should work. -E preserves the environment of the user.

It could be possible to change everything to the usual way of running it as a user, first modifying to not use sudo anymore, then probably changing the ownership of some of the files that were now created as root and are not writable by the user-run process anymore. But it’s kind of cumbersome if you don’t know your way around Linux that much.

Setting it up from scratch using one of the often used guides, either CoinCashew or would probably make helping you later easier, because everybody knows how it is supposed to look like.

EDIT: Okay, 100% contradiction to @mcrio. :grin:

@mcrio @HeptaSean Thank you to both of you. You really have saved the day here (all in a days work, I know, though this has been a long time of debugging for me). I’m glad to know there are pros and cons to both options.

1 Like

Well your way makes totally sense in case @kevinsmith has not enough experience with the Linux console. Going from scratch but researching and really understanding each command will be of huge benefit down the road. What I meant is just that changing the setup to a regular user shouldn’t be a big undertaking.

1 Like

Just to verify for any future readers, sudo -E cardano-cli query tip does work for me. Thanks.