Pages:
Author

Topic: [Guide] FULL NODE OpenSUSE 15.3: bitcoind + electrs + c-lightning + RTL - page 3. (Read 2117 times)

legendary
Activity: 1932
Merit: 1273
What is your Cargo version?
Code:
cargo 1.48.0 (65cbdd2dc 2020-10-14)

Yea it's the older unsupported version.

It's weird because CLN plugin didn't update its Rust edition since 0.10.2. How did you install Rust and Cargo?

For the issue, simply upgrading the cargo version should suffice. You either update it from the package manager(if your package repository has min cargo v 1.56.0) or simply change/use the Rust installation method using Rustup

https://www.rust-lang.org/tools/install
Code:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
What is your Cargo version?
Code:
cargo 1.48.0 (65cbdd2dc 2020-10-14)
legendary
Activity: 1932
Merit: 1273
Code:
Caused by:
  failed to parse the `edition` key

Caused by:
  this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.
make: *** [plugins/Makefile:194: target/debug/cln-grpc] Error 101
rm external/arm-linux-gnueabihf/libwally-core-build/src/secp256k1/libsecp256k1.la

What is your Cargo version?

Code:
cargo --version
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
I'm trying to upgrade from v0.10.2 to v0.11.2, and there must be something wrong with either my machine or this installation. I have renamed my previous lightning directory to lightning2, and I'm git-ing the new version. I do the git checkout, run the ./configure, make with make -j $(nproc), add the safe directories (lightning & lightning/external/libwally-core), but once I run sudo make install, this happens:

Code:
[...]
cc plugins/spender/openchannel.c
ld plugins/spenderp
cargo build --quiet --bin cln-grpc
error: failed to parse manifest at `/home/bitcoin/lightning/cln-rpc/Cargo.toml`

Caused by:
  failed to parse the `edition` key

Caused by:
  this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions.
make: *** [plugins/Makefile:194: target/debug/cln-grpc] Error 101
rm external/arm-linux-gnueabihf/libwally-core-build/src/secp256k1/libsecp256k1.la

Should I open a Github issue, or has it happened to you before, and you know how it can be resolved?
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
Changelog:

29.11.2021: Update guide for electrs 0.9.3 and c-lightning 0.10.2
30.01.2022: Add RTL install instructions
17.07.2022: Update guide -- all latest versions! Bitcoin Core v23.0, electrs 0.9.8, c-lightning 0.11.2 and RTL v0.12.3.
22.08.2022: Update guide -- all latest versions! Bitcoin Core v23.0, electrs 0.9.9, Core Lightning v0.11.2 and RTL v0.13.0.
Updated again! Pretty excited about this one, since RTL v0.13.0 now has a pretty cool GUI for creating and finding Liquidity Ads.

hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
Changelog:

29.11.2021: Update guide for electrs 0.9.3 and c-lightning 0.10.2
30.01.2022: Add RTL install instructions
17.07.2022: Update guide -- all latest versions! Bitcoin Core v23.0, electrs 0.9.8, c-lightning 0.11.2 and RTL v0.12.3.
Little bump for this guide. It's now all up-to-date again, with the latest version of every single piece of software.
I did walk through it in a VM, but can't start up most programs since they require Bitcoin Core to be up and running and fully synced, for which I don't have the space in the VM. But if someone's got a problem, I'll install it pruned, and debug it of course.. Smiley
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
Little bump / PSA in case anyone is running this config / openSUSE node like me.

Since I chose to use Tor for the 'user facing' connections to the node, and because of the recent Tor vulnerability TROVE-2022-001 / CVE-2021-38385, you may experience issues connecting to your Electrum or C-Lightning interface.

It's easy to fix since openSUSE already has the package for latest stable release 0.4.7.8 ready and will install it by just doing a quick zypper update!

This will get you right back on track.
Code:
sudo zypper update
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
~ snip ~
Just curious, wouldn't that config has no effect since the default torrc configuration isn't technically enabled your node as a Tor exit relay and by default Tor already rejects it as a default config? or is there something to do with running the hidden service?
If that's the default config, then I reckon it's not needed. But better to have it than not; maybe default value will change in the future, so specifying it directly isn't a bad idea in general.
Creating a hidden service shouldn't set you up as an exit node, if that's not the default.
legendary
Activity: 1932
Merit: 1273
Would like to make a suggestion regarding Tor configuration.
It's just a bit for improved privacy which is to uncomment the following line in /etc/tor/torrc

Code:
ExitPolicy reject *:*
~

Thanks, but I did include it exactly because of this already!
[6] Add the following contents, preferably in the right section (somewhere where there's HiddenServiceDir stuff commented out).
Code:
HiddenServiceDir /var/lib/tor/electrs_hidden_service/
HiddenServiceVersion 3
HiddenServicePort 50001 127.0.0.1:50001

ExitPolicy reject *:* # no exits allowed
Just curious, wouldn't that config has no effect since the default torrc configuration isn't technically enabled your node as a Tor exit relay and by default Tor already rejects it as a default config? or is there something to do with running the hidden service?

legendary
Activity: 3122
Merit: 7618
🔐Icarus CEO💳
as you have already seen and read here👉https://bitcointalksearch.org/topic/m.59271490, i have installed 2 rpi 4 in my triton case ... on the one runs the umbrel full node and what should be operated on the second rpi 4, i am still undecided and would like to read from you a few suggestions and opinions...
what would be in mind that i already run 2 full nodes on the second rpi 4 useful to install and start?

since in the actual thread still no one has reacted to my post, i quote my message and post it here in the higher-frequented thread with the hope to still get good suggestions Wink
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
Thanks to n0nce who helped me in PMs! I now have my Lightning node working with RTL!
Just 1 thing to point out here for other readers: there was no issue with the guide; it should still be possible to follow it line by line and get everything working without problem.
In BlackHatCoiner's case it was simply stuff like permissions and group memberships which were different due to him running Debian instead of OpenSUSE and in general only having followed parts of the guide opposed to the whole thing; so some tweaks had to be made here and there.
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Thanks to n0nce who helped me in PMs! I now have my Lightning node working with RTL!
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Code:
sudo journalctl -f -u c-lightning-REST

Code:
bitcoin@raspibolt:~ $ sudo journalctl -f -u c-lightning-REST
-- Logs begin at Thu 2022-02-17 08:53:44 GMT. --
Feb 18 12:28:01 raspibolt node[2838]:     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
Feb 18 12:28:01 raspibolt node[2838]:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
Feb 18 12:28:01 raspibolt node[2838]:   errno: -111,
Feb 18 12:28:01 raspibolt node[2838]:   code: 'ECONNREFUSED',
Feb 18 12:28:01 raspibolt node[2838]:   syscall: 'connect',
Feb 18 12:28:01 raspibolt node[2838]:   address: '/home/bitcoin/.lightning/bitcoin/lightning-rpc'
Feb 18 12:28:01 raspibolt node[2838]: }
Feb 18 12:28:01 raspibolt node[2838]: Node.js v17.5.0
Feb 18 12:28:01 raspibolt systemd[1]: c-lightning-REST.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 12:28:01 raspibolt systemd[1]: c-lightning-REST.service: Failed with result 'exit-code'.
Feb 18 12:28:31 raspibolt systemd[1]: c-lightning-REST.service: Service RestartSec=30s expired, scheduling restart.
Feb 18 12:28:31 raspibolt systemd[1]: c-lightning-REST.service: Scheduled restart job, restart counter is at 7937.
Feb 18 12:28:31 raspibolt systemd[1]: Stopped c-lightning-REST daemon.
Feb 18 12:28:31 raspibolt systemd[1]: Started c-lightning-REST daemon.
Feb 18 12:28:31 raspibolt node[2879]: Reading config file
Feb 18 12:28:31 raspibolt node[2879]: WARN: /home/bitcoin/.lightning/lightning-rpc is missing, using the bitcoin mainnet subdirectory at /home/bitcoin/.lightning/bitcoin instead. error
Feb 18 12:28:32 raspibolt node[2879]: --- Starting the cl-rest server --- warn
Feb 18 12:28:33 raspibolt node[2879]: --- cl-rest api server is ready and listening on port: 3001 --- warn
Feb 18 12:28:33 raspibolt node[2879]: --- cl-rest doc server is ready and listening on port: 4001 --- warn
Feb 18 12:28:33 raspibolt node[2879]: Lightning client connection error error
Feb 18 12:28:33 raspibolt node[2879]: node:events:504
Feb 18 12:28:33 raspibolt node[2879]:       throw er; // Unhandled 'error' event
Feb 18 12:28:33 raspibolt node[2879]:       ^
Feb 18 12:28:33 raspibolt node[2879]: Error: connect ECONNREFUSED /home/bitcoin/.lightning/bitcoin/lightning-rpc
Feb 18 12:28:33 raspibolt node[2879]:     at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
Feb 18 12:28:33 raspibolt node[2879]: Emitted 'error' event on LightningClient instance at:
Feb 18 12:28:33 raspibolt node[2879]:     at Socket. (/home/bitcoin/c-lightning-REST/lightning-client-js.js:77:23)
Feb 18 12:28:33 raspibolt node[2879]:     at Socket.emit (node:events:526:28)
Feb 18 12:28:33 raspibolt node[2879]:     at emitErrorNT (node:internal/streams/destroy:164:8)
Feb 18 12:28:33 raspibolt node[2879]:     at emitErrorCloseNT (node:internal/streams/destroy:129:3)
Feb 18 12:28:33 raspibolt node[2879]:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
Feb 18 12:28:33 raspibolt node[2879]:   errno: -111,
Feb 18 12:28:33 raspibolt node[2879]:   code: 'ECONNREFUSED',
Feb 18 12:28:33 raspibolt node[2879]:   syscall: 'connect',
Feb 18 12:28:33 raspibolt node[2879]:   address: '/home/bitcoin/.lightning/bitcoin/lightning-rpc'
Feb 18 12:28:33 raspibolt node[2879]: }
Feb 18 12:28:33 raspibolt node[2879]: Node.js v17.5.0
Feb 18 12:28:33 raspibolt systemd[1]: c-lightning-REST.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 12:28:33 raspibolt systemd[1]: c-lightning-REST.service: Failed with result 'exit-code'.
legendary
Activity: 1932
Merit: 1273
Lightning dislikes me. Does anybody know why am I getting this when I start the RTL service?


