Trying to use api same as code here http://api.lightning.community/#getinfo
Calling methods give me error: "Connect Failed"
My lnd.conf is:
[Application Options]
debuglevel=trace
debughtlc=true
maxpendingchannels=10
noencryptwallet=1
externalip=myip
alias=lnd.fun
rpclisten=localhost:10009
[Bitcoin]
bitcoin.active=1
bitcoin.testnet=1
bitcoin.node=bitcoind
[Bitcoind]
bitcoind.rpchost=localhost
bitcoind.rpcuser=myuser
bitcoind.rpcpass=mypass
bitcoind.zmqpath=tcp://127.0.0.1:29000
Where are you accessing GRPC from? localhost? outside the lnd node?
If the latter you need to make sure that the tls key and cert used by lnd contains the domain you're using.
@dabura667 , i using gRPC from localhost. lnd , bitcoind and application that using gRPC , are in same server.
Are you using javascript? Did you add the macaroon to the meta object?
This sounds like the issue I had and a number of other people due to the updated cipher suite in this change https://github.com/lightningnetwork/lnd/pull/776. If you are using the javascript or python grpc client library you need to update the GRPC_SSL_CIPHER_SUITES environment variable to be:
'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384'
In javascript
// top of file
process.env.GRPC_SSL_CIPHER_SUITES = 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384'
// do awesome grpc stuff with lnd
In python
import os
os.environ["GRPC_SSL_CIPHER_SUITES"] = 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384'
# do awesome grpc stuff with lnd
I hope this fixes your issue. I will try make a PR to update the docs around this since it took me a while to figure this out.
@dabura667 , I using nodejs , also i added macaroon.
@adrienemery , I updated process.env.GRPC_SSL_CIPHER_SUITES but problem not fixed
The answer may be in GRPC_SSL_CIPHER_SUITES. If you're using an old version of Python or something like that, then the default set of cipher suites may not intersect with what we offer.
Check that your lnd node is actually running, as nothing significant has changed w.r.t the RPC interface.
@adrienemery , thank you. your solution worked for me.
Also , 'HIGH+ECDSA' is valid for it.
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
Most helpful comment
This sounds like the issue I had and a number of other people due to the updated cipher suite in this change https://github.com/lightningnetwork/lnd/pull/776. If you are using the javascript or python grpc client library you need to update the
GRPC_SSL_CIPHER_SUITESenvironment variable to be:In javascript
In python
I hope this fixes your issue. I will try make a PR to update the docs around this since it took me a while to figure this out.