Issue with running utxo query on testnet

I’m trying to set up a node on the testnet, but have run into some issues when following the guide.
The relay node is running, but when doing an utxo query to verify that funds from the faucet have been added to the correct address I get an error. Since the command in the guide does not work, I’ve adapted it, so maybe that’s where my problem is.
My relay node seems to be running ok, but that’s based on my so far very limited understanding:
image

Command:
cardano-cli query utxo --shelley-mode --address $(cat payment.addr) --testnet-magic 1097911063

Error:
MuxError MuxBearerClosed “<socket: 11> closed when reading data, waiting on next header True”

Error given in relay node log:
[cardano-:cardano.node.LocalErrorPolicy:Error:56] [2021-04-16 06:47:31.83 UTC] IP LocalAddress “” ErrorPolicyUnhandledApplicationException DecoderFailure (LocalStateQuery HardForkBlock (’: * ByronBlock (’: * (ShelleyBlock (ShelleyEra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Allegra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Mary StandardCrypto)) (’ *))))) Query (HardForkBlock (’: * ByronBlock (’: * (ShelleyBlock (ShelleyEra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Allegra StandardCrypto)) (’: * (ShelleyBlock (ShelleyMAEra ‘Mary StandardCrypto)) (’ *))))))) ClientAgency TokAcquired) (DeserialiseFailure 4 “HardForkQuery: invalid size and tag(2,6)”)

@Dudi_Edri Maybe you’ll be able to assist.

Hi!

try adding the era flag to the query (current era is mary) on 1.25.1 it is till mandatory
cardano-cli query utxo --shelley-mode --address $(cat payment.addr) --testnet-magic 1097911063 --mary-era
Also check that CARDANO_NODE_SOCKET_PATH points to the right socket file
echo $CARDANO_NODE_SOCKET_PATH

Also worth to wait till the node is in sync.

With the above command i get:
Shelley command failed: query utxo Error: The Shelley protocol mode can only be used with the Shelley era, i.e. with --shelley-mode use --shelly-era flag

Changing to --shelley-era gives the same error as before.
Socket path is correct.
Isn’t the node already in sync? If not, which indicator i the gLiveView should I be looking at?

ah, first I thought that you are on the mainnet - good I will test this command by myself as well on testnet and get back to you

able to reproduce similar error with query tip

cardano-cli query tip --testnet-magic 1097911063

cardano-cli: Network.Socket.connect: <socket: 11>: does not exist

will dig into it…

1 Like

Thought I should check that command myself just to verify.
I actually don’t get the error when using that exact query tip command (still get it with the utxo query though).
Interesting that we are getting the same error, but not necessarily with the same commands.

@espenu
I’m having a similar issue, however, I’m trying CNTools on testnet. The difference here is if I use CNTools to list my wallet funds it shows 0 ADA. Problem is I’m expecting 1k tADA / lovelace to be displayed since I withdrew from faucet and I’m not sure there’s a conversion being displayed since tADA << ADA.

I decided to try from the folder where my CNTools created my wallet in question:

cardano-cli query utxo
–shelly-mode
–address $(cat payment.addr) \
–testnet-magic 1097911063


also tried base.addr instead of payment.addr
also tried adding --shelley-era

Anyways, I’m essentially seeing similar error messages and I’m turning to the forums for more ideas.


Hopefully you keep reading this far, I figured it out on my issue at least maybe it’ll help you too?

So this was the winning ticket, forget the Mary-era and Shelley-mode entirely… use cardano-mode.

cardano-cli query utxo
–cardano-mode
–address $(cat base.addr) \
–testnet-magic 1097911063

^this worked for me… 5 mins after posting this and originally struggling for about 2 hours :smile:

2 Likes

@insomnizac
Thanks! That really put me on the right track.
The command that worked for you still gave my an error:

Shelley command failed: query utxo  Error: A query from a certain era was applied to a ledger from a different era: EraMismatch {ledgerEraName = "Mary", otherEraName = "Shelley"}

But adding --mary-era did the trick. So for me this command works well:

cardano-cli query utxo --cardano-mode --mary-era --address $(cat payment.addr) --testnet-magic 1097911063

Is this something that is specific to the testnet, or maybe to v1.25.1?

1 Like

Yes - from 1.26.1 defining the era is not needed anymore…

1 Like