So, I was helping someone from this forum set up an LND node on their Windows machine. They had Bitcoin Core installed on the D drive. There wasn't any documentation saying that it wouldn't work from there, but I ran into problems when I tried to start the LND node. I ended up having to install Bitcoin Core on the C drive instead.
While assisting this user, their LND kept crashing repeatedly. Here’s the log
I did some digging and found out the issue was because the rpc user and password in bitcoin.conf and lnd.conf didn't match. Even after correcting that, they were still seeing the same error.
Are there any other solutions out there to fix this?
I think you should post the contents of the bitcoin.conf and lnd.conf files for more help, avoiding exposing sensitive content such as your username and password.
should be configured with something similar to this:
bitcoin.conf
lnd.conf
If you have Bitcoin Core on D: you can try adding this line in lnd.conf assuming your bitcoin core is on that path. for example.
or if you use authentication cookies
Based on the error that's a authentication error. It would work if you switch authentication cookies or try forcing LND to use that RPC authentication than the cookie by removing this command from LND --bitcoind.rpccookie=.
Or if it does not exist in your LND conf file try adding it and put the correct path of .cookie from Bitcoin core folder as suggested above.
Usually when bitcoin.core is downloaded for download, it is downloaded directly to the C drive. The correct solution is to download Bitcoin Core directly to the C drive and install it. This is usually a LND login with which credentials/cookies and Bitcoin Core is running in which data D cookies/configs. You need to make sure where it is running.
Solving problems using cookies:
1: (Bitcoin Core Running)+(.cookie) file stores temporary (RPC) credentials. Make sure LND knows about the (RPC) file inside (.cookie). After downloading bitcoin core, (C/D) can detect.. (.cookie) from wherever it is.
2: (lnd.conf) must be completely cleared to make sure where (cookie/data) is and whether it can be detected.
And you must note that if bitcoind.dir, bitcoind.rpccookie are in the main dock of LND, if Core is on the default (C:) drive and if you show LND the (D:) drive, or vice versa, then 401 will come, it is normal. So you must be sure whether (bitcoind.dir/bitcoind.rpccookie) works correctly.
RPCUSER/RPCPASSWORD:
(rpcuser/rpcpassword) should be used correctly to keep conflicts free. (bitcoin.conf and ind.conf) If the user/password does not match, this can cause 401 errors.
You can use the other words without these three symbols (",#,=). However, using them will cause problems with conf passing.
Bitcoin.conf (Core)
lnd.conf
ZMQ/RPCPOLLING: If you can connect ZMQ properly, there will be no problem. If there is a problem with the ZMQ config, you can use RPCPOLLING to find the cookie easily.
(D: Datad, Cookie-meaning):
bitcoin.conf
lnd.conf
Where you have LND installed doesn't matter, what matters is which data the cookie/config is being read from. It worked after you installed it on C:, because then LND and Core probably found the same default directory (.cookie/conf). If you set the correct (bitcoind.dir/bitcoind.rpccookie) it will work fine even if it is on D:. (Lightning Engineering Docs), (Bitcoin Stack Exchange)
If you want, you can paste the relevant part of your current (bitcoin.conf/lnd.conf) here (with the path/password hidden), and your problem will be solved.