Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightningd: SQLITE version mismatch: compiled 3031001, now 3037002 - after ubuntu upgrade fm 20.04 to 22.04 #6088

Closed
NVG2021 opened this issue Mar 12, 2023 · 28 comments

Comments

@NVG2021
Copy link

NVG2021 commented Mar 12, 2023

Issue and Steps to Reproduce

As the title says, I've upgraded Ubuntu to the newest version and my c-lightning node does not boot and provides the SQLite mismatch version

I've seen that I have to recompile... but no idea what command/s should I use to perform this and if I may have to do a previous back-up just in case-....

Many thanks before hand
Nicolas

getinfo output

@vincenzopalazzo
Copy link
Contributor

Or you try the new binary that you find inside the release page regarding your version of ubuntu, or if it is not supported with the binary you need to compile from source

@vincenzopalazzo vincenzopalazzo self-assigned this Mar 13, 2023
@vincenzopalazzo vincenzopalazzo added this to the v23.05 milestone Mar 13, 2023
@NVG2021
Copy link
Author

NVG2021 commented Mar 13, 2023

Hi Vincenzo, many thanks for your reply and just wanted to say the following:
I've been able to navigate trhough the directories and my Lightning versionis
"The long wait is over: the c-lightning team is excited to announce the 0.6 release of [c-lightning][clightning]"
and I've installed in August 21...
My memory does not stand how I did things since then.... so ... I may need a more detaild help if possible on what commands should I perform... I know you are a pro, but not myself...

Thank you

@vincenzopalazzo
Copy link
Contributor

Mh, ok so what version of ubuntu are you running?

@rustyrussell
Copy link
Contributor

