lightninglabs / lightning-terminal

Lightning Terminal: Your Home for Lightning Liquidity
MIT License
506 stars 90 forks source link

error "regtest is a directory" #512

Open gunar opened 1 year ago

gunar commented 1 year ago

Can't run litd.

Expected behavior

Running litd --uipassword=mylongpassword --network=regtest --autopilot.disable should start litd.

Actual behavior

2023-03-06 18:23:17.060 [INF] LITD: LiT version: 0.8.6-alpha commit=v0.8.6-alpha
2023-03-06 18:23:17.070 [INF] SESS: Checking for schema update: latest_version=0, db_version=0
2023-03-06 18:23:17.071 [INF] LITD: Dialing lnd gRPC server at localhost:10009
2023-03-06 18:23:17.072 [INF] LITD: Listening for http_tls on: [::]:8433
2023-03-06 18:23:17.072 [INF] SGNL: Received shutdown request.
error displaying startup info: error querying remote node: read /root/.lnd/data/chain/bitcoin/regtest: is a directory
2023-03-06 18:23:17.072 [INF] SGNL: Shutting down...

To reproduce

  1. Install v0.8.6-alpha on docker image lightninglabs/lnd:v0.15.3-beta
  2. Run above

System information

Are you using Lightning Terminal as a standalone application or as part of Umbrel?

Running stand alone.

What mode are you running Lightning Terminal in? Specifically of interest are the values of 'lnd-mode', 'faraday-mode', 'loop-mode' and 'pool-mode'.

I just want lnd but it doesn't work in either mode.

What version of Lightning Terminal are you using, where did you get it (website, self-compiled, etc)?

v0.8.6-alpha

What type of machine are you observing the error on (OS/CPU and disk type)?

This docker image: lightninglabs/lnd:v0.15.3-beta

gunar commented 1 year ago

I'm able to get past that error message with this command:

$ litd --uipassword=mylongpassword --network=regtest --httpslisten=0.0.0.0:8433 --autopilot.disable --lnd-mode=remote --remote.lnd.rpcserver=localhost:10009 --remote.lnd.macaroonpath=/root/.lnd/data/chain/bitcoin/regtest/admin.macaroon

I wonder why the default remote.lnd.macaroonpath isn't set to ~/.lnd...?

Anyway, now I'm getting this error message:

[ERR] LITD: Could not start subservers: no swap server address specified
guggero commented 1 year ago

Thanks for the report! The error error querying remote node: read /root/.lnd/data/chain/bitcoin/regtest: is a directory is an actual bug, we need to fix that.

Unfortunately there is no easy way to get full Lightning Terminal functionality on regtest. Both the Loop and Pool subsystems need to connect to their server counterpart, which there are none running by default. You can run your own regtest Loop server (see https://github.com/lightninglabs/loop/tree/master/regtest), but the equivalent for Pool isn't public (yet?). A common workaround is to just set the --loop.server.host and --pool.auctionserver= to the public testnet servers (see https://github.com/lightninglabs/loop/blob/master/loopd/config.go#L163 and https://github.com/lightninglabs/pool/blob/master/config.go#L188). You'll also need to set --autopilot.disable if you run the latest version.

guggero commented 1 year ago

The actual bug is here: https://github.com/lightninglabs/lightning-terminal/blob/master/config.go#L659. Because the AdminMacPath of the default lnd config is empty, this doesn't add the filename to the path, which results in the error shown. I'll create a fix when I have some spare time.