Lnd: zmqpubrawblock and zmqpubrawtx must be different

Created on 27 Aug 2018  路  8Comments  路  Source: lightningnetwork/lnd

Background

Hi,

I am having litecoin and bitcoin which are fully synced. I want to run both litecoin and bitcoin lightning networks. I have started bitcoin lnd with below command

lnd --noencryptwallet --no-macaroons --configfile=~/.lnd/lnd_btc.conf --datadir=~/.lnd_btc --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoind

worked fine and looks good.

And now I trying to start lnd for litecoin with below command.

lnd --noencryptwallet --no-macaroons --configfile=~/.lnd/lnd_ltc.conf --datadir=~/.lnd_ltc --litecoin.active --litecoin.testnet --debuglevel=debug --litecoin.node=litecoind

But getting error shown below.

Attempting automatic RPC configuration to litecoind
unable to load RPC credentials for litecoind: unable to extract RPC credentials: zmqpubrawblock and zmqpubrawtx must be different, cannot start w/o RPC connection

Here I am pointing to litecoin and bitcoin to different lnd data directories.

Your environment

  • version of lnd
    lnd version 0.4.2-beta
  • which operating system (uname -a on *Nix)
    Linux 16.04LTS
  • version of bitcoind and litecoind
    Bitcoin:
    "version": 160200
    Litecoin:
    "version": 150100

Expected behaviour

Litecoin lnd should start.

Actual behaviour

Litecoin lnd is not starting.

Most helpful comment

@cfromknecht and @vegardengen Thanks its work correctly.

All 8 comments

Hi @omkarsunku, can you also describe any relevant entries in the conf files? The error indicates that they're being set to the same host:port, as we require two distinct connections. Are you saying that they're configured differently and the error occurs?

@cfromknecht thanks for response.
Here are my lnd_btc.conf

[Application Options]
debuglevel=trace
debughltc=true
alias=Bitcoin-lnd
externalip=myip

[Bitecoin]
bitcoin.active=1
bitcoin.testnet=true
bitcoin.node=bitcoind

[Bitecoind]
bitcoind.rpcuser=myusername
bitcoind.rpcpass=mypassword
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28332

Here is my lnd_ltc.conf

[Application Options]
debuglevel=trace
debughltc=true
alias=Litecoin-lnd
externalip=myip

[Litecoin]
litecoin.active=1
litecoin.testnet=true
litecoin.node=litecoind

[Litecoind]
litecoind.rpcuser=myusrname
litecoind.rpcpass=mypassword

litecoind.zmqpubrawblock=tcp://127.0.0.1:29000

litecoind.zmqpubrawtx=tcp://127.0.0.1:29000

Do am I missing any entries?

There has been a recent change in LND, requiring the zmqpubrawblock and zmqpubrawtx to be different - i.e. move for example zmqbpubrawtxz to 28333 for bitcoin and 29001 for litecoin. Remember that you need to do the same changes in bitcoind and litecoind before doing it in LND, and restart them.

@vegardengen thanks for update.

@vegardengen I changed the zmqpubrawtx in both litecoin and bitcoin and restarted them.
But this time I am facing problem show below

2018-08-27 08:44:46.007 [ERR] SRVR: unable to create server: listen tcp :9735: bind: address already in use
2018-08-27 08:44:46.008 [INF] LTND: Shutdown complete
listen tcp :9735: bind: address already in use

Lnd-Bitcoin is running properly but i want run Lnd-Litecoin too.

Can't I run both Litecoin-Lnd and Bitcoin-Lnd on same server and which are pointing to different datadir and different conf_files?

You'll need to change the listening addresses used by the litecoin instance as well, which includes the LN peer port, RPC port and REST port. Use

listen=<peer_port> // default 9735
rpclisten=127.0.0.1:<rpc_port> // default 10009
restlisten=127.0.0.1:<rest_port> // default 8080

Set these so that they differ from the bitcoin instance. To control the litecoin one, you'll also need to point lncli to the correct rpc server, since it will default to the bitcoin port. This can be done by adding the --rpcserver=localhost:<rpc_port> flag before the command sequence

Also will need to pass --tlscertpath=<path_to_ltc_cert> --macaroonpath=<path_to_ltc_mac> args to lncli if the data dir is not the default

@cfromknecht and @vegardengen Thanks its work correctly.

Was this page helpful?
0 / 5 - 0 ratings