# Error when syncing: cncli.sh sync

**URL:** <https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205>\
**Category:** Operate a Stake Pool\
**Created:** [22 September 2024 00:14 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205 "2024-09-22T00:14:33Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [22 September 2024 00:14 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/1 "2024-09-22T00:14:33Z")

</div>

I was syncing fine but it stopped working with this error:

ERROR cncli::nodeclient::sync \> InvalidCbor(“unexpected type u16 at position 263: expected array”)

 ![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/0/9/093a18922365daa692a88e65d13963c4ec4a7b7b.png)

![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/8/a/8a7a9c01d0bfd250e7e49a1e9257585441d68c11.png)

![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/6/3/635f8876cd0dbef1a6608cec46d544e2cc876dff.png)

---

<div class="post-metadata">

**Author:** ![jeremyisme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jeremyisme/32/54872_2.png) [@jeremyisme](https://forum.cardano.org/u/jeremyisme)\
**Post date:** [22 September 2024 00:45 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/2 "2024-09-22T00:45:31Z")

</div>

There was an update to 9.1.1 that might have something to do with it. Have you also updated your cncli?

Your uptime of 58 days is very long. Best practice is to be restarting the node more frequently than that.

---

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [22 September 2024 02:18 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/3 "2024-09-22T02:18:55Z")

</div>

thanks @jeremyisme , I have updated the servers and the nodes to v 9.2.0. They have been starting for the last 30 min so I’ll wait for that to finish and see if I can sync.

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [22 September 2024 06:08 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/4 "2024-09-22T06:08:27Z")

</div>

Your DB is probably corrupted. You would have to delete it and then let it resync completly again.

---

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [22 September 2024 23:20 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/5 "2024-09-22T23:20:24Z")

</div>

I think you might be right, no joy after upgrading to 9.2.0. The same sync error appears. I might copy the db from the relay as that would be quicker.

---

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [23 September 2024 02:06 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/6 "2024-09-23T02:06:33Z")

</div>

even after deleting the database and copying from relay i get the same error:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/7/f/7f97419c4df3660c86549ab4facb7c4cd7bdc898.png)

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [23 September 2024 04:59 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/7 "2024-09-23T04:59:30Z")

</div>

Did you delete the cncli db or the blockchain ledger db?^^ just to make sure you deleted the correct db 😃

---

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [23 September 2024 06:14 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/8 "2024-09-23T06:14:13Z")

</div>

i’ve only worked with the ledger db so that’s the one i deleted, why am I suspecting that I deleted the wrong one?? 😩

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [23 September 2024 06:28 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/9 "2024-09-23T06:28:26Z")

</div>

Yeah thats the wrong one 😃 are you using cntools?

---

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [23 September 2024 06:37 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/10 "2024-09-23T06:37:24Z")

</div>

I sure am, can you reset the database with cntools?

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [23 September 2024 06:39 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/11 "2024-09-23T06:39:46Z")

</div>

So use

` rm -rf $CNODE_home/guild-db/*/*`

and after that you can start the cncli script again and let it sync.

---

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [23 September 2024 21:38 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/12 "2024-09-23T21:38:13Z")

</div>

> [@demetrio](#):
>
> nvalidCbor(“unexpected type u16 at position 263: expected array”)

I deleted all the contents in the guild-db folder and then restarted. After some time it got the to the same point in the sync and produced the same error:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/8/7/879b623b4521a1e9ae0c6526ce7f2e3339359d95.png)

 ![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/e/1/e1a956479efc6ea1731e41f841007da39108b69a.png)

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [24 September 2024 05:38 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/13 "2024-09-24T05:38:28Z")

</div>

Hm so id probably recommand to ask here [Telegram: Contact @CardanoStakePoolWorkgroup](https://t.me/CardanoStakePoolWorkgroup)

---

<div class="post-metadata">

**Author:** ![demetrio](https://avatars.discourse-cdn.com/v4/letter/d/cab0a1/32.png) [@demetrio](https://forum.cardano.org/u/demetrio)\
**Post date:** [24 September 2024 08:11 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/14 "2024-09-24T08:11:27Z")

</div>

> [@demetrio](#):
>
> ERROR cncli::nodeclient::sync \> InvalidCbor(“unexpected type u16 at position 263: expected array”)

Looks like I needed a CNCLI update, I was on version 6.0.1, now on version 6.3.0. Sync is working fine now.

---

<div class="post-metadata">

**Author:** ![Zyroxa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/zyroxa/32/17790_2.png) [@Zyroxa](https://forum.cardano.org/u/Zyroxa)\
**Post date:** [24 September 2024 08:15 UTC](https://forum.cardano.org/t/error-when-syncing-cncli-sh-sync/136205/15 "2024-09-24T08:15:21Z")

</div>

Thanks for the feedback. Glad they were able to help you out.
