Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monero 'Oxygen Orion' (v0.17.3.0-release) Error: Couldn't connect to daemon: 127.0.0.1:18081 #3845

Closed
ThomasAn73 opened this issue Feb 27, 2022 · 17 comments

Comments

@ThomasAn73
Copy link

I have a folder exception added to Windows Firewall. The Monero GUI was working fine for about four days. Now I keep getting the daemon connection error and has not been able to connect since.

@selsta
Copy link
Collaborator

selsta commented Feb 27, 2022

Do you have a custom blockchain location set?

@ThomasAn73
Copy link
Author

Yes. It's on a D: drive. It hasn't been moved or changed. It was installing the chain for the first time and there was a flag to prune the chain from the get go. The drive has a 125Gb capacity and I estimate the pruned chain should top at 45Gb. It had 60,000 transactions left to go, reached 42Gb and now it can't connect.

@selsta
Copy link
Collaborator

selsta commented Feb 27, 2022

It sounds like your blockchain is corrupted. That can happen if you unplug the external hard drive during the initial sync. Is it possible that that happened?

@ThomasAn73
Copy link
Author

No, nothing changed from the day before to the next. Drive was always connected. I had to stop the Daemon a few times to gain some bandwidth during conference calls, but it always restarted right up. Except now.

@ThomasAn73
Copy link
Author

There was one time I had to kill the GUI. If the GUI is closed without first stopping the daemon then it never closes. There is a message saying stopping daemon and it stays there for hours indefinitely. After killing the GUI the daemon was working fine. Stopped, started and the chain kept downloading. That incident was three days before this current event. So, I don't see a connection.

@selsta
Copy link
Collaborator

selsta commented Feb 27, 2022

Yes, killing the GUI is irrelevant as it's a separate program to the daemon.

@ThomasAn73
Copy link
Author

Also, even when it was connecting, it was not staying connected continuously. I thought I could leave it overnight so it finishes, but by morning the daemon was stopped and I had to restart it, but it kept going so I thought it was normal.

@selsta
Copy link
Collaborator

selsta commented Feb 27, 2022

Do you now how to start the daemon from cmd?

Open cmd, drag and drop monerod.exe into it and then add --data-dir, it should look similar to this:

.\monerod.exe --data-dir D:\Custom\Blockchain\Path

Change it to your custom path. Please try to start it manually like this and post the result.

@ThomasAn73
Copy link
Author

2022-02-27 22:53:11.926 I Monero 'Oxygen Orion' (v0.17.3.0-release)
2022-02-27 22:53:11.926 I Initializing cryptonote protocol...
2022-02-27 22:53:11.926 I Cryptonote protocol initialized OK
2022-02-27 22:53:11.926 I Initializing core...
2022-02-27 22:53:11.926 I Loading blockchain from folder D:\MoneroBlockchain\lmdb ...
2022-02-27 22:53:11.942 W Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2022-02-27 22:53:11.942 E Error opening database: Failed to query m_blocks: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
2022-02-27 22:53:11.942 I Stopping cryptonote protocol...
2022-02-27 22:53:11.942 I Cryptonote protocol stopped successfully
2022-02-27 22:53:11.942 E Exception in main! Failed to initialize core

@selsta
Copy link
Collaborator

selsta commented Feb 27, 2022

Yes, looks corrupted.

You can try to add the --db-salvage flag in addition to the above command and it might fix itself, but it's not guaranteed.

@ThomasAn73
Copy link
Author

No go.
Delete the DB and restart ? Problem is I don't know what condition caused it, so it could happen again if nothing else changes.

@selsta
Copy link
Collaborator

selsta commented Feb 27, 2022

I assume it's an external hard drive? Most of the times it's either force shutdown computer during sync or unplugging the hard drive during sync.

You can add --db-sync-mode safe to your daemon startup flags, it will result in a slower sync but it should be impossible to corrupt the database.

Basically I would recommend to delete the lmdb folder and do:

.\monerod.exe --data-dir D:\Custom\Blockchain\Path --db-sync-mode safe

For the initial sync stay in CMD and don't use the GUI yet.

@ThomasAn73
Copy link
Author

Will do. Thank you for the assistance and tips !

@ThomasAn73
Copy link
Author

I am noticing the download is rather spotty even-though I have good internet connection. Is this type of behavior normal ? Saying "0 blocks synced in 90 min" ?
Clipboard-1

@selsta
Copy link
Collaborator

selsta commented Feb 28, 2022

Looks weird but it seems to sync fine. I would ignore it for now.

@damiendonnelly
Copy link

The simple solution is to download the Monero CLI wallet as well, unzip it and run (right click, open with Terminal)"monerod".
This will start the Monero Daemon. Then try again from the GUI with the location specified and the start up flags "--db-sync-mode safe"

@selsta
Copy link
Collaborator

selsta commented Apr 29, 2022

Seems like no new issues showed up, closing.

@selsta selsta closed this as completed Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants