C-Otto / rebalance-lnd

A script that can be used to balance lightning channels of a lnd node
MIT License
343 stars 82 forks source link

FileNotFoundError #304

Closed AsBobbyDigital closed 1 year ago

AsBobbyDigital commented 1 year ago

Hi, I am getting "filenotfounderror" message. I am using BTCpay server.
Do you have any idea how to solve it? Thank you!

Traceback (most recent call last): File "/rebalance-lnd/rebalance.py", line 540, in success = main() File "/rebalance-lnd/rebalance.py", line 326, in main return Rebalance(arguments).start() File "/rebalance-lnd/rebalance.py", line 21, in init self.lnd = Lnd(arguments.lnddir, arguments.grpc, arguments.network) File "/rebalance-lnd/lnd.py", line 32, in init combined_credentials = self.get_credentials(lnd_dir, network) File "/rebalance-lnd/lnd.py", line 46, in get_credentials with open(f"{lnd_dir}/tls.cert", "rb") as f: FileNotFoundError: [Errno 2] No such file or directory: '/root/.lnd/tls.cert'

C-Otto commented 1 year ago

You are starting rebalance-lnd as user root, but lnd is not configured/started for that user. You can specify the path to the lnd directory manually, but I'd recommend not starting the script as root.