Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bug: network doesn't start #722

Closed
philosopher-phaedrus opened this issue May 21, 2023 · 9 comments
Closed

Bug: network doesn't start #722

philosopher-phaedrus opened this issue May 21, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@philosopher-phaedrus
Copy link

Describe the bug
Can't start the default network with single bitcoind and c-ln, lnd, eclair.

To Reproduce

  1. Start polar
  2. Create default network
  3. Start the network

Expected behavior
Bitcoind and 3 LN nodes running, but instead it fails. I see:

21:28:10.385 › AppIpcListener: send error "app-http-response-429043030427" {
  "errno": -111,
  "code": "ECONNREFUSED",
  "syscall": "connect",
  "address": "127.0.0.1",
  "port": 8283
}
21:28:10.394 › LndProxyServer: received request "lnd-list-peers-request" [
  {
    "node": {
      "id": 0,
      "networkId": 2,
      "name": "alice",
      "type": "lightning",
      "implementation": "LND",
      "version": "0.16.0-beta",
      "status": 0,
      "backendName": "backend1",
      "paths": {
        "tlsCert": "/root/.polar/networks/2/volumes/lnd/alice/tls.cert",
        "adminMacaroon": "/root/.polar/networks/2/volumes/lnd/alice/data/chain/bitcoin/regtest/admin.macaroon",
        "invoiceMacaroon": "/root/.polar/networks/2/volumes/lnd/alice/data/chain/bitcoin/regtest/invoice.macaroon",
        "readonlyMacaroon": "/root/.polar/networks/2/volumes/lnd/alice/data/chain/bitcoin/regtest/readonly.macaroon"
      },
      "ports": {
        "rest": 8081,
        "grpc": 10001,
        "p2p": 9735
      },
      "docker": {
        "image": "",
        "command": ""
      }
    },
    "replyTo": "lnd-list-peers-response-1325335891265"
  }
]
21:28:10.396 › LndProxyServer: send error "lnd-list-peers-response-1325335891265" {
  "errno": -2,
  "code": "ENOENT",
  "syscall": "open",
  "path": "/root/.polar/networks/2/volumes/lnd/alice/tls.cert"
}

The folder /root/.polar/networks/2/volumes/lnd/alice exists, but the tls.cert file is not there.

The UI is showing error as well:

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: fedora 37
  • Polar Version: 1.4.1
  • Docker Version: 24.0.1
  • Docker Compose Version: 1.29.2

Additional context
Add any other context about the problem here.

@philosopher-phaedrus philosopher-phaedrus added the bug Something isn't working label May 21, 2023
@jamaljsr
Copy link
Owner

Can you right-click on alice and click View Logs to see the LND logs. This will likely give more info as to why it is not starting up and generating the TLS cert.

@philosopher-phaedrus
Copy link
Author

backend1 (Bitcoind) says in the UI: Unable to connect to bitcoin node connect ECONNREFUSED 127.0.0.1:18443

alice (lnd) log:

Search

0 matches
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)
useradd: UID 0 is not unique
adding user lnd (0:0)

@philosopher-phaedrus
Copy link
Author

Can't open bitcoind logs (UI window opens up but the logs never load)

# docker ps
CONTAINER ID   IMAGE                               COMMAND                  CREATED         STATUS                          PORTS     NAMES
575dabe0c9ab   polarlightning/lnd:0.16.0-beta      "/entrypoint.sh lnd …"   8 minutes ago   Restarting (4) 21 seconds ago             polar-n2-alice
7f95f7a69f5b   polarlightning/eclair:0.8.0         "/entrypoint.sh pola…"   8 minutes ago   Restarting (4) 1 second ago               polar-n2-carol
09770f942b9b   polarlightning/clightning:23.02.2   "/entrypoint.sh ligh…"   8 minutes ago   Restarting (4) 1 second ago               polar-n2-bob
a20544adb002   polarlightning/lnd:0.16.0-beta      "/entrypoint.sh lnd …"   14 hours ago    Restarting (4) 27 seconds ago             polar-n1-alice

Is it expected that there isn't a docker container for bitcoind?

@philosopher-phaedrus
Copy link
Author

Also, I'm running this on Fedora running as Qubes OS vm, but I got Polar running on Qubes OS Fedora before without any problems.

@jamaljsr
Copy link
Owner

Are you logged in as root on this machine? It appears that way based on the 0:0 userid. I think this is the issue.

Can you try temporarily logging in as a different user and running Polar, just to confirm that this is what's causing the issue.

@philosopher-phaedrus
Copy link
Author

I'm logged in as regular user, but need to start Polar with sudo, because of Docker running as root (otherwise Polar doesn't detect Docker). See #553

I guess I can try to reconfigure Docker to run as regular user.

@philosopher-phaedrus
Copy link
Author

Alright, I'm good, it's working.

I didn't need to change docker to run as user. Instead, just adding my user into the docker group enabled running polar without sudo:

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker  ## refresh the changes

Now bitcoind and lnd starts fine. Thank you @jamaljsr

@philosopher-phaedrus
Copy link
Author

I'm closing this, since it's nothing to be fixed in Polar. Maybe change the error when Docker is not detected into something like "Install docker and make sure the user running Polar is in docker group".

@jamaljsr
Copy link
Owner

Awesome! Glad to hear its working now. Thanks for the suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants