Skip to content

could not load config: faradaydir overwrites tlscertpath, please only set one value #1064

Open
@youngzhenhao

Description

@youngzhenhao

I start Litd in the gin service, via the goroutine, using the following codes:

err := terminal.New().Run(context.Background())
var flagErr *flags.Error
isFlagErr := errors.As(err, &flagErr)
if err != nil && (!isFlagErr || flagErr.Type != flags.ErrHelp) {
	_, _ = fmt.Fprintln(os.Stderr, err)
	//os.Exit(1)
	return
}

Everything runs perfectly fine, but when I try to restart Litd after StopDaemon, I get this error:

could not load config: faradaydir overwrites tlscertpath, please only set one value

Some of the logs are as follows:

2025-05-07 15:54:09.229 [INF] RPCS: Stopping RPC Server
2025-05-07 15:54:09.229 [INF] RPCS: Stopping ChainRPC Sub-RPC Server
2025-05-07 15:54:09.229 [INF] RPCS: Stopping InvoicesRPC Sub-RPC Server
2025-05-07 15:54:09.229 [INF] RPCS: Stopping NeutrinoKitRPC Sub-RPC Server
2025-05-07 15:54:09.229 [INF] RPCS: Stopping WalletKitRPC Sub-RPC Server
2025-05-07 15:54:09.229 [INF] RPCS: Stopping WatchtowerRPC Sub-RPC Server
2025-05-07 15:54:09.229 [INF] RPCS: Stopping AutopilotRPC Sub-RPC Server
2025-05-07 15:54:09.230 [INF] RPCS: Stopping PeersRPC Sub-RPC Server
2025-05-07 15:54:09.230 [INF] RPCS: Stopping RouterRPC Sub-RPC Server
2025-05-07 15:54:09.230 [INF] RPCS: Stopping SignRPC Sub-RPC Server
2025-05-07 15:54:09.230 [INF] RPCS: Stopping VersionRPC Sub-RPC Server
2025-05-07 15:54:09.230 [INF] RPCS: Stopping WatchtowerClientRPC Sub-RPC Server
2025-05-07 15:54:09.230 [INF] BTCN: Canceling block subscription: id=1
2025-05-07 15:54:09.280 [INF] BTCN: Block manager shutting down
2025-05-07 15:54:09.330 [INF] BTCN: Address manager shutting down
2025-05-07 15:54:09.333 [INF] LNWL: Stopping web API fee estimator
2025-05-07 15:54:09.346 [INF] LTND: Shutdown complete

2025-05-07 15:54:11.326 [INF] GRPH: Initial zombie prune starting
2025-05-07 15:54:11.326 [INF] GRPH: Examining channel graph for zombie channels
2025-05-07 15:54:11.326 [ERR] GRPH: Unable to prune zombies: unable to get disabled channels ids chans: database not open
[GIN] 2025/05/07 - 15:54:21 | 200 |            0s |       127.0.0.1 | POST     "/api/rest/v1/StartLitd"
2025-05-07 15:54:21.175 [INF] LTND: REST API is disabled!
could not load config: faradaydir overwrites tlscertpath, please only set one value
2025-05-07 15:54:21.176 [INF] LTND: Received shutdown request.
2025-05-07 15:54:21.176 [INF] LTND: Shutting down...
2025-05-07 15:54:21.176 [INF] LTND: Gracefully shutting down.
[GIN] 2025/05/07 - 15:54:23 | 200 |            0s |       127.0.0.1 | POST     "/api/rest/v1/StartLitd"
2025-05-07 15:54:23.515 [INF] LTND: REST API is disabled!
could not load config: faradaydir overwrites tlscertpath, please only set one value
2025-05-07 15:54:23.516 [INF] LTND: Received shutdown request.
2025-05-07 15:54:23.516 [INF] LTND: Shutting down...
2025-05-07 15:54:23.517 [INF] LTND: Gracefully shutting down.
[GIN] 2025/05/07 - 15:54:24 | 200 |            0s |       127.0.0.1 | POST     "/api/rest/v1/StartLitd"
2025-05-07 15:54:24.560 [INF] LTND: REST API is disabled!
could not load config: faradaydir overwrites tlscertpath, please only set one value
2025-05-07 15:54:24.561 [INF] LTND: Received shutdown request.
2025-05-07 15:54:24.561 [INF] LTND: Shutting down...
2025-05-07 15:54:24.561 [INF] LTND: Gracefully shutting down.

It looked like it was caused by faraday , so I configured lit.conf with these:

faraday-mode=disable
#pool-mode=disable
#loop-mode=disable

But there was still error:

could not load config: loopdir overwrites logdir, please only set one value

So I used:

faraday-mode=disable
pool-mode=disable
loop-mode=disable

At this point I can restart Litd normally.

Expected behavior

Restart Litd normally.

Actual behavior

could not load config: xxxdir overwrites tlscertpath, please only set one value

To reproduce

  1. Use go func to start litd.
  2. Then call StopDaemon.
  3. Restart litd via go func.

System information

Windows 11 24H2 26100.3915
lightning-terminal-0.14.1-alpha
lnd-mode=integrated

Logs

lnd.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions