raspiblitz: Restoring from lnd rescue file (_provision.setup.sh fail)
Trying to recover from backup_file to fresh SD card with existing blockchain data:
- **Preparing SSD**
\*************************************
\* JUST MAKING BACKUP TO SD CARD
\*************************************
please wait ..
\# *** LND.RESCUE --> BACKUP
mv: cannot move '/home/admin/lnd.version.info' to '/mnt/hdd/lnd/version.info': No such file or directory
chown: cannot access '/mnt/hdd/lnd/version.info': No such file or directory
\# Stopping lnd...
\# OK
tar: Removing leading `/' from member names
tar: /mnt/hdd/lnd: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
error='backup is empty'
!!!! This will DELETE your personal data & POSSIBLE FUNDS from the HDD !!!!
--> It will keep Blockchain data - so you dont have to download/copy again.
Press ENTER to really continue - CTRL+c to CANCEL (last chance)
stopping services ... (please wait)
- swap
- background
- lnd
- blockchain
selective delete ... (please wait)
\*************************
OK - the HDD is now clean
\*************************
reboot -> sudo shutdown -r now
power off -> sudo shutdown now
Connection to 192.168.0.126 closed by remote host.
Connection to 192.168.0.126 closed.
- INSERT FRESH SD 1.7.1 SSH in to the new node and continue
NOTE: When promted to your fresh Rapsiblitz there are three options but none point to *From Resucue File* which is found two steps later when choosing FRESHSETUP
- Setup New Blitz
Choose a new name →Entering existing old name.
Choose Client: → LND
Choose NEW/OLD → OLD
Choose Recover → LNDRESCUE
UPLOAD RESCUE FILE with instructions
In new terminal, inside the folder that contains the rescue-file: scp -r ./lnd-rescue-*.tar.gz bitcoin@192.168.0.126:/home/bitcoin/temp/upload/
PW: raspiblitz → 100% switching back to other terminal
→ file found
Get hint: The Raspiblitz uses 3 Passwords and that setting A + B need to be set now. No further hints to when PW C will be set.
→ PW A accepted → Pw B accepted
Next step fails:
\###########################################################
\# /home/admin/raspiblitz.log
\***********************************************
Running RaspiBlitz Bootstrap 1.7.1
Sun 17 Oct 15:12:35 BST 2021
\***********************************************
\# *** blitz.ssh.sh checkrepair
\# countKeyFiles(8)
\# OK: SSHD RUNNING
No HDMI switch found.
No FS EXPAND needed. needsExpansion(0) fsexpanded(1)
No SSHRESET switch found.
No UASP FIX needed (1st-try).
Waiting for HDD/SSD ...
total 604
drwxr-xr-x 2 root root 4096 Oct 12 00:12 .
drwxr-xr-x 118 root root 4096 Oct 12 00:12 ..
-rw-r--r-- 1 root root 565189 Jan 31 2020 moduli
-rw-r--r-- 1 root root 1580 Jan 31 2020 ssh_config
-rw-r--r-- 1 root root 3250 Jan 31 2020 sshd_config
-rw------- 1 root root 1381 Oct 12 00:12 ssh_host_dsa_key
-rw-r--r-- 1 root root 606 Oct 12 00:12 ssh_host_dsa_key.pub
-rw------- 1 root root 513 Oct 12 00:12 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 178 Oct 12 00:12 ssh_host_ecdsa_key.pub
-rw------- 1 root root 411 Oct 12 00:12 ssh_host_ed25519_key
-rw-r--r-- 1 root root 98 Oct 12 00:12 ssh_host_ed25519_key.pub
-rw------- 1 root root 1823 Oct 12 00:12 ssh_host_rsa_key
-rw-r--r-- 1 root root 398 Oct 12 00:12 ssh_host_rsa_key.pub
-rw-r--r-- 1 root root 338 Mar 5 2021 ssh_import_id
wifiIsSet=0
hddBackupLocationAvailable=0
hddRestoreConfigAvailable=0
memRestoreConfigAvailable=0
wifiRestore=0
wifiBackup=0
No UASP FIX needed (2nd-try).
isMounted: 0
Checking for UASP deactivation ...
HDD already part of system: 0
Temp mounting (1) data drive (sda)
Temp mounting (1) result: 1
HDD is there but not AutoMounted yet - Waiting for user Setup/Update
\# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 14987608 4385864 9945396 31% /
devtmpfs 1933976 0 1933976 0% /dev
tmpfs 1968600 0 1968600 0% /dev/shm
tmpfs 1968600 8632 1959968 1% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 1968600 0 1968600 0% /sys/fs/cgroup
tmpfs 32768 4 32764 1% /var/cache/raspiblitz
/dev/mmcblk0p1 258095 30357 227738 12% /boot
tmpfs 393720 0 393720 0% /run/user/1000
/dev/sda1 960379920 415068516 496456980 46% /mnt/hdd
\# lsblk -o NAME,FSTYPE,LABEL
NAME FSTYPE LABEL
sda
└─sda1 ext4 BLOCKCHAIN
mmcblk0
├─mmcblk0p1 vfat boot
└─mmcblk0p2 ext4 rootfs
\# RASPIBLITZ DATA DRIVE Status
\# BASICS
isMounted=1
isBTRFS=0
hddRaspiData=0
hddRaspiVersion=''
isSSD=0
datadisk='sda'
datapartition='sda1'
hddBlocksBitcoin=1
hddBlocksLitecoin=0
hddBytes=1000203091968
hddGigaBytes=931
hddUsedInfo='396G (46%)'
hddDataFreeKB=496456980
hddAdapterUSB='174c:1153'
hddAdapterUSAP=0
\# RAID
isRaid=0
raidCandidates=0
\# SWAP
isSwapExternal=0
Displaying Info Message: Please Login for Setup
\## WAIT LOOP: USER SETUP/UPDATE/MIGRATION
\# PROVISION PROCESS with setupPhase(setup)
Temp mounting (2) data drive (sda)
Temp mounting (2) result: 1
Refreshing links between directories/drives ..
\# Sourcing /mnt/hdd/raspiblitz.conf
\# RASPIBLITZ CONFIG FILE
raspiBlitzVersion='1.7.1'
lcdrotate=1
lightning=lnd
network=bitcoin
chain=main
hostname='ZERF'
runBehindTor=on
\# Sourcing /var/cache/raspiblitz/temp/raspiblitz.setup
\# RASPIBLITZ SETUP STATE
network=bitcoin
hostname=ZERF
lightning=lnd
network=bitcoin
chain=main
setPasswordA=1
setPasswordB=1
lndrescue='/home/bitcoin/temp/upload/lnd-rescue-7d9e128a83992e1746d6975840f92935.tar.gz'
\# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 14987608 4285924 10045336 30% /
devtmpfs 1933976 0 1933976 0% /dev
tmpfs 1968600 0 1968600 0% /dev/shm
tmpfs 1968600 25032 1943568 2% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 1968600 0 1968600 0% /sys/fs/cgroup
tmpfs 32768 20 32748 1% /var/cache/raspiblitz
/dev/mmcblk0p1 258095 30357 227738 12% /boot
tmpfs 393720 0 393720 0% /run/user/1000
tmpfs 393720 0 393720 0% /run/user/1001
/dev/sda1 960379920 415068536 496456960 46% /mnt/hdd
\# lsblk -o NAME,FSTYPE,LABEL
NAME FSTYPE LABEL
sda
└─sda1 ext4 BLOCKCHAIN
mmcblk0
├─mmcblk0p1 vfat boot
└─mmcblk0p2 ext4 rootfs
\# Update /home/admin/raspiblitz.info
state=provision
message='Starting Provision'
baseimage=raspios_arm64
cpu=aarch64
board=rp4
ramMB=3844
ramGB=4
network=bitcoin
chain=main
localip='192.168.0.126'
online='1'
dnsworking=1
fsexpanded=1
displayClass=lcd
displayType=
setupStep=0
setupPhase='setup'
fundRecovery=0
hostname=
hddCandidate='sda'
hddGigaBytes=931
hddBlocksBitcoin=1
hddBlocksLitecoin=0
hddGotMigrationData=
\# migrationFile()
\# setting PASSWORD A
OK - password A changed for user pi, root, admin & bitcoin
...
Calling _provision.setup.sh for basic setup tasks ..
EXIT _provision.setup.sh BECAUSE OF ERROR STATE (5)
This can also happen if _provision.setup.sh has syntax errors
\# /home/admin/raspiblitz.provision-setup.log
\###################################
\# _provision.setup.sh
\###################################
\*** Prepare bitcoin ***
mkdir: cannot create directory ‘/mnt/hdd/bitcoin’: File exists
mkdir: cannot create directory ‘/mnt/hdd/bitcoin/blocks’: File exists
mkdir: cannot create directory ‘/mnt/hdd/bitcoin/chainstate’: File exists
File Exists: /mnt/hdd/bitcoin/bitcoin.conf --> 1
\# setting PASSWORD B
\# OK -> RPC Password B changed
\# Reboot is needed
...
\*** Start bitcoin (SETUP) ***
- This can take a while ..
\# (0/50) checking if bitcoind is running ...
\# (1/50) checking if bitcoind is running ...
\# (2/50) checking if bitcoind is running ...
\# (3/50) checking if bitcoind is running ...
OK bitcoin startup successful
Prepare Lightning (lnd)
\############## Setup LND
FAIL: missing passwordC in (/var/cache/raspiblitz/temp/raspiblitz.setup)!
\***********************************************************
ERROR - please report to development team
\***********************************************************
state(error) message(_provision.setup.sh fail)
https://github.com/rootzoll/raspiblitz#support
command to shutdown --> off
admin@raspberrypi:~ $
→ off
Blitz shuts down.
Unplug power to reboot.
SSH back in to the raspiblitz, now with new PW: A Now prompted to
PLEASE START WITH A FRESH SD CARD IMAGE (leads to same result)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 44 (1 by maintainers)
Commits related to this issue
- provison.setup: don't need passwordC for rescuefile #2639 — committed to raspiblitz/raspiblitz by openoms 3 years ago
- provision.setup: register LNDRESCUE, fix #2639 — committed to raspiblitz/raspiblitz by openoms 3 years ago
- #2639 check if wallet exists from resacue file — committed to raspiblitz/raspiblitz by rootzoll 3 years ago
- #2639 fix config after lnd rescuefile import — committed to raspiblitz/raspiblitz by openoms 3 years ago
- #2639 check ln synced before main menu — committed to raspiblitz/raspiblitz by rootzoll 3 years ago
This should be fixed in the latest release candidate image. The download link is in the dev branch. Bugs found there will be actively fixed so beat is to keep it up to date by running the shortcut command:
patch
in the command line.ran into the same issue yesterday night, ported over the changes of the
_provision.setup.sh
script into my fresh v1.7.1 script folder and was able to restore alnd-rescue-*.tar.gz
seamlessly. Thanks, great job!OK this looks good now. Removing the bug-lable and is ready for final testing as part of the relese candidates.
Hi @The34Goon
ℹ️ Your termbin in your raspiblitz issue 2639 seems to expose your onion address to the public.
🤷 I can’t tell you how to change your bitcoind onion address for raspiblitz at the moment.
I didn’t know how to contact you with a direct message here on github. I’m sorry to post this public.
The lnd.conf is part of the rescue file as it is in the lnd directory and that’s how your settings and alias is restored.
It is parsed for most breaking options, but not for line order.
these lines:
need to be under the
section.
this is causing your LND to fail.
Best guess when looking at the created
raspiblitz.conf
…… its because the
lnd=on
is missing when setting up fresh with LNDRESCUE file.EDIT: If I add
lnd=on
manually to the config. It starts behaving correctly.OK, first test look good with
dev
scripts. Adding final testing.ok i checked the configs, and the rpc pws was not equal, the lnd.conf has the rpc pw from the backup and the bitcoin.conf has the pw, from the fresh node i made before. after changing the pw in bitcoin.conf, restarted bitcoind + lnd, syncing is 100% and backup restore was successfull, everything works fine now, thx openoms 😉
synchronise the RPC user and password between bitcoin.conf and lnd.conf (if there is a password at all)
check the logs of bitcoin and LND from the SYSTEM menu
Until we can reproduce this issue and find a reliable solution there is the previous image still available at the
v1.7.0
tag: https://github.com/rootzoll/raspiblitz/tree/v1.7.0#downloading-the-softwareThe only thing stops you from downgrading afaik is LND not running with a previous version after updating the database. So use the command line to enter:
menu
thenUPDATE
->LND
to the latest release.