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

Upgrading Electrs to 0.10.0-rc.1 #1305

Closed
luksocculta opened this issue Jun 25, 2023 · 14 comments
Closed

Upgrading Electrs to 0.10.0-rc.1 #1305

luksocculta opened this issue Jun 25, 2023 · 14 comments
Labels
stale support Help, I'm stuck somehow

Comments

@luksocculta
Copy link

Describe the issue

After command cargo clean there is error:
error: failed to parse manifest at /home/admin/rust/electrs/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.

Location in guide

Link to the corresponding page and section on https://raspibolt.org

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Hardware platform: Raspberry Pi 4
  • Operating system: Raspberry Pi OS 64bit, Debian 11
  • Version: Description: Debian GNU/Linux 11 (bullseye)

Additional context

Cargo in Bullseye is 0.47.0-3+b1, in Bookworm is 0.66.0+ds1-1. Do we need wait for Raspberry Pi OS upgrade or can we do some manual intervention? For example: curl https://sh.rustup.rs -sSf | sh.

@luksocculta luksocculta added the support Help, I'm stuck somehow label Jun 25, 2023
@luksocculta
Copy link
Author

Ok today i will give a chance and I will change only sources for bookworm. Will see what will happen. I won't do dist-upgrade.

@luksocculta
Copy link
Author

I need to move upgrading for tomorrow as for now I am copying entire blockchain to backup location as don't want to make initial blockchain download again.

@luksocculta
Copy link
Author

i am givin up. i am even unable to make copy of blockchain as i can't stop effectively bitcoind. 'bitcoin-cli stop 'simply doesnt work and bitcoind is starting again automatically.

@kristapsk
Copy link
Collaborator

@luksocculta It's restarted automatically by systemd. Do sudo systemctl disable bitcoind and sudo systemctl stop bitcoind.

@keyser-soeze
Copy link

keyser-soeze commented Jun 29, 2023

you get the cargo error because debian 11 (bullseye) has outdated sources.

instead of installing / using rustup utility, upgrade from bullseye to bookworm:

/etc/apt/sources.list: bullseye > bookworm

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

make sure your manually added sources-list (see files in /etc/apt/sources.list.d/*) is updated to bookworm

/etc/apt/sources.list.d/*: replace bullseye with bookworm

then do a full dist-upgrade to debian 12 (bookworm): sudo apt update && sudo apt upgrade && sudo dist-upgrade

important: during the installation routine you'll be asked a few times if you want to override your existing settings (e.g. nginx configuration or sshd configuration). don't do that ... otherwise you'll get unwanted effects (in the worst case you won't be able to login via ssh anymore). then you have to install the stream module for nginx: sudo apt update && sudo apt install libnginx-mod-stream or you're getting unknown directive "stream" error in when doing nginx daemon status check.

it's not only cargo but you've to upgrade rocksdb as well or you'll get endless loop (no error) while building the electrs binary: sudo apt install librocksdb-dev=7.8.3-2

follow electrs upgrade guide again, starting with cargo clean.

there is no need to stop bitcoin daemon (bitcoind) or copy the entire blockchain before updating electrs.

if you feel uncomfortable better stay on electrs v0.9.14.

@luksocculta
Copy link
Author

Thanks for detailed guide. Right now I am during making similar configuration of my Raspibolt on different machine and there I will test this. I wanted to simply change sources so thanks about that additional necessary steps.

@luksocculta
Copy link
Author

On a test machine something went wrong with nginx.

sudo systemctl status nginx
× nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-06-30 23:06:45 CEST; 34s ago
Docs: man:nginx(8)
Process: 1378 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 22ms

Jun 30 23:06:45 debian-acer systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Jun 30 23:06:45 debian-acer nginx[1378]: 2023/06/30 23:06:45 [emerg] 1378#1378: unknown directive "stream" in /etc/nginx/nginx.conf:10
Jun 30 23:06:45 debian-acer nginx[1378]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 30 23:06:45 debian-acer systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Jun 30 23:06:45 debian-acer systemd[1]: nginx.service: Failed with result 'exit-code'.
Jun 30 23:06:45 debian-acer systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.

But I haven't mimic fully raspibolt configuration as I couldn't perform full blockchain download. But I think that doesn't matter for nginx so right now I dont know what went wrong.

After dist-upgrade I made apt autoremove and then if I good recall was removed something that depends for nginx.

@keyser-soeze
Copy link

my bad. you have to install libnginx-mod-stream: sudo apt update && sudo apt install libnginx-mod-stream.

restart nginx daemon with sudo systemctl restart nginx, you shouldn't get errors anymore.

i've edited my comment.

@luksocculta
Copy link
Author

so i made complete upgrade and everything seems to be ok. and there wasn't need for manual installation of libningx-mod-stream as it was installed during upgrade i think. seems like something went wrong on test machine.
only one moment was thrilling. during upgrading of dphys-swapfile terminal hangsout for more that 5 minutes. maybe more. and during all process of upgrading swap, which has 2GB, was filled to the top . maybe should be doubled for upgrading.

@keyser-soeze
Copy link

one thing i've forgot to mention is the PAM configuration.

in case you've overwritten your configuration while upgrading from bullseyeto bookworm please make sure that you update the settings as described in raspibolt guide - security - increase your open files limit otherwise your raspberry pi might become slow / unresponsive.

@luksocculta
Copy link
Author

i haven't overwritten any of my configuration files. for all of questions about new config files i answered 'N'. so still everything works normal. sure i still struggle with some things on my raspibolt but these are unrelated to upgrading to bookworm.

@luksocculta
Copy link
Author

ots has broke after upgrading. so i did make 'sudo apt reinstall python3 python3-dev python3-pip python3-setuptools python3-wheel' and then 'sudo pip3 install opentimestamps-client --break-system-packages'.
now works fine.

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

This issue is marked as stale because there was no activity for 60 days. If the issue stays inactive, it will be closed in a week.

@github-actions github-actions bot added the stale label Sep 4, 2023
@github-actions
Copy link

This issue has been closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale support Help, I'm stuck somehow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants