Zcashd unable to sync

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?

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

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

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/

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!

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. :frowning:

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

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

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