Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Picaflor on May 24, 2024, 10:32:45 PM



Title: An unsolicited update broke my Bitcoin Core
Post by: Picaflor on May 24, 2024, 10:32:45 PM
Ubuntu 22.04.4 LTS. I had Bitcoin Core 23.0 if I remember correctly. After months of it running I realized it had stopped working.

It turned out Snap had updated it to 27.0. I downgraded it to 25.2 using Ubuntu Software package manager in the hope it would be less broken, but it's equally broken.

I don't have `bitcoind` or `bitcoin-cli` like I used to. The symlinks point to non-existent files.
However, I do have `bitcoin-core.daemon` and `bitcoin-core.cli`. I created symlinks to them as follows:

Code:
sudo ln -s /snap/bin/bitcoin-core.daemon /usr/local/bin/bitcoind
sudo ln -s /snap/bin/bitcoin-core.cli /usr/local/bin/bitcoin-cli

but when I run `bitcoind`, it gives me output from Snap and not from `bitcoin-core.daemon`.

This is not the main issue, as I can replace `bitcoind` with `bitcoin-core.daemon` in the systemd config file (but it would be handy to fix).

What I'm struggling with is passing the config file to it. When I run:
Code:
/snap/bin/bitcoin-core.daemon -conf=/home/sov/.bitcoin/bitcoin.conf
I get:
Code:
Error: Error reading configuration file: specified config file "/home/sov/.bitcoin/bitcoin.conf" could not be opened.

The file is readable:
Code:
-rw-r--r-- 1 sov sov 617 Aug 22  2023 /home/sov/.bitcoin/bitcoin.conf

 ???


Title: Re: An unsolicited update broke my Bitcoin Core
Post by: achow101 on May 25, 2024, 12:59:35 AM
Snaps have additional sandboxing and isolation implemented, so when you run a snap app, it will generally be unable to access arbitrary locations on the filesystem.

I would suggest just downloading the binary tarball from bitcoincore.org and copying the binaries to your desired target locations.


Title: Re: An unsolicited update broke my Bitcoin Core
Post by: ABCbits on May 25, 2024, 09:53:18 AM
FWIW, it's default Snap behavior which update 4 times a day[1]. Bitcoin Core on Snap already access home by default[2], although it seems to exclude hidden file/folder[3]. You probably can fix this problem by adding personal-files plug/permission to Bitcoin Core[3]. Although i also suggest you to use binary tarball instead.

[1] https://snapcraft.io/docs/managing-updates (https://snapcraft.io/docs/managing-updates)
[2] https://github.com/bitcoin-core/packaging/blob/main/snap/snapcraft.yaml#L16-L26 (https://github.com/bitcoin-core/packaging/blob/main/snap/snapcraft.yaml#L16-L26)
[3] https://askubuntu.com/a/1238219 (https://askubuntu.com/a/1238219)