Skip to content

LND will not create path specified by --tlscertpath #4572

Closed

Description

@cilphex

Background

If you specify a custom path for the tls.cert that is generated by lnd on startup, lnd expects the path (minus the tls.cert file) to already exist. It seems more intuitive that the expected behavior be that lnd creates the full path to the file.

For example, if you specify:

--tlscertpath=/cert/tlscert.cert

And if /cert does not already exist, then you will get this error:

unable to load TLS credentials: open /cert/tls.cert: no such file or directory

But if you mkdir /cert first, then run lnd with --tlscertpath=/cert/tlscert.cert, it will work.

Your environment

  • version of lnd

v0.11.0-beta

  • which operating system (uname -a on *Nix)

golang:1.13-alpine

  • version of btcd, bitcoind, or other backend

N/A

  • any other relevant environment details

N/A

Steps to reproduce

Run lnd and pass --tlscertpath=<some_path>, where <some_path> is a path that includes at least one directory that does not already exist.

Expected behaviour

It should work and lnd should generate a tls.cert file at the specified location.

Actual behaviour

lnd fails with an error like:

unable to load TLS credentials: open /cert/tls.cert: no such file or directory

Activity

  1. Roasbeef commented on Sep 1, 2020

    @Roasbeef
    Member

    Are you also setting an lnddir flag?

  2. added
    config
    on Sep 1, 2020
  3. cilphex commented on Sep 3, 2020

    @cilphex
    ContributorAuthor

    Are you also setting an lnddir flag?

    I recently changed to this method, but in the setup where i was experiencing the error, i was setting --datadir, --logdir, --tlscertpath and --tlskeypath all separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

configtls

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions