"invalid blockNo [null]": cardano-cli query json key changed with v1.26.1

I updated cardano-node to v1.26.1 today and checked the pool on afterwords. It showed an issue with the topology of my two relays, so I looked at the /logs/topologypdater_lastresult.json log and found the following entry 4 or 5 times that started after I finished updating cardano-node:

“msg”: “invalid blockNo [null]”

I read through a few posts here and nothing worked to resolve my issue. I then had a look in the script and found the line that calls “cardano-cli query…”:

cardano-cli query tip --mainnet | jq -r .blockNo

I ran the line manually and the output was just, “null” (without the quotes). So I then ran the command without the “| jq -r .blockNo” part and found that the key, “blockNo” is now named just, “block”:

    "epoch": 258,
    "hash": "771d4db82173716a2beae068e8ccb84ee137767abf6f52e67126734bc06e441c",
    "slot": 26278014,
    "block": 5562824,
    "era": "Mary"

I updated that line in the script file to:

blockNo=(/usr/local/bin/cardano-cli query tip {NETWORK_IDENTIFIER} | jq -r .block )

Now the script runs again and I got the response of:

{ “resultcode”: “201”, “datetime”:“2021-04-08 00:56:22”, “clientIp”: “xx.xx.xx.xx”, “iptype”: 4, “msg”: “nice to meet you” }

I believe it defaulted back to “nice to meet you” because it had been a few hours since it had run successfully. I’ll check it in an hour when the cron job runs again.

I went back to and now both relays show:

INFO: Relay node xx.xx.xx.xx:#### is onboarding on topologyUpdater

Sweet! :smiley:


Thanks for sharing, same situation with me, and helps a lot… In the release note changes are

Cardano-cli changes

  • The ‘tip’ query now additionally returns the epoch at the tip. Some of the names of fields returned have changed and will need to be modified accordingly:
    • “blockNo” is now “block”
    • “slotNo” is now “slot”
    • “headerHash” is now “hash”
1 Like

topologyUpdater script has been updated as well.

So might also worth to download the latest version

1 Like

Will look into upgrading the script, thanks. Interesting the updated script doesn’t even use cardano-cli. For now, changing .blockNo to .block allowed it to find the right key/value pair in the json.

1 Like