adrienemery / lnd-grpc-client

A python grpc client/async client for LND ⚡⚡⚡
MIT License
34 stars 20 forks source link

Looking for a bit of help getting started using gRPC with Umbrel #31

Closed brianoflondon closed 3 years ago

brianoflondon commented 3 years ago

I'm able to connect to my Umbrel using the REST API but I'm struggling with getting gRPC (which I think I need for being able to send Keysend payments).

macaroon_folder = ".macaroon"
macaroon_file = "admin.macaroon"
macaroon_path = os.path.join(macaroon_folder, macaroon_file)
cert = os.path.join(macaroon_folder, "tls.cert")

lnd = LNDClient(
    macaroon_filepath=macaroon_path,
    cert_filepath=cert,
    ip_address="10.0.0.5:10009",
    network="mainnet",
    admin=True
)

always give me this when I try lnd.get_info()

Exception has occurred: _InactiveRpcError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
<_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNAVAILABLE
    details = "failed to connect to all addresses"
    debug_error_string = "{"created":"@1631694216.210741000","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3187,"referenced_errors":[{"created":"@1631694216.210741000","description":"failed to connect to all addresses","file":"src/core/lib/transport/error_utils.cc","file_line":146,"grpc_status":14}]}"
>

I'm not sure where I'm going wrong. I'm absolutely certain my umbrel is on 10.0.0.5 on my local net. Docker on the Umbrel seems to be exposing the right port:

405098eccf22   lightninglabs/lnd:v0.13.1-beta   "lnd"                    23 hours ago   Up 13 hours   0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:9735->9735/tcp, :::9735->9735/tcp, 0.0.0.0:10009->10009/tcp, :::10009->10009/tcp   lnd

Really grateful for any help anyone can offer.

brianoflondon commented 3 years ago

For no reason I can readily understand, if I replace 10.0.0.5 with umbrel.local it all works.