<p>I believe that your configs are ok, but when you launch <code>lnd</code> with the command like flags, you overwrite one parameter to a broken value.</p>

<p>Specifically, I am talking about the flag <code>--bitcoind.zmqpubrawtx=8332</code>, which should be <code>--bitcoind.zmqpubrawtx=127.0.0.1:28333</code> instead.</p>

CC BY-SA 4.0
2019-05-14T06:14:18.473Z
you're right! bash history not always helps...
greengold
CC BY-SA 4.0
2022-09-03T08:38:41.297Z
In my case, I have domain names configured, not IP adresses. So, it helped to add `tcp://` before the domain name, like `--bitcoind.zmqpubrawtx=tcp://mydomain.com:28333`.
Sergei Basharov
CC BY-SA 4.0
2019-05-13T10:08:53.147Z
2019-05-13T10:08:53.147Z
Dmitry Laptev
<p>I want to run my LND instance (again) and have some trouble with connecting to bitcoin's ZMQ.</p>

<p>Here is what I do:</p>

<pre><code>$ bitcoin-cli getblockcount
575704

$ lnd --bitcoin.mainnet --bitcoin.active --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=tepo --bitcoind.rpcpass=**** --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 --bitcoind.zmqpubrawtx=8332
</code></pre>

<p>after unlocking lnd wallet I get:</p>

<pre><code>2019-05-12 18:33:03.842 [INF] LTND: Version: 0.5.2-99-beta commit=, build=production, logging=default
2019-05-12 18:33:03.842 [INF] LTND: Active chain: Bitcoin (network=mainnet)
2019-05-12 18:33:03.842 [INF] CHDB: Checking for schema update: latest_version=8, db_version=8
2019-05-12 18:33:03.853 [INF] RPCS: password gRPC proxy started at [::]:8080
2019-05-12 18:33:03.853 [INF] RPCS: password RPC server listening on 127.0.0.1:10009
2019-05-12 18:33:03.853 [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.
2019-05-12 18:33:10.105 [INF] LNWL: Opened wallet
2019-05-12 18:33:10.204 [INF] LTND: Primary chain is set to: bitcoin
unable to create chain control: unable to connect to bitcoind: unable to subscribe for zmq tx events: dial tcp 0.0.32.140:0: connect: invalid argument
2019-05-12 18:33:10.207 [INF] LTND: Shutdown complete
unable to connect to bitcoind: unable to subscribe for zmq tx events: dial tcp 0.0.32.140:0: connect: invalid argument
</code></pre>

<p>bitcoin.conf:</p>

<pre><code>server=1
txindex=1
daemon=1
rpcconnect=127.0.0.1
rpcport=8332
rpcuser=tepo
rpcpassword=****
dbcache=1024
rpcallowip=0.0.0.0/0
rpcthreads=4
rpctimeout=300
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
</code></pre>

<p>lnd.conf:</p>

<pre><code>Application Options]
debuglevel=info
#debughtlc=true
#listen=0.0.0.0:9735
externalip=188.167.56.214
#rpclisten=0.0.0.0:8332
alias=axon
color=#ff9200
maxpendingchannels=10
restlisten=0.0.0.0:8080

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

[Bitcoind]
bitcoind.rpchost=127.0.0.1:8332
bitcoind.rpcuser=tepo
bitcoind.rpcpass=****
bitcoind.zmqpubrawblock=127.0.0.1:28332
bitcoind.zmqpubrawtx=127.0.0.1:28333
#bitcoind.zmqpath=tcp://127.0.0.1:18501
</code></pre>

<pre><code>$ ldd /usr/bin/bitcoind | grep -i mq
    libzmq.so.5 =&gt; /usr/lib/libzmq.so.5 (0x00007f9ce53c1000)
</code></pre>

<p>if I missed something to show you, please tell me. </p>

<p>Help appreciated</p>

<bitcoin-core><lightning-network-daemon><zeromq>
LND can't connect to ZMQ
greengold
# LND can't connect to ZMQ

(Asked by: username_0 on 2019-05-12)

I want to run my LND instance (again) and have some trouble with connecting to bitcoin's ZMQ.

Here is what I do:

```
$ bitcoin-cli getblockcount
575704

$ lnd --bitcoin.mainnet --bitcoin.active --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=tepo --bitcoind.rpcpass=**** --bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 --bitcoind.zmqpubrawtx=8332

```

after unlocking lnd wallet I get:

```
2019-05-12 18:33:03.842 [INF] LTND: Version: 0.5.2-99-beta commit=, build=production, logging=default
2019-05-12 18:33:03.842 [INF] LTND: Active chain: Bitcoin (network=mainnet)
2019-05-12 18:33:03.842 [INF] CHDB: Checking for schema update: latest_version=8, db_version=8
2019-05-12 18:33:03.853 [INF] RPCS: password gRPC proxy started at [::]:8080
2019-05-12 18:33:03.853 [INF] RPCS: password RPC server listening on 127.0.0.1:10009
2019-05-12 18:33:03.853 [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.
2019-05-12 18:33:10.105 [INF] LNWL: Opened wallet
2019-05-12 18:33:10.204 [INF] LTND: Primary chain is set to: bitcoin
unable to create chain control: unable to connect to bitcoind: unable to subscribe for zmq tx events: dial tcp 0.0.32.140:0: connect: invalid argument
2019-05-12 18:33:10.207 [INF] LTND: Shutdown complete
unable to connect to bitcoind: unable to subscribe for zmq tx events: dial tcp 0.0.32.140:0: connect: invalid argument

```

bitcoin.conf:

```
server=1
txindex=1
daemon=1
rpcconnect=127.0.0.1
rpcport=8332
rpcuser=tepo
rpcpassword=****
dbcache=1024
rpcallowip=0.0.0.0/0
rpcthreads=4
rpctimeout=300
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

```

lnd.conf:

```
Application Options]
debuglevel=info
#debughtlc=true
#listen=0.0.0.0:9735
externalip=188.167.56.214
#rpclisten=0.0.0.0:8332
alias=axon
color=#ff9200
maxpendingchannels=10
restlisten=0.0.0.0:8080

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

[Bitcoind]
bitcoind.rpchost=127.0.0.1:8332
bitcoind.rpcuser=tepo
bitcoind.rpcpass=****
bitcoind.zmqpubrawblock=127.0.0.1:28332
bitcoind.zmqpubrawtx=127.0.0.1:28333
#bitcoind.zmqpath=tcp://127.0.0.1:18501

```

```
$ ldd /usr/bin/bitcoind | grep -i mq
    libzmq.so.5 => /usr/lib/libzmq.so.5 (0x00007f9ce53c1000)

```

if I missed something to show you, please tell me.

Help appreciated

**Tags:** bitcoin-core, lightning-network-daemon, zeromq


---

## 1 answers

### Answer by username_1 on 2019-05-13. Score: 2 | Accepted answer

I believe that your configs are ok, but when you launch `lnd` with the command like flags, you overwrite one parameter to a broken value.

Specifically, I am talking about the flag `--bitcoind.zmqpubrawtx=8332`, which should be `--bitcoind.zmqpubrawtx=127.0.0.1:28333` instead.

> **Comments:**
> **username_0**: you're right! bash history not always helps...  
> **username_2**: In my case, I have domain names configured, not IP adresses. So, it helped to add `tcp://` before the domain name, like `--bitcoind.zmqpubrawtx=tcp://mydomain.com:28333`.  

---

