Bitcoin Forum
September 06, 2025, 01:40:40 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 401 Eror LND Node  (Read 70 times)
Mahiyammahi (OP)
Sr. Member
****
Offline Offline

Activity: 392
Merit: 255



View Profile
September 03, 2025, 06:23:18 PM
 #1

Recently I was trying to help a local user from our forum to ran a LND node on his windows desktop. He installed the Bictoin core on his D drive. Well there was no documantion that was denying that being on D drive won't run the Lnd node. But I faced issue when tried to run the LND than I've to install the Bitcoin core in :C drive.

But in this case when I was helping this user , his LND was crashing over and over again .
Here's the log -
Code:
2025-09-02 14:02:52.054 [INF] RPCC: Established connection to RPC server 127.0.0.1:8332

2025-09-02 14:02:52.317 [ERR] LTND: unable to create partial chain control: status code: 401, response: ""

2025-09-02 14:02:52.317 [ERR] LTND: Shutting down due to error in main method rev=2fb725 err="unable to create partial chain control: status code: 401, response: """

2025-09-02 14:02:52.319 [INF] LTND: Shutdown complete

error creating wallet config: unable to create partial chain control: status code: 401, response: ""

I did some research and find out this problem was due to miss match of bitcoin.conf and lnd.conf missmatch of rpc user pass. But even after fixing that issue he was still getting this response.

Is there any more solution can be taken to avoid this?

██████████████████▄▄▄▄████▄
███▄███▀▀▀████████▀▀▀████▀██▄
████▌███████▀████████▄▄█▌██
████▌████▄████▀▀██▌█████▌████
██▄██████████▀▀██▌████▀██▐██
▄███████████▄▄▄▄▄███████▄▄█████▄
███▄▄▄▄▄████▀▀▀████▀▀▀███▀████▀█
████▀██████████▐█▀████████▄▀▀▀██
██▄███▀█████████▐▌█████████▀▀▄██
███▄▄█████████▐██████▄██▄▄▄▄███▀
██████████████████▄▄▄███▀█████▀
███▀▀▀███▄▄▄██████▀▀▀▀▀▀
██████▀██████▀▀▀▀
|
▄▄████████▄▄
▄█████░█░█░██████▄
▄███░█░░█░█░█░█░░░███▄
█████░█░░░░░░░░█░█████
▄████████░░░█▄█░█▄███████▄
██████░░░░░░░░░░█░░░█████

█████░█░░░░▀▄▄▄█░█░█░████
███████░█░░░░░░░█░░░█████
▀███████░████░░█████████▀
▀██████░█░░░░██░░██████▀
▀██████░░░██░░███████▀
▀███████░░███████▀
▀▀████████▀▀
$HOG AIRDROP
███  LIVE!  ███
|
 
|
mcdouglasx
Sr. Member
****
Offline Offline

Activity: 756
Merit: 397



View Profile WWW
September 03, 2025, 07:00:29 PM
Merited by Mahiyammahi (1)
 #2

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


Code:
server=1
rpcuser=user_RPC
rpcpassword=PASS_RPC
rpcport=8332
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333


lnd.conf
Code:
bitcoin.active=1
bitcoin.mainnet=1
bitcoin.node=bitcoind
bitcoind.rpchost=127.0.0.1:8332
bitcoind.rpcuser=user_RPC
bitcoind.rpcpass=PASS_RPC
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

If you have Bitcoin Core on D: you can try adding this line in lnd.conf assuming your bitcoin core is on that path.
Code:
bitcoind.dir=D:\Bitcoin
for example.

or if you use authentication cookies
Code:
bitcoind.cookiefile=D:\Bitcoin\.cookie

▄▄█████████████████▄▄
▄█████████████████████▄
███▀▀█████▀▀░░▀▀███████

██▄░░▀▀░░▄▄██▄░░█████
█████░░░████████░░█████
████▌░▄░░█████▀░░██████
███▌░▐█▌░░▀▀▀▀░░▄██████
███░░▌██░░▄░░▄█████████
███▌░▀▄▀░░█▄░░█████████
████▄░░░▄███▄░░▀▀█▀▀███
██████████████▄▄░░░▄███
▀█████████████████████▀
▀▀█████████████████▀▀
Rainbet.com
CRYPTO CASINO & SPORTSBOOK
|
█▄█▄█▄███████▄█▄█▄█
███████████████████
███████████████████
███████████████████
█████▀█▀▀▄▄▄▀██████
█████▀▄▀████░██████
█████░██░█▀▄███████
████▄▀▀▄▄▀███████
█████████▄▀▄███
█████████████████
███████████████████
██████████████████
███████████████████
 
 $20,000 
