Bitcoin Forum
May 15, 2024, 07:00:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Solved] Connect LND and Core on different machines  (Read 75 times)
simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
September 28, 2023, 09:20:46 AM
Last edit: September 28, 2023, 01:21:23 PM by simpleSliv3r
Merited by ABCbits (2)
 #1

Hi,

I'm trying to connect my LND node to my Core, both on different machines, but my LND is stucked after unlocking the wallet and I cannot make RPC calls as it shows the following error:
Code:
user@ubuntu:/usr$ lncli getinfo
[lncli] rpc error: code = Unknown desc = the RPC server is in the process of starting up, but not yet ready to accept calls

Error from lnd side:
Code:
2023-09-28 11:19:26.524 [DBG] RPCS: [/lnrpc.WalletUnlocker/UnlockWallet] requested
2023-09-28 11:19:27.087 [INF] LNWL: Opened wallet
2023-09-28 11:19:27.132 [INF] CHRE: Primary chain is set to: bitcoin
2023-09-28 11:19:32.512 [DBG] RPCS: [/lnrpc.Lightning/GetInfo] requested
2023-09-28 11:19:32.512 [ERR] RPCS: [/lnrpc.Lightning/GetInfo]: the RPC server is in the process of starting up, but not yet ready to accept calls

With a quick search on the Internet, I found that this could be because Core is not completely sync but it's:
Code:
{
  "version": 220000,
  "blocks": 809706,
  "headers": 809706,
  "verificationprogress": 0.9999983770795251,
....
Checking mempool.space 809706 is the last block.

The bitcoin.conf and lnd.conf are the following ones:

[Bitcoin.conf]
Code:
server=1
daemon=1

# Allows LND to connect to the Bitcoin node via an RPC user & pass
rpcuser=*********
rpcpassword=**********

# Allows LND & Bitcoin Core to communicate via ZeroMQ
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

# Allows other machines apart from localhost to connect to rpc server
rpcallowip=x.x.x.x/24
rpcbind=127.0.0.1


dbcache=20480

shrinkdebugfile=0


[LND]

Code:
[Application Options]
externalip=x.x.x.x

[Bitcoin]
bitcoin.active=true
bitcoin.mainnet=true
bitcoin.node=bitcoind



[Bitcoind]
bitcoind.rpchost=CoreIP (same network as externalip)
bitcoind.rpcuser=*******
bitcoind.rpcpass=********

bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333


Thanks in advance,
-SS
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7497


Crypto Swap Exchange


View Profile
September 28, 2023, 10:26:02 AM
Merited by simpleSliv3r (2)
 #2

With a quick search on the Internet, I found that this could be because Core is not completely sync but it's:
Code:
{
  "version": 220000,
  "blocks": 809706,
  "headers": 809706,
  "verificationprogress": 0.9999983770795251,
....
Checking mempool.space 809706 is the last block.

At very least, number on verificationprogress is just estimation and one of Bitcoin Core member said there's no problem if it's slightly below 1.0[1]. It's proven by 0.9999983770795251 doesn't refer to total of verified block since the value equal to 6249989856747 / 6250000000000 [2].

[1] https://bitcoin.stackexchange.com/a/85973
[2] https://www.calculator.net/fraction-calculator.html?c2d1=0.9999983770795251&ctype=2&x=79&y=24#decimal2fraction

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
September 28, 2023, 10:34:45 AM
 #3

At very least, number on verificationprogress is just estimation and one of Bitcoin Core member said there's no problem if it's slightly below 1.0[1]. It's proven by 0.9999983770795251 doesn't refer to total of verified block since the value equal to 6249989856747 / 6250000000000 [2].

[1] https://bitcoin.stackexchange.com/a/85973
[2] https://www.calculator.net/fraction-calculator.html?c2d1=0.9999983770795251&ctype=2&x=79&y=24#decimal2fraction

Yes, I absolutely discard that as the issue. I think there's some network config issue on bitcoin.conf and lnd.conf files but I'm unable to see it.
I've modified rpcallowip parameter to 0.0.0.0/0 but still not working :/

If I just wait I get the following message on LND:

Code:
2023-09-28 12:37:13.820 [ERR] LTND: unable to create partial chain control: invalid http POST response (nil), method: getblockhash, id: 1, last error=Post "http://x.x.x.x:8332": dial tcp x.x.x.x:8332: connect: connection timed out
2023-09-28 12:37:13.820 [ERR] LTND: Shutting down because error in main method: error creating wallet config: unable to create partial chain control: invalid http POST response (nil), method: getblockhash, id: 1, last error=Post "http://x.x.x.x:8332": dial tcp x.x.x.x:8332: connect: connection timed out
2023-09-28 12:37:13.822 [INF] LTND: Shutdown complete

error creating wallet config: unable to create partial chain control: invalid http POST response (nil), method: getblockhash, id: 1, last error=Post "http://x.x.x.x:8332": dial tcp x.x.x.x:8332: connect: connection timed out

simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
September 28, 2023, 12:05:09 PM
 #4

After changing some config as binding to 0.0.0.0 and listening to 0.0.0.0/0 on bitcoin.conf now I get a different error:

Code:
2023-09-28 14:06:41.431 [DBG] RPCS: [/lnrpc.WalletUnlocker/UnlockWallet] requested
2023-09-28 14:06:41.986 [INF] LNWL: Opened wallet
2023-09-28 14:06:42.026 [INF] CHRE: Primary chain is set to: bitcoin
2023-09-28 14:06:42.039 [ERR] LTND: unable to create partial chain control: -28: Loading P2P addresses…
2023-09-28 14:06:42.039 [ERR] LTND: Shutting down because error in main method: error creating wallet config: unable to create partial chain control: -28: Loading P2P addresses…
2023-09-28 14:06:42.040 [INF] LTND: Shutdown complete

error creating wallet config: unable to create partial chain control: -28: Loading P2P addresses…

simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
September 28, 2023, 01:23:32 PM
 #5

Finally it's working!
There were different issues. First of all the bindings of bitcoind services must be on 0.0.0.0 if not external IP cannot connect.
Also, there was a traffic filtering on the bitcoin core firewall and it was blocking LND traffic.

- SS
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!