<p>you need to set</p>
<pre><code>zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
</code></pre>
<p>in <code>bitcoin.conf</code> so that lnd can connect.</p>

CC BY-SA 4.0
2024-07-16T23:46:53.320Z
2024-07-16T23:46:53.320Z
northben
<p>I have an AWS EC2 instance.  The instance has Bitcoin Core (Testnet) node and a LND node. It is working fine. Now, I want to install another LND on a different EC2 instance, but connect it to the same Bitcoin Core node. I tried opening the RPC ports and modified the LND config file of the new node with <code>rpchost</code> pointing to the first node.  When I launch LND on the new node, it hangs after opening the wallet.  Any ideas as how to configure this?</p>
<hr />
<p>bitcoin.conf:</p>
<pre><code>testnet=1
server=1
txindex=1
rpcallowip=0.0.0.0/0
rpcbind=127.0.0.1
rpcuser=XXXXX
rpcpassword=XXXXXX
datadir=/home/ubuntu/.bitcoin/data
conf=/home/ubuntu/.bitcoin/bitcoin.conf
daemon=1
keypool=2048
paytxfee=0.0007
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
</code></pre>
<hr />
<p>lnd.conf:</p>
<pre><code>[Application Options]
externalip=XX.166.28.15X &lt;--- Public elastic IP of the LN node ..
alias=xxxxxx
[Bitcoin]
bitcoin.active=1
bitcoin.testnet=1
bitcoin.node=bitcoind
[Bitcoind]
bitcoind.rpchost=xx.88.241.yyyy &lt;--- Public elastic IP of bitcoin-core instance
rpcuser=XXXXX
rpcpassword=XXXXXX
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
</code></pre>
<hr />
<p>error log:</p>
<pre><code>2022-05-29 08:34:57.920 [INF] LTND: Version: 0.15.0-beta.rc3 commit=v0.15.0-beta.rc3-2-g1e0d6ec0a, build=production, logging=default, debuglevel=info
2022-05-29 08:34:57.921 [INF] LTND: Active chain: Bitcoin (network=testnet)
2022-05-29 08:34:57.922 [INF] RPCS: RPC server listening on 127.0.0.1:10009
2022-05-29 08:34:57.922 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080
2022-05-29 08:34:57.923 [INF] LTND: Opening the main database, this might take a few minutes...
2022-05-29 08:34:57.923 [INF] LTND: Opening bbolt database, sync_freelist=false, auto_compact=false
2022-05-29 08:34:57.924 [INF] LTND: Creating local graph and channel state DB instances
2022-05-29 08:34:57.938 [INF] CHDB: Checking for schema update: latest_version=27, db_version=27
2022-05-29 08:34:57.938 [INF] LTND: Database(s) now open (time_to_open=14.298545ms)!
2022-05-29 08:34:57.938 [INF] LTND: We're not running within systemd or the service type is not 'notify'
2022-05-29 08:34:57.938 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create a wallet, `lncli unlock` to unlock an existing wallet, or `lncli changepassword` to change the password of an existing wallet and unlock it.
2022-05-29 08:35:29.832 [INF] LNWL: Opened wallet
2022-05-29 08:35:29.904 [INF] CHRE: Primary chain is set to: bitcoin
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x86821e]
goroutine 100 [running]:
github.com/btcsuite/btcd/rpcclient.(*Client).handleSendPostMessage(0xc0000f1080, 0xc0003ef0e0)
        /home/ubuntu/go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta.0.20220413172512-bf64c8bdbbbf/rpcclient/infrastructure.go:814 +0x4fe
github.com/btcsuite/btcd/rpcclient.(*Client).sendPostHandler(0xc0000f1080)
        /home/ubuntu/go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta.0.20220413172512-bf64c8bdbbbf/rpcclient/infrastructure.go:861 +0x34
created by github.com/btcsuite/btcd/rpcclient.(*Client).start
        /home/ubuntu/go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta.0.20220413172512-bf64c8bdbbbf/rpcclient/infrastructure.go:1134 +0x105
ubuntu@ip-172-31-2-169:~/.lnd$
</code></pre>

CC BY-SA 4.0
2022-05-28T11:05:05.023Z
Posting a logfile that shows where it hangs and what has happened will be useful to answer your question
Rene Pickhardt
CC BY-SA 4.0
2022-05-28T13:11:03.580Z
Do you have rpcbind/rpcallowip options in the Bitcoin Core config file? Bitcoin Core by default only listens for connections from localhost.
Pieter Wuille
CC BY-SA 4.0
2022-05-29T09:07:16.343Z
thanks for the response .. I have pasted the conf files and error message
rajaS
CC BY-SA 4.0
2022-05-29T13:00:56.883Z
now i am getting error :   unable to create partial chain control: unable to subscribe for zmq block events: dial tcp 127.0.0.1:28332: connect: connection refused
rajaS
<bitcoind><lightning-network-daemon><amazon-web-services>
How to connect multiple LND noeds on different machines to a single Bitcoin Core?
rajaS
# How to connect multiple LND noeds on different machines to a single Bitcoin Core?