WEEKLY RAFFLE
|



█████████
█████████ ██
▄▄█░▄░▄█▄░▄░█▄▄
▀██░▐█████▌░██▀
▄█▄░▀▀▀▀▀░▄█▄
▀▀▀█▄▄░▄▄█▀▀▀
▀█▀░▀█▀
10K
WEEKLY
RACE
100K
MONTHLY
RACE
|

██









█████
███████
███████
█▄
██████
████▄▄
█████████████▄
███████████████▄
░▄████████████████▄
▄██████████████████▄
███████████████▀████
██████████▀██████████
██████████████████
░█████████████████▀
░░▀███████████████▀
████▀▀███
███████▀▀
████████████████████   ██
 
[..►PLAY..]
 
████████   ██████████████
BitMaxz
Legendary
*
Offline Offline

Activity: 3738
Merit: 3409


My PC.broke :(


View Profile WWW
September 03, 2025, 07:44:47 PM
 #3

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.

.
 betpanda.io 
 
ANONYMOUS & INSTANT
.......ONLINE CASINO.......
▄███████████████████████▄
█████████████████████████
█████████████████████████
████████▀▀▀▀▀▀███████████
████▀▀▀█░▀▀░░░░░░▄███████
████░▄▄█▄▄▀█▄░░░█▄░▄█████
████▀██▀░▄█▀░░░█▀░░██████
██████░░▄▀░░░░▐░░░▐█▄████
██████▄▄█░▀▀░░░█▄▄▄██████
█████████████████████████
█████████████████████████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀░░░▀██████████
█████████░░░░░░░█████████
███████░░░░░░░░░███████
████████░░░░░░░░░████████
█████████▄░░░░░▄█████████
███████▀▀▀█▄▄▄█▀▀▀███████
██████░░░░▄░▄░▄░░░░██████
██████░░░░█▀█▀█░░░░██████
██████░░░░░░░░░░░░░██████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀▀▀▀▀▀█████████
███████▀▀░░░░░░░░░███████
██████░░░░░░░░░░░░▀█████
██████░░░░░░░░░░░░░░▀████
██████▄░░░░░░▄▄░░░░░░████
████▀▀▀▀▀░░░█░░█░░░░░████
████░▀░▀░░░░░▀▀░░░░░█████
████░▀░▀▄░░░░░░▄▄▄▄██████
█████░▀░█████████████████
█████████████████████████
▀███████████████████████▀
.
SLOT GAMES
....SPORTS....
LIVE CASINO
▄░░▄█▄░░▄
▀█▀░▄▀▄░▀█▀
▄▄▄▄▄▄▄▄▄▄▄   
█████████████
█░░░░░░░░░░░█
█████████████

▄▀▄██▀▄▄▄▄▄███▄▀▄
▄▀▄█████▄██▄▀▄
▄▀▄▐▐▌▐▐▌▄▀▄
▄▀▄█▀██▀█▄▀▄
▄▀▄█████▀▄████▄▀▄
▀▄▀▄▀█████▀▄▀▄▀
▀▀▀▄█▀█▄▀▄▀▀

Regional Sponsor of the
Argentina National Team
Hridyansh Labs
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
September 04, 2025, 03:34:30 AM
Merited by Mahiyammahi (1)
 #4

Is there any more solution can be taken to avoid this?
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.

Code:
bitcoin.active=1
bitcoin.mainnet=1
bitcoin.node=bitcoind

Code:
bitcoind.dir=D:\Bitcoin\Data
bitcoind.rpchost=127.0.0.1
bitcoind.rpccookie=D:\Bitcoin\Data\.cookie

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)
Code:
server=1
txindex=1
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
rpcauth=youruser:...<hashed-secret>...

lnd.conf
Code:
bitcoind.rpcuser=youruser
bitcoind.rpcpass=the_plain_password_you_generated

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
Code:
server=1
txindex=1
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
# (ZMQ if not used then no need this.)
# zmqpubrawblock=tcp://127.0.0.1:28332
# zmqpubrawtx=tcp://127.0.0.1:28333

lnd.conf
Code:
bitcoin.active=1
bitcoin.mainnet=1
bitcoin.node=bitcoind

Bitcoind:
bitcoind.dir=D:\Bitcoin\Data
bitcoind.rpchost=127.0.0.1:8332
bitcoind.rpccookie=D:\Bitcoin\Data\.cookie
bitcoind.rpcpolling=1

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!