talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia-labs.github.io/talaia.watch/
MIT License
134 stars 63 forks source link

Plugin will not load #247

Closed JWBurgers closed 4 months ago

JWBurgers commented 9 months ago

The watchtower-client will not load. In my Core Lightning log file, I see the following two lines:

"plugin-manager: started(..) path/plugins/watchtower-client" "plugin-watchtower-client: Killing plugin: exited before replying to init"

Any idea why I might be getting this error? I'm attempting to run just the plugin, not the server application. The plugin is run from a custom path and from the same service account as the rest of Core Lightning. I set the TOWERS_DATA_DIR environment variable to the right custom directory, so that the service account can access it (the service acct has no permissions in the home directory).

sr-gi commented 9 months ago

It be useful if you could include what your setup looks like in terms of OS and CLN version so we can try to reproduce this.

Also, if you can walk us trough the steps you went both for installing and adding the plugin to CLN that may help.

JWBurgers commented 8 months ago

Thank you for the response.

System details

CLN installation details

Plugin installation details

The watchtower plugin is acknowledged on startup. But then it is killed a little while later: “plugin-watchtower-client: Killing plugin: exited before replying to init”. I can’t see any data being written to the watchtower data directory. So it looks like it is killed before doing anything.

JWBurgers commented 8 months ago

Been able to isolate the problem after some troubleshooting.

What I tried to solve the problem.

Not sure what could be the problem.

sr-gi commented 8 months ago

Hey @JWBurgers, I'm unable to reproduce this atm given my current setup refuses to install CoreLN.

I'll give this a go as soon as I can fix it, or switch to my old dev setup and report back

JWBurgers commented 8 months ago

Thanks @sr-gi . Will let you know if I successfully troubleshoot it myself.

sr-gi commented 8 months ago

@JWBurgers I've tried to replicate your issue unsuccessfully. If I set the TOWERS_DATA_DIR it does create a folder to the specified location.

I have tried it within the same user though. Would you mind trying to set the ENV within the lightningd directory but on a different path? I want to double-check it's not a permission issue or ENV variable not being available when you try to read it from another user.

sr-gi commented 6 months ago

Any updates on this?

JWBurgers commented 4 months ago

Yes @sr-gi , thank you for your patience.

In the end, I ended up settling on creating a service account for CLN with a home directory included. That way I could just allow all the default paths for binary and data installations. The main motivation was that other CLN plugins would cause similar configuration challenges. So this would just be a very impractical way of managing plugins. With that approach, everything seems to work well.

I was looking into it for the purposes of creating a node-building guide for students. The instructions for the TEOS plugin are found here (https://github.com/JWBurgers/Bitcoin_Server/blob/main/Chapter_17_Backups_liquidity_plugins_and_watchtowers.md#watchtowers).

My guess is that indeed there would have also been an unidentified permission issue somewhere in attempting to set the custom directory. But I was unable to find it.

sr-gi commented 4 months ago

I'll close the issue then, since it seems related to how the plugin system work, and not a teos specific issue. Feel free to reopen if you see fit