(Asked by: username_0 on 2022-05-28)

I have an AWS EC2 instance. The instance has Bitcoin Core (Testnet) node and a LND node. It is working fine. Now, I want to install another LND on a different EC2 instance, but connect it to the same Bitcoin Core node. I tried opening the RPC ports and modified the LND config file of the new node with `rpchost` pointing to the first node. When I launch LND on the new node, it hangs after opening the wallet. Any ideas as how to configure this?

---

bitcoin.conf:

```
testnet=1
server=1
txindex=1
rpcallowip=0.0.0.0/0
rpcbind=127.0.0.1
rpcuser=XXXXX
rpcpassword=XXXXXX
datadir=/home/ubuntu/.bitcoin/data
conf=/home/ubuntu/.bitcoin/bitcoin.conf
daemon=1
keypool=2048
paytxfee=0.0007
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

```

---

lnd.conf:

```
[Application Options]
externalip=XX.166.28.15X <--- Public elastic IP of the LN node ..
alias=xxxxxx
[Bitcoin]
bitcoin.active=1
bitcoin.testnet=1
bitcoin.node=bitcoind
[Bitcoind]
bitcoind.rpchost=xx.88.241.yyyy <--- Public elastic IP of bitcoin-core instance
rpcuser=XXXXX
rpcpassword=XXXXXX
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

```

---

error log:

```
2022-05-29 08:34:57.920 [INF] LTND: Version: 0.15.0-beta.rc3 commit=v0.15.0-beta.rc3-2-g1e0d6ec0a, build=production, logging=default, debuglevel=info
2022-05-29 08:34:57.921 [INF] LTND: Active chain: Bitcoin (network=testnet)
2022-05-29 08:34:57.922 [INF] RPCS: RPC server listening on 127.0.0.1:10009
2022-05-29 08:34:57.922 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080
2022-05-29 08:34:57.923 [INF] LTND: Opening the main database, this might take a few minutes...
2022-05-29 08:34:57.923 [INF] LTND: Opening bbolt database, sync_freelist=false, auto_compact=false
2022-05-29 08:34:57.924 [INF] LTND: Creating local graph and channel state DB instances
2022-05-29 08:34:57.938 [INF] CHDB: Checking for schema update: latest_version=27, db_version=27
2022-05-29 08:34:57.938 [INF] LTND: Database(s) now open (time_to_open=14.298545ms)!
2022-05-29 08:34:57.938 [INF] LTND: We're not running within systemd or the service type is not 'notify'
2022-05-29 08:34:57.938 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create a wallet, `lncli unlock` to unlock an existing wallet, or `lncli changepassword` to change the password of an existing wallet and unlock it.
2022-05-29 08:35:29.832 [INF] LNWL: Opened wallet
2022-05-29 08:35:29.904 [INF] CHRE: Primary chain is set to: bitcoin
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x86821e]
goroutine 100 [running]:
github.com/btcsuite/btcd/rpcclient.(*Client).handleSendPostMessage(0xc0000f1080, 0xc0003ef0e0)
        /home/ubuntu/go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta.0.20220413172512-bf64c8bdbbbf/rpcclient/infrastructure.go:814 +0x4fe
github.com/btcsuite/btcd/rpcclient.(*Client).sendPostHandler(0xc0000f1080)
        /home/ubuntu/go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta.0.20220413172512-bf64c8bdbbbf/rpcclient/infrastructure.go:861 +0x34
created by github.com/btcsuite/btcd/rpcclient.(*Client).start
        /home/ubuntu/go/pkg/mod/github.com/btcsuite/btcd@v0.22.0-beta.0.20220413172512-bf64c8bdbbbf/rpcclient/infrastructure.go:1134 +0x105
ubuntu@ip-172-31-2-169:~/.lnd$

```

**Tags:** bitcoind, lightning-network-daemon, amazon-web-services

> **Comments:**
> **username_1**: Posting a logfile that shows where it hangs and what has happened will be useful to answer your question  
> **username_2**: Do you have rpcbind/rpcallowip options in the Bitcoin Core config file? Bitcoin Core by default only listens for connections from localhost.  
> **username_0**: thanks for the response .. I have pasted the conf files and error message  
> **username_0**: now i am getting error :   unable to create partial chain control: unable to subscribe for zmq block events: dial tcp 127.0.0.1:28332: connect: connection refused  

---

## 1 answers

### Answer by username_3 on 2024-07-16. Score: 0

you need to set

```
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333

```

in `bitcoin.conf` so that lnd can connect.


---

