lightningd / plugins

Community curated plugins for core-lightning
BSD 3-Clause "New" or "Revised" License
269 stars 129 forks source link

Backup plugin not working? #464

Closed inpharmaticist closed 1 year ago

inpharmaticist commented 1 year ago

I installed poetry, initialized the plugin, and added important-plugin=/path/to/backup.py to the config file. When restarting lightingd I get the following:

Traceback (most recent call last): File "\", line 2, in from pyln.client import Plugin ModuleNotFoundError: No module named 'pyln' 2023-07-13T05:16:27.644Z INFO plugin-backup.py: Killing plugin: exited before replying to getmanifest 2023-07-13T05:16:27.644Z BROKEN plugin-backup.py: Plugin marked as important, shutting down lightningd! lightningd: lightningd/plugin.c:1875: plugins_init: Assertion `ret == plugins' failed. lightningd: FATAL SIGNAL 6 (version v23.05-127-gea7d428) 0x55fca3f9c52b send_backtrace common/daemon.c:33 0x55fca3f9c5c2 crashdump common/daemon.c:75 0x7fbb95e4251f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x7fbb95e96a7c pthread_kill_implementation ./nptl/pthread_kill.c:44 0x7fbb95e96a7c __pthread_kill_internal ./nptl/pthread_kill.c:78 0x7fbb95e96a7c GI_pthread_kill ./nptl/pthread_kill.c:89 0x7fbb95e42475 __GI_raise ../sysdeps/posix/raise.c:26 0x7fbb95e287f2 GI_abort ./stdlib/abort.c:79 0x7fbb95e2871a assert_fail_base ./assert/assert.c:92 0x7fbb95e39e95 GI_assert_fail ./assert/assert.c:101 0x55fca3f76f1b plugins_init lightningd/plugin.c:1875 0x55fca3f53daa main lightningd/lightningd.c:1010 0x7fbb95e29d8f libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7fbb95e29e3f __libc_start_main_impl ../csu/libc-start.c:392 0x55fca3f33d04 ??? ???:0 0xffffffffffffffff ??? ???:0 Aborted (core dumped)

Running on Pop!_OS 22.04 (ubuntu 22.04).

cdecker commented 1 year ago

It is missing the pyln-client dependency. Likely this is because poetry installed the dependencies in a virtualenv that then isn't being used when running it through CLN.

Either adjust $PATH to include the virtualenv python3, or install pyln-client into the environment that is being used by CLN.

inpharmaticist commented 1 year ago

Thanks, I installed that plus several others as they came up. Now I'm getting Invalid async_mode specified.

inpharmaticist commented 1 year ago

Looks like I had to add from engineio.async_drivers import gevent to engineio/server.py.