Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error 503 Unable to Connect to LND Server after logging in to RTL #1120

Closed
Zaphod101010 opened this issue Oct 12, 2022 · 3 comments
Closed

Comments

@Zaphod101010
Copy link

I seem to be having the same issue as this #1018
but running on ubuntu instead of windows.

I can use curl to query the LND rest api with the macaroon header, but calls to LND via RTL are failing with the following error after logging in to the RTL UI. It looks like RTL isn't sending any headers...

ERROR: GetInfo => Get Info Error: {"name":"RequestError","message":"Error: connect ECONNREFUSED ::1:8084","cause":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"::1","port":8084},"error":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"::1","port":8084},"options":{"url":"https://localhost:8084/v1/getinfo","rejectUnauthorized":false,"json":true,"headers":{},"method":"GET","qs":{},"simple":true,"resolveWithFullResponse":false,"transform2xxOnly":false}}

LND Config

debuglevel=info

listen=0.0.0.0:9735
restlisten=0.0.0.0:8084
rpclisten=localhost:10009

alias=[...]

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

[Bitcoind]
bitcoind.dir=/media/[...]/2TB/bitcoin/
bitcoind.config=/media/[...]/2TB/bitcoin/bitcoin.conf

bitcoind.rpchost=localhost
bitcoind.rpcuser=[...]
bitcoind.rpcpass=[...]

bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

RTL Config

  "port": "3001",
  "defaultNodeIndex": 1,
  "SSO": {
    "rtlSSO": 0,
    "rtlCookiePath": "",
    "logoutRedirectLink": ""
  },
  "nodes": [
    {
      "index": 1,
      "lnNode": "Node 1",
      "lnImplementation": "LND",
      "Authentication": {
        "macaroonPath": "/home/[...]/.lnd/data/chain/bitcoin/mainnet",
        "configPath": "/home/[...]/.lnd/lnd.conf"
      },
      "Settings": {
        "userPersona": "MERCHANT",
        "themeMode": "DAY",
        "themeColor": "PURPLE",
        "channelBackupPath": "/home/[..]/.lnd/backup",
        "bitcoindConfigPath": "/media/[...]/2TB/bitcoin/bitcoin.conf",
        "logLevel": "DEBUG",
        "lnServerUrl": "https://localhost:8084/v1",
        "fiatConversion": false
      }
    }
  ],
  "multiPassHashed": "[...]"
}

Bitcoin Config

# RPC
server=1
rpcport=8332
rpcclienttimeout=30
rpcuser=[...]
rpcpassword=[...]

# LND node setup
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

dbcache=4000

LND v0.15.2
RTL v0.13.1
Bitcoin v22.0.0
Firefox v105

@Zaphod101010 Zaphod101010 changed the title Erroor 503 Unable to Connect to LND Server after logging in to RTL Error 503 Unable to Connect to LND Server after logging in to RTL Oct 12, 2022
@Zaphod101010
Copy link
Author

Was able to solve the issue by changing the RTL config lnServerUrl from "localhost" to 127.0.0.1. I logged the errRes in the catch block and it showed address: '::1' which is the ipv6 loopback. I guess my LND was only listening on ipv4.

@ShahanaFarooqui
Copy link
Collaborator

@Zaphod101010 Thank you for sharing the solution. Closing it now.

@xmready
Copy link

xmready commented Nov 7, 2022

I also had this problem and needed to change localhost to 127.0.0.1 in order to get RTL to connect. Hopefully it gets fixed.

VajraOfIndra pushed a commit to raspibolt/raspibolt that referenced this issue Nov 16, 2022
Change `localhost` to `127.0.0.1` in the RTL config file to avoid the following errors:
```
$ node rtl
[11/7/2022, 3:34:35 PM] INFO: RTL => Server is up and running, please open the UI at http://localhost:3000 or your proxy configured url.

[11/7/2022, 3:35:05 PM] ERROR: Common => Error in Channel Backup for xxxxx: connect ECONNREFUSED ::1:8080

[11/7/2022, 3:35:05 PM] ERROR: GetInfo => Get Info Error: {"name":"RequestError","message":"Error: connect ECONNREFUSED ::1:8080","cause":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"::1","port":8080},"error":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"::1","port":8080},"options":{"url":"https://localhost:8080/v1/getinfo","rejectUnauthorized":false,"json":true,"headers":{},"method":"GET","qs":{},"simple":true,"resolveWithFullResponse":false,"transform2xxOnly":false}}
```
Here is a link to an issue on the RTL GitHub describing the same problem with this change posted as the solution
Ride-The-Lightning/RTL#1120

Here is a link to an issue I created in the LND GitHub trying to troubleshoot it before I figured it out.
lightningnetwork/lnd#7125
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants