algorand / algorand/go-algorand
Impossible to Sync Node by using Fast Catchup on Raspberry Pi OS Lite. Error thrown seems like a Unix network permission denied
- Lenguaje dominante
- Go
- Estrellas
- 1.4k
- Forks
- 537
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 17
Descripción
## Summary
I noticed it was impossible to Sync Node by using Fast Catchup on Raspberry Pi OS Lite.
Error thrown seems like a Unix network permission denied
###### Error found into `~/node/data/node.log` related `db.atomic` service `database is locked`
```bash
{"callee":"github.com/algorand/go-algorand/ledger.(*CatchpointCatchupAccessorImpl).processStagingBalances.func2.1","caller":"github.com/algorand/go-algorand/ledger/catchupaccessor.go:354","file":"dbutil.go","function":"github.com/algorand/go-algorand/util/db.(*Accessor).atomic","level":"info","line":291,"msg":"db.atomic: 1 retries (last err: database is locked)","name":"","readonly":false,"time":"2021-06-13T01:21:27.870402+01:00"}
```
###### Error found into `~/node/data/node.log` msg `Unable to write event`
```bash
{"file":"telemetryhook.go","function":"github.com/algorand/go-algorand/logging.createAsyncHookLevels.func1","level":"warning","line":91,"msg":"Unable to write event u0026logrus.Entry{Logger:(*logrus.Logger)(0x85026240), ...
```
### Steps to reproduce
1. Power on a fresh headless_setup no gui install new Raspberry Pi OS Lite on a Model B 4GB RAM
2. Securing `pi` https://www.raspberrypi.org/documentation/configuration/security.md
3. Run `node` https://developer.algorand.org/docs/run-a-node/setup/install/
4. Start the sync via catchup with success `./goal node catchup $CATCHPOINT -d data`
5. After a couple of days the sync was still not completed,
6. And searching into `~/node/data/node.log` the service `db.atomic` thrown `err: database is locked` or msg `Unable to write event` for `telemetryhook`
### Environment
###### Algod installed systemd system-wide service. The command who did the magic was
```bash
pi@raspberrypi:~ $ sudo ./systemd-setup.sh pi pi
```
###### Software version: `algod -v`
```bash
pi@raspberrypi:~ $ ./algod -v
8590327808
2.6.0.stable [rel/stable] (commit #8fe22d4e)
go-algorand is licensed with AGPLv3.0
source code available at https://github.com/algorand/go-algorand
```
###### Node status `goal node status`
```bash
pi@raspberrypi:~ $ ./goal node status -d data
Last committed block: 198134
Time since last block: 0.0s
Sync Time: 0.0s
Last consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Next consensus protocol: https://github.com/algorandfoundation/specs/tree/5615adc36bad610c7f165fa2967f4ecfa75125f0
Round for next consensus protocol: 198135
Next consensus protocol supported: true
Last Catchpoint:
Genesis ID: mainnet-v1.0
Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=
```
###### OS `version`
```bash
pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
pi@raspberrypi:~ $ cat /etc/*release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ cat /etc/issue*
Raspbian GNU/Linux 10 \n \l
Raspbian GNU/Linux 10
pi@raspberrypi:~ $ cat /proc/version
Linux version 5.10.17-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1414 SMP Fri Apr 30 13:20:47 BST 2021
```
###### Raspberry Pi SD Card Speed Test agnostics
```bash
pi@raspberrypi:~ $ sh /usr/share/agnostics/sdtest.sh
Run 1
prepare-file;0;0;22779;44
seq-write;0;0;32141;62
rand-4k-write;0;0;2108;527
rand-4k-read;9701;2425;0;0
Sequential write speed 32141 KB/sec (target 10000) - PASS
Random write speed 527 IOPS (target 500) - PASS
Random read speed 2425 IOPS (target 1500) - PASS
```
###### `Cpu`
```bash
pi@raspberrypi:~ $ lscpu
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Vendor ID: ARM
Model: 3
Model name: Cortex-A72
Stepping: r0p3
CPU max MHz: 1500.0000
CPU min MHz: 600.0000
BogoMIPS: 270.00
Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
pi@raspberrypi:~ $
```
###### RAM
```bash
pi@raspberrypi:~ $ free -m
total used free shared buff/cache available
Mem: 3827 282 2449 8 1095 3405
Swap: 99 0 99
```
###### Disk `df`
```
pi@raspberrypi:~ $ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/root ext4 29G 7.4G 21G 27% /
devtmpfs devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs tmpfs 1.9G 8.4M 1.9G 1% /run
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mmcblk0p1 vfat 253M 49M 204M 20% /boot
pi@raspberrypi:~ $
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.