Closed curtischong closed 6 years ago
Looks like you need to check your authentication params for lnd
to btcd
. On btcd, you're likely seeing a series of authentication failures.
so I added --rpclisten=X.X.X.X:xxxx --listen=X.X.X.X:xxxx and I would get an output like this:
2018-07-31 11:24:04.688 [INF] LTND: Version 0.4.2-beta commit=
2018-07-31 11:24:04.688 [INF] LTND: Active chain: Bitcoin (network=mainnet)
2018-07-31 11:24:04.688 [INF] CHDB: Checking for schema update: latest_version=3, db_version=3
2018-07-31 11:24:04.703 [ERR] LTND: password RPC server unable to listen on X.X.X.X:xxxx
2018-07-31 11:24:04.703 [INF] LTND: Shutdown complete
listen tcp X.X.X.X:xxxx: bind: can't assign requested address
The listening address isn't the issue (for lnd
). Your lnd
node can't connect to the btcd
node. In this case, you should double check that you have the correct parameters for rpc authentication to the btcd
backend.
My authentication parameters are correct and I know that rpc works because of my btcctl
command. It might be my tls certificate but I don't have much experience with those and I don't know what to do. I have tried creating my own TLS certificate but that didn't really work out. Is the tls certificate in the Lnd directory used to connect to your wallet in localhost? or to the backend? are there two tls certificates that I need?
lnd
makes its own TLS cert. It expects the btcd
cert to be in the default location, if it isn't there, then you need to specify it manually.
I have verified that the credentials in btcd.conf and btcctl.conf are the same You need to check lnd.conf.
Background
I have been trying to connect to my btcd backend on an external server but when I run
lnd --bitcoin.active --bitcoin.mainnet --debuglevel=debug --btcd.rpcuser=myuser --btcd.rpcpass=mypass --externalip=X.X.X.X:xxxx --btcd.rpccert=rpc.cert
I have also tried including
--btcd.rpchost=X.X.X.X:xxxx
in the command aboveI am faced with this output:
Sometimes I would get more output and would be prompted to input the password for my wallet yeilding me an input that looks like this:
I don't know why it is looking at 127.0.0.1:10009 and 127.0.0.1:8080 when I have provided the ip in my command. I have also set the ip in my lnd.conf to be the ip of my server just to be safe.
I have verified that the credentials in btcd.conf and btcctl.conf are the same
My server is definitely running and I can call the btcd server with this command:
btcctl -u myuser -P mypass -s X.X.X.X:xxxx getpeerinfo --rpccert=rpc.cert
Does anyone know why I can't connect to my server?
Your environment
lnd
: v0.4.2-betauname -a
on *Nix): macOS High Sierra Version 10.13.6btcd
: v0.12.0-beta