# I am using the GUI and my daemon doesn't start anymore

I've been using the GUI for some time and suddenly the daemon doesn't start anymore. How do I resolve this issue?

First of all, this is likely caused by your blockchain being corrupt. A blockchain can corrupt if you shut down the daemon ungracefully (e.g. a hard shut down or your PC going into sleep mode while you were syncing). As a general piece of advice, if you need to shut down your PC, first shut down monerod gracefully by typing exit (if you're running monerod separately) or click on the x (right top) if you're running monerod from within the GUI. Otherwise, you might corrupt the blockchain and you'd have to start all over again.

Now, let's verify that your blockchain is really corrupt so that you don't unnecessarily have to start all over again. This is done as follows.

[1] Exit the GUI.

[2] Browse to the directory monerod is located. On Windows and Linux this is the same directory as monero-wallet-gui, whereas on Mac OS X monerod is located in ~/Applications/monero-wallet-gui.app/Contents/MacOS | Note that if you cannot find monerod, it could be that your AV (AntiVirus) has quarantined it. In case this occurred, I'd advise to either put it back in the original folder / directory and create an exception or re-extract the binaries (the .zip file (Windows) or the tar.bz2 file (Mac OS X and Linux)) to a new folder / directory (for which an exception is created).

[3] Open monerod manually by double clicking on it (Windows and Mac OS X) or from the terminal with ./monerod (Linux).

[4] It'll likely shut down itself quickly. If that happens, proceed with the guide.

[5] If it doesn't shut down itself, type status a few times to check whether it's fetching any new blocks. If it isn't, proceed with the guide. It it fetches new blocks, however, it's not corrupted and the GUI was simply unable to start the daemon. Try restarting monero-wallet-gui. It should automatically connect to the daemon that's already running.

[6] Browse to C:\ProgramData\bitmonero (Windows) or ~/.bitmonero (Linux and Mac OS X).

[7] Note that, by default, both C:\ProgramData\bitmonero and ~/.bitmonero are hidden directories.

[8a] On Windows, you have to use the explorer to manually navigate to C:\ProgramData\bitmonero

[8b] On Mac OS X, you can typically use cmd+shift+. to unhide directories.

[8c] On Linux, you can typically use ctrl+H to unhide directories.

[9] Now open bitmonero.log

[10] If your log contains this line or something similar, the blockchain is corrupted:

Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid

[11] We'll first attempt to fix this before performing a resync from scratch.

[12] Again browse to the directory monerod is located.

[13a] On Windows, open a new command prompt from the same directory as monerod.exe. This is done by first making sure your cursor isn't located on any of the files and subsequently doing SHIFT + right click. It will give you an option to "Open command window here". If you're using Windows 10, it'll, most likely, give you an option to open the Powershell.

[13b] On Linux and Mac OS X, open a new terminal from the same directory as monerod

[14a] On Windows, type the following command in the command prompt:

monerod.exe --db-salvage

If that doesn't work in the Powershell, type:

.\monerod.exe --db-salvage

If that doesn't work either in the Powershell, type:

./monerod.exe --db-salvage

[14b] On Linux and Mac OS X, type the following command in the terminal:

./monerod --db-salvage

[15] If you were using a non-default directory for the blockchain, you have to add the --data-dir flag too if you start monerod separately. If you already have monerod running, type exit first to gracefully stop the daemon. This is done as follows:

On Windows, type the following command in the command prompt:

monerod.exe --db-salvage --data-dir path\to\your\blockchain

If that doesn't work in the Powershell, type:

.\monerod.exe --db-salvage --data-dir path\to\your\blockchain

If that doesn't work either in the Powershell, type:

./monerod.exe --db-salvage --data-dir path\to\your\blockchain

On Linux and Mac OS X, type the following command in the terminal:

./monerod --db-salvage --data-dir path/to/your/blockchain

[16] If that doesn't work you, unfortunately, have to resync from scratch. This is done by deleting data.mdb from C:\ProgramData\bitmonero or ~/.bitmonero (Linux and Mac OS X), which will trigger the resync.

• Thank you for posting the assistance. However, I cannot locate .bitmonero on my OSX. (I realize it is a hidden file) – user5905 Mar 5 '18 at 16:23
• Have you tried using CMD+SHIFT+DOT to unhide directories? – dEBRUYNE Mar 5 '18 at 16:43
• Oh. Derp. I thought spotlight search would search hidden files but I just found it with Bash...Thanks – user5905 Mar 5 '18 at 18:04
• The .log file does not contain Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid, should I first follow the directions to fix that or just do a resync? After a resync will coins still be available which were sent to this address? – user5905 Mar 5 '18 at 18:09
• What happens if you run monerod manually? Also, a resync from scratch will not affect your wallet balance. – dEBRUYNE Mar 5 '18 at 19:40

Also recently, Comodo and various other firewalls have added a Secret option to Block Loopback Traffic / Filter Loopback Traffic (127.x.x.x) This is "SEPARATE option" from the application / Firewall rules.

That means, even if you approved Monerod.exe and the GUI FULL INTERNET ACCESS on your firewall rules , firewalls will Still Block them talking to each other.

This drives 'a wall' between your GUI and the Daemon. So even if both START can connect to the internet, you still get the 'Cannot start daemon' or 'Cannot connect to Daemon' error (ie; they cannot talk to each other)

To solve this, go to your firewall and Look for any settings option which mentions "127"....... or "Loopback". Don't just look on the rules page, this option is often location on a different settings page.

If you find any mention of Loopback traffic and 127.x.x.x , Try enabling and permitting it, since the monero daemon uses this, that will remove the wall between the Daemon and the GUI

Hope this helps someone.

## protected by Community♦Mar 5 '18 at 23:33

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).