I don't have OpenSUSE, but Raspbian. I've installed nodejs, cloned c-lightning-REST.git, installed it with npm, created both sample-cl-rest-config.json and cl-rest-config.json, edited the c-lightning-REST.service accordingly and started it.
Use below command to shows a better log about it:

Code:
sudo journalctl -f -u c-lightning-REST
legendary
Activity: 1344
Merit: 6415
Farewell, Leo
Lightning dislikes me. Does anybody know why am I getting this when I start the RTL service?


I don't have OpenSUSE, but Raspbian. I've installed nodejs, cloned c-lightning-REST.git, installed it with npm, created both sample-cl-rest-config.json and cl-rest-config.json, edited the c-lightning-REST.service accordingly and started it.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
I should mention that With the exception of CentOS and Red Hat, Linux filesystems are prone to corruption on power failure so you will probably want to configure fsck(8 ) to run at evrey boot so that you do not get "Read-Only Filesystem" errors which will prevent you from writing to any of your mounted filesystems. In particular, it will prevent Bitcoin Core from running.

You can actually configure it to run from GRUB's config file:

1. Edit the /etc/default/grub file on Debian/Ubuntu. CentOS/RHEL/Fedora/Rocky/Alma Linux user edit the /etc/sysconfig/grub file.
2. Find line that read as GRUB_CMDLINE_LINUX_DEFAULT and append the fsck.mode=force. You may have other config options. Just add it between the quote marks. For example:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.mode=force"
[do not remove anything else from the string, just add fsck.mode=force at the end of the string]

3. To force all auto repair option including that may cause damage add the fsck.repair=yes option too.
4. Then run an sudo update-grub.

OpenSuse Leap uses btrfs filesystem which should also work with these instructions despite being written for ext4. That's because fsck will automatically call the correct command for the filesystem.
hero member
Activity: 1176
Merit: 647
I rather die on my feet than to live on my knees
Code:
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1

I know about this but still, I had problems with Tor, and after adding my user name to debian-tor, the problem was fixed!
legendary
Activity: 2842
Merit: 7333
Crypto Swap Exchange
Are there any good reason/advantage by adding your username to tor group? Personally i almost never see any guide doing it and when they do, there's no detailed explanation.
At least in some Debian based distros, if your username is not in this group, the hidden service cannot read the AuthCookieFile. It happened to me and at least to @BlackHatCoiner. We fixedd his Tor issues by only adding his user to debian-tor group.

Thanks for the info. I also checked cookie file on my debian virtual machine and the debian-tor appear as both owner/group of the cookie file with 640 permission.
hero member
Activity: 882
Merit: 5814
not your keys, not your coins!
So, I checked my node again.
It's not needed with my guide, since I simply don't use CookieAuthentication.

Instead, I have these more compact, readable 3-liners for each service. In my opinion easier to understand what's going on, modify if needed and less modifications to the system.
[2] Create another Tor hidden service for C-Lightning. Similar procedure as before.
Code:
sudo nano /etc/tor/torrc

[3] Below the other hidden service, add this info for Lightning.
Code:
HiddenServiceDir /var/lib/tor/lightningd_hidden_service/
HiddenServiceVersion 3
HiddenServicePort 9735 127.0.0.1:9735

The official C-Lightning guide would have you do:
Code:
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1

You also need to make your user a member of the Tor group.

If it's somehow possible to avoid opening any type of port and changing any types of permissions, I usually avoid it. Wink
hero member
Activity: 1176
Merit: 647
I rather die on my feet than to live on my knees
One other step I can't see is adding the username to tor group. At least in Debiana based distros, it's usually needed!
Something like
usermod -a -G myUserName debian-tor

I didn't see this step. Hope I didn't miss it!

Are there any good reason/advantage by adding your username to tor group? Personally i almost never see any guide doing it and when they do, there's no detailed explanation.
At least in some Debian based distros, if your username is not in this group, the hidden service cannot read the AuthCookieFile. It happened to me and at least to @BlackHatCoiner. We fixedd his Tor issues by only adding his user to debian-tor group.
Pages:
Jump to: