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

Unable to connect to local CLN node (can't find location of ca.pem) #53

Open
hdrlab opened this issue Feb 7, 2025 · 5 comments
Open

Comments

@hdrlab
Copy link

hdrlab commented Feb 7, 2025

I just installed the Boltz plugin on my BTCPay Server (v2.0.6), and it's unable to connect to the local CLN node. I get the error:

[FATAL] Could not start Boltz server: could not read CLN root certificate /etc/bitcoin/ca.pem: open /etc/bitcoin/ca.pem: no such file or directory

I've enabled the CLN node's grpc as per this pull request. It is generating ca.pem. However, the Boltz plugin is unable to see it. It's definitely not at the plugin's default location: /etc/bitcoin/ca.pem

As far as I can tell, the btcpayserver container doesn't have access to the CLN container's data files. So, there's no way for the Boltz plugin to access the CLN node's ca.pem.

Is there a configuration step that I'm missing? Or is this an unresolved problem?

@jackstar12
Copy link
Member

The plugin should be able to access the files since it runs within the same container as btcpay itself, which has access to the lightning rpc socket. It reads the path from the internal node connection string, so it should be the correct value, but it doesnt seem like that in this case. I assume that the node is working properly in btcpay?

Please try the following:

  • navigate to the plugin admin page
  • open the Node Config dropdown
  • set the datadir to: /etc/clightning_bitcoin and the host to clightning_bitcoin
  • save

@hdrlab
Copy link
Author

hdrlab commented Feb 10, 2025

I just tried that, and the error message is gone. It now says: "Lightning node not synced yet" followed by "Retrying in 15 seconds"

No idea why it's claiming that the node isn't synced. CLN does seem to crash periodically, but it's running okay right now.

Anyway, that's got nothing to do with the Boltz plugin. Perhaps the default plugin configuration values should be set to the values you gave me. That way it'll "just work."

@hdrlab
Copy link
Author

hdrlab commented Feb 10, 2025

Okay, the node was catching up after the last crash. It's synced now, but I now get the next error:
Could not parse CLN version basedon: Invalid Semantic Version

From getinfo: "version": "basedon-v24.08.2",

Should I file a new bug report for this?

@jackstar12
Copy link
Member

jackstar12 commented Feb 10, 2025

Perhaps the default plugin configuration values should be set to the values you gave me. That way it'll "just work."

For the datadir, that should be the case already. Did you do any manual changes to the connection string of the internal node BTCPAY_BTCLIGHTNING before?
One can't set a host value that will be correct all the times, since its clightning_bitcoin in case of the docker setup, but can be something else in manual deployments aswell. But I think the docker deployments are definetely more common, so we could use that as a default value.

From getinfo: "version": "basedon-v24.08.2",

So it seems like you are running some version of CLN with your own tag. Did you add that basedon to the tag yourself? If so, you could consider removing it for now to fix it. Our version parsing can't handle that currently, but that's an easy fix.

@ksdhans
Copy link

ksdhans commented Feb 10, 2025

For the datadir, that should be the case already. Did you do any manual changes to the connection string of the internal node BTCPAY_BTCLIGHTNING before?

No. It was set to /etc, and the host was set to 127.0.0.1. This is with version 2.1.6 of the Boltz plugin (the current release).

So it seems like you are running some version of CLN with your own tag. Did you add that basedon to the tag yourself? If so, you could consider removing it for now to fix it. Our version parsing can't handle that currently, but that's an easy fix.

I'll respond in the new bug ticket.

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

No branches or pull requests

3 participants