error syncing Bitcoin Core

12 replies 324 views
n1nja420Member
Posts: 8 · Reputation: 169
#1Oct 30, 2020, 04:14 PM
Hey everyone! Just set up Bitcoin Core 28.1 on my Macbook Air 13 (2017 Monterey) and ran into an issue during sync. Got this message about a database reading error, and then the app just shuts down! I'm using an external Kingston 960GB SSD for the installation via an HDD/SSD enclosure. Now when I try to launch it again, I get two more errors! Any ideas on what this could indicate?
5 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#2Nov 2, 2020, 03:36 AM
A bad cable connection could be the cause of your first error: Bitcoin Core reads and writes a lot during synchronization. If the external disk disconnects, you'll have a corrupted database. The second error explains itself: "Bitcoin Core is probably already running". Check your running processes. My advice: avoid external disks for critical data. Unless you have a reason not to, just prune the blockchain and ~15 GB disk space is enough to keep everything inside your computer.
1 Reply Quote Share
n1nja420Member
Posts: 8 · Reputation: 169
#3Nov 2, 2020, 04:22 AM
Tell me why it is better not to use an external ssd drive? What is wrong with this?
4 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#4Nov 2, 2020, 07:42 AM
I did:
1 Reply Quote Share
n1nja420Member
Posts: 8 · Reputation: 169
#5Nov 2, 2020, 11:25 AM
Thank you, you helped me a lot! I pulled the ssd out of the case and inserted a similar case with a new cable and synchronization went further. Shouldn't I worry about these errors?
2 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#6Nov 4, 2020, 09:42 AM
And if OP is very sure no Bitcoin Core is running, check whether file with name .lock exist on folder which store blockchain files. If that file exist, delete it manually. P.S. I mentioned this because first error could be caused by external drive disconnection where .lock file isn't deleted automatically.
4 Reply Quote Share
n1nja420Member
Posts: 8 · Reputation: 169
#7Nov 5, 2020, 11:33 PM
In the blocks folder, then the index folder and there is a LOCK file? There is also a LOCK file in the chainstate folder. Where exactly is "LOCK" and why do I need to delete it if everything works for me? Everything works after changing the cable.
0 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#8Nov 7, 2020, 11:17 AM
Yeah, Bitcoin Core also create LOCK along with .lock. Those file is used to know whether other Bitcoin process currently use the files/folders. DO NOT delete it if there's no problem. In very rare/specific case, those file isn't automatically deleted by Bitcoin Core when it exit/stop itself.
1 Reply Quote Share
n1nja420Member
Posts: 8 · Reputation: 169
#9Nov 8, 2020, 12:39 PM
exactly " .lock " there is no file! Only LOCK is a file «Error reading from database, shutting down» - The error repeated itself after a while! What to do at this moment?
4 Reply Quote Share
humbleledgerLegendary
Posts: 1027 · Reputation: 6554
#10Nov 8, 2020, 05:50 PM
If you're still using an external disk, I'd go without it. Or at least check the disk for errors (I can't tell you how to do that on a Mac), although that's not going to help you if it's a connection problem.
1 Reply Quote Share
silentchainHero Member
Posts: 473 · Reputation: 2317
#11Nov 8, 2020, 07:55 PM
It is better to use external SSD which is not confined inside the case, but instead, is free of any cases and connected to USB port on your machine via relevant USB-SATA SSD adapter. I use StarTech adapters to connect my  Samsung EVO ssd (which is used as external blockchain keeper for Bitcoin Core) for many years and didn't encountered any problem with disk's connectivity in the course of sync.
0 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#12Nov 8, 2020, 10:40 PM
Probably best to include the last session's logs in your "debug.log" file inside your bitcoin datadir. Insert it inside [code][/code] tags to shorten your post. Now, for the errors: This can be verified by an error line(s) in your debug.log file, the fix is specific to what kind of error that you have. If it's a corrupted data and you haven't been forcing Bitcoin Core to shutdown, then check your external drive's cables or ports for hidden data connection issue. (try another cable and port, then either --reindex-chainstate or --reindex depending on the problematic file) This is self-explanatory, this appears if there's already a Bitcoin Core process in the background. Check if you've previously set Bitcoin Core to start with the system or minimize on close, check Core's "Settings->Options...->Window" for that. Or it's maybe related to v28.1's new bind settings, read the release notes. This sounds like Bitcoin Core can't establish inbound connections. (normally, it doesn't show an error) Try to follow the guides here to open the necessary ports that's used by Bitcoin Core: https://bitcoin.org/en/full-node#enabling-connections You'll still be able to connect to 10~11 peers (Outbound Connections) even without it though.
4 Reply Quote Share
im_lynxHero Member
Posts: 515 · Reputation: 2161
#13Nov 9, 2020, 02:50 PM
This may be an indication that your external storage device isn't reliable for whatever reasons and produces data corruption. If the external storage enclosure e.g. doesn't have an own power source, it needs to get sufficient power from the USB 3 or Thunderbolt 2 port. It is possible that your SSD has a too high power draw under high load that your connection port doesn't provide sufficiently. Not all SSD media are the same regarding power demand, especially under load. I don't know how much power the USB 3 ports or the one Thunderbolt 2 port can provide on your specific MacBook Air 2017 model. I would recommend to use a quality external enclosure with an own sufficient power source. Bad cabling is another possible error source and may be amplified under high load or when the capbe hinders power flow.
1 Reply Quote Share

Related topics