Cncli leaderlog output when no blocks assigned

running into issues myself when trying to sync my db

after running:

cncli sync --host 127.0.0.1 --port 6000 --db ${NODE_HOME}/scripts/cncli.db

I get the following error:

thread ‘main’ panicked at ‘called Result::unwrap() on an Err value: SqliteFailure(Error { code: ReadOnly, extended_code: 8 }, Some(“attempt to write a readonly database”))’, src/nodeclient/sync.rs:30:65
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

any ideas on how to fix it?
already changed my permissions on my db + scripts

what is your permission set for all the files associated to cncli** ?

image

Wow, I’m an idiot. As soon as I posted that image I realized my cncli.db was user:group root:root. Changed using chown command and now working without a hitch. Sorry about that!

cncli.db and db-shm and db-wal is installed as root. you need to change to cardano as you have created another user named cardano on your server. Please see my previous post.

No problem. sometimes it just takes talking about it with someone to see the issue. We are a community here to help each other.

2 Likes

A heads up, the cron for leaderlog will hog a lot of memory. You may end up with missed slots metric increasing or connection drops on the block. Please make sure you have enough memory and cpu.

Thanks, I currently only have 8gb ram but I increased by swap to 12gb which seems to do the job. Planning on increasing to 16gb ram

just want to check but if I want to check the leaderlog for next epoch (assuming the next epoch is <1.5d away should the command look like this:

cncli leaderlog \
        --db ${NODE_HOME}/scripts/cncli.db \
        --pool-id  $(cat ${NODE_HOME}/stakepoolid.txt) \
        --pool-vrf-skey ${NODE_HOME}/vrf.skey \
        --byron-genesis ${NODE_HOME}/mainnet-byron-genesis.json \
        --shelley-genesis ${NODE_HOME}/mainnet-shelley-genesis.json \
        --ledger-set 267 \
        --tz America/Edmonton

I’m getting the following output but it still says epoch 266 (assuming I have no assigned slot but just wanted to make sure)

image

Thanks in advance!

Please refer to cncli/USAGE.md at develop · AndrewWestberg/cncli · GitHub
and ledgerset commands. I believe you want to use next vs the epoch #
–ledger-set Which ledger data to use. prev - previous epoch, current - current epoch,
next - future epoch [default: current]

hmmm, getting the following error when I try “next”:

image

Try again in a couple hours. it is common error.

Update the cncli to 2.1.1

Already did

1 Like

Still no luck :frowning:

cncli is v2.1.1 and able to calculate current leaderlog just not next:

Is your node in sync with the network? Are you running gLiveView or something else that can verify this?

My node is in sync:
image

seems to be working now. not sure what changed?

The remote request to your pools ledger-state is now working, because someone at https://crypto2099.io/ ran the export.

With newer versions of cncli it is possible to run such a request in the background instead of exporting the ledger state yourself. The problem with exporting the ledger state is, that it takes about 11 GB RAM or swap to execute.

However, there is a 3rd way to get the leaderlog:

cardano-cli query stake-snapshot --stake-pool-id <your-pool-id> --mainnet >snapshot.json
cncli leaderlog --tz Europe/Vienna \
–pool-id <your-pool-id> \
–pool-vrf-skey vrf.skey \
–byron-genesis mainnet-byron-genesis.json \
–shelley-genesis mainnet-shelley-genesis.json \
–pool-stake $(cat snapshot.json | jq .poolStakeMark) \
–active-stake $(cat snapshot.json | jq .activeStakeMark) \
–db cncli.db --ledger-set next

1 Like

Hello @doc_krieger,

Can you tel lme how your gLiveView is outputting EKG metrics?
I am unable to get the ‘BLOCKS’ section of my liveview working correctly.