It depends how you installed CLN in the first place :(

  1. Where is CLN? Try which lightningd.
  2. If it's in /usr/local/bin, then you can simply install the new one over the top:
    1. Grab https://github.com/ElementsProject/lightning/releases/download/v23.02/clightning-v23.02-Ubuntu-22.04.tar.xz into /tmp/
    2. cd / && sudo tar xfa /tmp/clightning-v23.02-Ubuntu-22.04.tar.xz
  3. If it's in /usr/bin or something, you might have installed the old PPA? In that case:
    1. Try dpkg -S $(which lightningd) and it will tell you the package name, and uninstall it with sudo apt-get remove PKGNAME.
    2. download and install as above.
      Hope that helps!

@NVG2021
Copy link
Author

NVG2021 commented Mar 14, 2023 via email

@NVG2021
Copy link
Author

NVG2021 commented Mar 14, 2023 via email

@NVG2021
Copy link
Author

NVG2021 commented Mar 15, 2023 via email

@vincenzopalazzo
Copy link
Contributor

This is the core of the problem now! looks like that there are two fetchinvoice plugin?

2023-03-15T18:37:35.243Z UNUSUAL plugin-fetchinvoice: Killing plugin: could not register hook 'onion_message_blinded', either the name doesn't exist or another plugin already registered it.
2023-03-15T18:37:35.262Z **BROKEN** plugin-fetchinvoice: Plugin marked as important, shutting down lightningd!
lightningd: lightningd/plugin.c:1808: plugins_init: Assertion `ret == plugins' failed.

I think while you are coping and pasting the following operation something when wrong

I’ve copied lightningd & lightning-hsmtool to /usr/local/bin

Now the suggestion that I can give you here is before clean up your /user/local/bin is to do the following steps

cd /tmp
mkdir lightning && cd lightning
wget https://github.com/ElementsProject/lightning/releases/download/v23.02.2/clightning-v23.02.2-Ubuntu-22.04.tar.xz
tar -czvf clightning-v23.02-Ubuntu-22.04.tar.xz  .
cd lightning
rm clightning-v23.02-Ubuntu-22.04.tar.xz
ls -la
./lightningd

This should run lightning in a new home (/tmp) and in this way we see if the error of the SQL db go away, and we can try to clean up you ppa later

P.S: Please note that my bash commands can be wrong in the sense that typos are always around, so do not just copy and paste them :)

@NVG2021
Copy link
Author

NVG2021 commented Mar 17, 2023 via email

@vincenzopalazzo
Copy link
Contributor

You need to unzip clightning-v23.02.2-Ubuntu-22.04.tar.xz’ (better if you use google to unzip tar.xz with ubuntu.

Then you go inside the directory and run run the lightnind with a ./lightningd

@NVG2021
Copy link
Author

NVG2021 commented Mar 17, 2023 via email

@vincenzopalazzo
Copy link
Contributor

Ok now the error is this one

2023-03-17T20:01:20.769Z UNUSUAL plugin-fetchinvoice: Killing plugin: could not register hook 'onion_message_blinded', either the name doesn't exist or another plugin already registered it.
2023-03-17T20:01:20.770Z **BROKEN** plugin-fetchinvoice: Plugin marked as important, shutting down lightningd!
lightningd: lightningd/plugin.c:1808: plugins_init: Assertion `ret == plugins' failed.
lightningd: FATAL SIGNAL 6 (version 23.02)

Can you post also your configuration file?

@NVG2021
Copy link
Author

NVG2021 commented Mar 17, 2023 via email

@NVG2021
Copy link
Author

NVG2021 commented Mar 18, 2023 via email

@vincenzopalazzo
Copy link
Contributor

This is an error related to your local env, that you can solve with some experimentation by checking your path I think?

***@***.***:/tmp/lightning/usr/bin$ lightningd --plugin=/home/nicolas/c-lightning-REST/plugin.js --rest-port=3002
lightningd: --plugin: Failed to register /home/nicolas/c-lightning-REST/plugin.js: Invalid argument

When all the path mistake are gone, you will see if the db error still persist or not, if yes please report the stack trace and the steps that you did

@NVG2021
Copy link
Author

NVG2021 commented Mar 18, 2023 via email

@ShahanaFarooqui
Copy link
Collaborator

@NVG2021 Can you try running lightningd without c-lightning-REST plugin first? Remember to comment rest options in your config as well:

plugin=/home/nicolas/c-lightning-REST/plugin.js rest-port=3001 rest-docport=4001 rest-protocol=https

It will help us to separate point of failures. If your lightningd works without rest, then we can fix c-lightning-REST error with https://github.com/Ride-The-Lightning/c-lightning-REST/issues/165 and combine them together afterwards.

@ShahanaFarooqui ShahanaFarooqui modified the milestones: v23.05, v23.08 Apr 5, 2023
@NVG2021
Copy link
Author

NVG2021 commented Apr 7, 2023 via email

@rustyrussell
Copy link
Contributor

OK, try this:

cd / && sudo tar xvfa /tmp/lightning/clightning-v23.02.2-Ubuntu-22.04.tar.xz
rm -f /usr/local/bin/lightningd

That will install cln v23.02.2 on your system, into /usr/bin where it normally is, and all the plugins, and undo the version you put in /usr/local/bin.

@NVG2021
Copy link
Author

NVG2021 commented Apr 14, 2023 via email

@ShahanaFarooqui
Copy link
Collaborator

Please run it as lightningd --database-upgrade=true but note that it will irreversibly upgrade your db from version 176 to 216.

@ShahanaFarooqui
Copy link
Collaborator

ShahanaFarooqui commented Apr 14, 2023

I would also recommend commenting out the lightning-qt plugin configuration for now to reduce the potential for failure. You can add it back once lightningd starts working.

@NVG2021
Copy link
Author

NVG2021 commented Apr 14, 2023 via email

@ShahanaFarooqui
Copy link
Collaborator

Commenting out plugin's configuration? It is okay because it will allow us to debug one issue at a time. Once we will fix lightningd issue, we can again un-comment qt configurations and can debug that plugin afterwards. Right now, we do not know if the issue is coming from lightningd or lightning-qt.

@NVG2021
Copy link
Author

NVG2021 commented Apr 14, 2023 via email

@ShahanaFarooqui
Copy link
Collaborator

Can you try after removing lightning-qt from your /home/nicolas/.lightning/plugins folder. It looks like either it is an older version which is incompatible with newer lightningd or the plugin is unable to resolve it's dependencies.

@NVG2021
Copy link
Author

NVG2021 commented Apr 15, 2023 via email

@ShahanaFarooqui
Copy link
Collaborator

Closing the issue now as it is resolved. Please feel free to comment if needed.

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

No branches or pull requests

5 participants
@rustyrussell @vincenzopalazzo @ShahanaFarooqui @NVG2021 and others