# Zcashd unable to sync

**URL:** <https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659>\
**Category:** Technical Support\
**Created:** [June 5, 2017, 9:52pm UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659 "2017-06-05T21:52:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethfan](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@ethfan](https://forum.zcashcommunity.com/u/ethfan)\
**Post date:** [June 5, 2017, 9:52pm UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/1 "2017-06-05T21:52:35Z")

</div>

It was previously working. Used intermittently to transfer mined ZEC to exchange. This time when I started it crashed with a few error messages. I tried updating to latest version which did not help. Also tried deleting .zcash directory and start afresh which again did not help. What is the problem? How to get around it?

---

<div class="post-metadata">

**Author:** ![anon47418038](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anon47418038](https://forum.zcashcommunity.com/u/anon47418038)\
**Post date:** [June 5, 2017, 11:13pm UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/2 "2017-06-05T23:13:37Z")

</div>

the end of the debug.log file would help a lot, thanks

---

<div class="post-metadata">

**Author:** ![ethfan](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@ethfan](https://forum.zcashcommunity.com/u/ethfan)\
**Post date:** [June 6, 2017, 1:14am UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/3 "2017-06-06T01:14:18Z")

</div>

log from one of the attempts to re-sync:-

2017-06-05 10:42:04 UpdateTip: new best=000000002fd9f4b26613ae42b578ee2ec54547186bb9605004620dd80880cc9d height=39964 log2\_work=47.589575 tx=217405 date=2017-01-05 10:30:02 progress=0.123921 cache=62.3MiB(3195tx)  
2017-06-05 10:42:05 Corruption: block checksum mismatch  
2017-06-05 10:42:05 \*\*\* System error while flushing: Database corrupted  
2017-06-05 10:42:05 Reindexing block file blk00000.dat…  
2017-06-05 10:42:05 Block Import: already had block 0000000b70480327694608408728c65c1f1a300bfe705b01baca0f5504092e1b at height 1000  
2017-06-05 10:42:06 Shutdown: In progress…  
2017-06-05 10:42:06 StopRPC: waiting for async rpc workers to stop  
2017-06-05 10:42:06 scheduler thread interrupt  
2017-06-05 10:42:06 StopNode()  
2017-06-05 10:42:06 Corruption: block checksum mismatch  
2017-06-05 10:42:06 \*\*\* System error while flushing: Database corrupted  
2017-06-05 10:42:06 Shutdown: done  
2017-06-05 10:45:41

---

<div class="post-metadata">

**Author:** ![anon47418038](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anon47418038](https://forum.zcashcommunity.com/u/anon47418038)\
**Post date:** [June 6, 2017, 5:08am UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/4 "2017-06-06T05:08:03Z")

</div>

looks like your blockchain database got corrupted somehow…first thing I’d double check is that the drive/partition that its on is not either full or close to it, and then you need to re-download the blockchain…don’t touch wallet.dat, peers.dat or zcash.conf, but blow away everything else in `~/.zcash/`

---

<div class="post-metadata">

**Author:** ![ethfan](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@ethfan](https://forum.zcashcommunity.com/u/ethfan)\
**Post date:** [June 6, 2017, 7:07pm UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/5 "2017-06-06T19:07:40Z")

</div>

SSD not full. Now seems ok. Cleaned out .zcash except for wallet and conf. Went back to 1.0.6 and blockchain now fully up to date. Still not clear as to what the problem was. Not risking it again. Immediately moved all coins to exchange and switched mining direct to exchange. Would have lost 30 ZEC if I could not access my account!

---

<div class="post-metadata">

**Author:** ![rofllolomg](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@rofllolomg](https://forum.zcashcommunity.com/u/rofllolomg)\
**Post date:** [April 24, 2018, 9:03am UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/6 "2018-04-24T09:03:02Z")

</div>

I had the same issue but instead of a fix I got this issue after…  
:  
2018-04-24 08:56:30 Zcash version v1.0.12-d6c5478-dirty (2017-10-29 22:17:43 +0000)  
2018-04-24 08:56:30 Using OpenSSL version OpenSSL 1.1.0d 26 Jan 2017  
2018-04-24 08:56:30 Using BerkeleyDB version Berkeley DB 6.2.23: (March 28, 2016)  
2018-04-24 08:56:30 Default data directory C:\Users\kevin\AppData\Roaming\Zcash  
2018-04-24 08:56:30 Using data directory C:\Users\kevin\AppData\Roaming\Zcash  
2018-04-24 08:56:30 Using config file C:\Users\kevin\AppData\Roaming\Zcash\zcash.conf  
2018-04-24 08:56:30 Using at most 125 connections (2048 file descriptors available)  
2018-04-24 08:56:30 Using 4 threads for script verification  
2018-04-24 08:56:30 scheduler thread start  
2018-04-24 08:56:30 Loading verifying key from C:\Users\kevin\AppData\Roaming\ZcashParams\sprout-verifying.key  
2018-04-24 08:56:30 Loaded verifying key in 0.004003s seconds.  
2018-04-24 08:56:30 HTTP: creating work queue of depth 16  
2018-04-24 08:56:30 HTTP: starting 4 worker threads  
2018-04-24 08:56:30 Using wallet wallet.dat  
2018-04-24 08:56:30 init message: Verifying wallet…  
2018-04-24 08:56:30 CDBEnv::Open: LogDir=C:\Users\kevin\AppData\Roaming\Zcash\database ErrorFile=C:\Users\kevin\AppData\Roaming\Zcash\db.log  
2018-04-24 08:56:30 Renamed wallet.dat to wallet.1524560190.bak  
2018-04-24 08:56:30 CDBEnv::Salvage: Database salvage found errors, all data may not be recoverable.  
2018-04-24 08:56:30 Salvage(aggressive) found no records in wallet.1524560190.bak.  
2018-04-24 08:56:30 Error:  
2018-04-24 08:56:30 Shutdown: In progress…  
2018-04-24 08:56:30 StopRPC: waiting for async rpc workers to stop  
2018-04-24 08:56:30 scheduler thread interrupt  
2018-04-24 08:56:30 StopNode()  
2018-04-24 08:56:30 Shutdown: done

As you can probably tell, it leaves a “bak” file in place of the “wallet.dat” after running.  
Can anyone tell me how to fix this in Windows? Not that familiar with Linux, and am willing to try, but just have no clue what I’m doing there. Really hoping for a fix for this one, had 2-3 wallets on here. ☹

> <https://github.com/zcash/zcash/issues/2753>
>
> \### Describe the issue
> I can not load wallet.dat after computer crash. I had sa…ved file wallet.dat but can\`t import it.
> 
> \### Can you reliably reproduce the issue?
> Yes, I tried Win10 and Linux (Ubuntu).
> 
> \#### If so, please list the steps to reproduce below:
> 1. Copy paste wallet.dat to zcash dir
> 2. fire zcashd deamon (after clear all blocks data)
> 3. Deamon is shutting down. I had in debug.log
> 
> 
> \### Expected behaviour
> Client should start normally and get blocks.
> 
> \### Actual behaviour + errors
> Deamon shutting down with log:
> 
> \`2017-11-20 10:02:27 Renamed wallet.dat to wallet.1511172147.bak
> 
> 2017-11-20 10:02:27 CDBEnv::Salvage: Database salvage found errors, all data may not be recoverable.
> 
> 2017-11-20 10:02:27 Salvage(aggressive) found no records in wallet.1511172147.bak.\`
> 
> 
> \### The version of Zcash you were using:
> Zcash Daemon version v1.0.12
> 
> \### Machine specs:
> \- Ubuntu 14.04
> \- Intel i5 4c
> \- 16 GB DDR3
> \- 128 GB SSD
> \- Linux kuba 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86\_64 x86\_64 x86\_64 GNU/Linux
> \- Compiler version (gcc -version):
> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
> 
> 
> 
> \### Do you have a back up of \`~/.zcash\` directory and/or take a VM snapshot?
> Have only backup wallet.dat (created about 3 months ago when I installed zcash)

---

<div class="post-metadata">

**Author:** ![rofllolomg](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@rofllolomg](https://forum.zcashcommunity.com/u/rofllolomg)\
**Post date:** [April 24, 2018, 9:15am UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/8 "2018-04-24T09:15:35Z")

</div>

Just tried to fix it and restart the app. zcash4win just kind of ignores the whole “.bak” file and recreates a whole new wallet… which freaked me out because I thought that’s all it could pull… however, still have the original 376 KB wallet.dat, I believe… does anyone know how I can fix this? I tried reinstalling zcash4win and deleting the params/proving keys as well.

This is what I’m getting from the DB.log file because I’m assuming it kind of has to do with the database?  
BDB2506 file unknown has LSN 26/124142, past end of log at 1/28  
BDB2507 Commonly caused by moving a database from one database environment  
BDB2508 to another without clearing the database LSNs, or by removing all of  
BDB2509 the log files from a database environment  
BDB0522 Page 0: metadata page corrupted  
BDB0523 Page 0: could not check metadata page  
wallet.dat: BDB0090 DB\_VERIFY\_BAD: Database verification failed  
BDB2506 file unknown has LSN 26/124142, past end of log at 1/1076  
BDB2507 Commonly caused by moving a database from one database environment  
BDB2508 to another without clearing the database LSNs, or by removing all of  
BDB2509 the log files from a database environment  
wallet.1524560750.bak: BDB0090 DB\_VERIFY\_BAD: Database verification failed

---

<div class="post-metadata">

**Author:** ![Autotunafish](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/autotunafish/32/7827_2.png) [@Autotunafish](https://forum.zcashcommunity.com/u/Autotunafish)\
**Post date:** [April 24, 2018, 3:14pm UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/9 "2018-04-24T15:14:23Z")

</div>

You need to import your private keys export file (created from the export private Keys option)  
Importing the backup will only partially restore the funds and may not be spendable I’m not sure

> **[WinZEC Zcash wallet - Upgrading from Zcash4win to WinZEC wallet client](https://coinguides.org/winzec-zcash-wallet/)**
>
> Were you using Zcash4win wallet to store your ZEC funds. If so then soon update to latest WinZEC wallet. Its a new wallet release that replaced Zcash4win.

---

<div class="post-metadata">

**Author:** ![Autotunafish](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/autotunafish/32/7827_2.png) [@Autotunafish](https://forum.zcashcommunity.com/u/Autotunafish)\
**Post date:** [April 24, 2018, 3:19pm UTC](https://forum.zcashcommunity.com/t/zcashd-unable-to-sync/16659/10 "2018-04-24T15:19:14Z")

</div>

If you place your wallet.dat file into the roaming file and resync, it may restore all the funds, gonna take a while  
Make sure to rename the backup file to wallet.dat if you’re doing that
