mynodebtc / mynode

The easiest way to run Bitcoin and Lightning!
Other
649 stars 148 forks source link

raspi lost blockchain data and eth0 config on update #105

Closed haukehess closed 4 years ago

haukehess commented 4 years ago

I clicked "update" this morning over tor, confirmed and hoped for the best. The worst happened: disk is wiped (only 1.1GB on it) and eth0 does not get dhcp adress, so GUI is not reachable at all.

What now?

haukehess commented 4 years ago

My DHCP server on the DSL router seems to have a problem, which is a bad coincedence. I set a fixed adress (I'm afraid to have to do it for every reboot), now quicksynch is running

haukehess commented 4 years ago

The last lines of upgrade_log_0.1.74_post.txt look suspicous to me:

Executing: /lib/systemd/systemd-sysv-install disable hitch
+ systemctl disable mongodb
+ systemctl disable lnd_admin
+ systemctl disable dhcpcd
Synchronizing state of dhcpcd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable dhcpcd
Removed /etc/systemd/system/multi-user.target.wants/dhcpcd.service.
Removed /etc/systemd/system/dhcpcd5.service.
+ systemctl daemon-reload
+ sync

how can systemctl disable dhcpcd be a good thing?

haukehess commented 4 years ago

Nope, dhcp on my router is just fine. But the networking on my raspi ignores dhcp for some reason.

haukehess commented 4 years ago

ok, latest update - from here I'm lost: setting ip and route manually from the shell allowed mynode to operate somehow - but every reboot will cause the root problem again. I fiddled with /etc/network/interfaces and /etc/dhcpcd.conf because there are tutorials that are undecided which is active. Can you help me on that?

haukehess commented 4 years ago

Still recovering from that blow. Network is up. Bitcoin is running and synched. lnd wants a new wallet. Didn't recover the old one.

$ lncli unlock
Input wallet password: 
[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:10009: connect: connection refused"

and also

$lncli getinfo
[lncli] rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:10009: connect: connection refused"

I found and copied channel.backup from /home/bitcoin/lnd_backup. But as lncli doesn't work, I'm lost here

haukehess commented 4 years ago
admin@myNode:/mnt/hdd/mynode $ grep rpc bitcoin/*.conf
#rpcuser=mynode
#rpcpassword=bolt
rpcauth=mynode:b6f7ac713fb0f3ed6ab833eb41c8fd06$90c23a302a5e94434458c14ebc0c269ba54f8698aae8da19c359aad7dcd91a1f
rpcport=8332
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
admin@myNode:/mnt/hdd/mynode $ grep rpc lnd/*.conf
rpclisten=0.0.0.0:10009

Shouldn't there be something like "rpcuser" and "rpcpass" in the lnd.conf?

haukehess commented 4 years ago

New update: lncli getinfo works now, don't know what changed since it didn't. I did lncli create with my seed words and "recovered" to a wallet with 0 sats on/off. GUI sits on Lightning: waiting... and seems not to catch up on the new wallet. The wallet password is identical to the admin passwort, which is also the gui login password for mynode. Maybe the passwort needs to put into somewhere?

tehelsper commented 4 years ago

ok, latest update - from here I'm lost: setting ip and route manually from the shell allowed mynode to operate somehow - but every reboot will cause the root problem again. I fiddled with /etc/network/interfaces and /etc/dhcpcd.conf because there are tutorials that are undecided which is active. Can you help me on that?

network-manager is the primary tool now that manages networking. It should be launching dhclient automatically and obtaining an IP address. Look at "sudo systemctl status network-manager" for the status.

tehelsper commented 4 years ago

Were you able to recover your on-chain or in-channel funds after recovering your wallet?

haukehess commented 4 years ago

I recovered all my sats using the following lncli create command:

$ lncli create -multi_file=channel.backup.hh

where channel.backup.hh was my own copied version of the .lnd/channel.backup file.

This was very confusing, because lncli create without that option recovered my wallet with 0 sats, even though there were some onchain sats that were not locked in channels. But with -multi_file, all channels were force closed and the sats waited on channel for me after the (long) synch of lightning finished.

Hard lesson, but not very expensive (miner fees, but hey, no hobby comes for free)

Best regards,

Hauke

On Sun, Dec 15, 2019 at 6:41 AM Taylor Helsper notifications@github.com wrote:

Were you able to recover your on-chain or in-channel funds after recovering your wallet?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mynodebtc/mynode/issues/105?email_source=notifications&email_token=AJQX5VA5JEQEAPDHOHF6M4DQYW7QBA5CNFSM4JZREZI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG4R5UQ#issuecomment-565780178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQX5VBLCI7XWLBCTZPKE6DQYW7QBANCNFSM4JZREZIQ .

haukehess commented 4 years ago

Hi Taylor, after giving it a second thought, there are too many seemingly overlapping ways to backup/recover that are not covered systematically anywhere. Or at least not where I found them usable for my case. First in myNode-GUI there is a "create wallet with seed" option that didn't accept my seed words. Then I don't know if myNode-GUI would have used channel.backup with the -multi_file option, this was not clear. Then there is a backup/restore option in RTL, where the backup might be copied too early (before commitment) which renders the backup useless - don't know if that is still the case in current RTL version. What saved me was your SD card copy of channel.backup (I think I proposed that a couple of months ago, luckily you implemented it at once). But using that is not straightforward at the moment. If myNode relied on the channel.backup on hdd as intended by lnd my story wouldn't have a happy ending.

Regards,

Hauke

On Sun, Dec 15, 2019 at 9:25 PM Hauke Hess haukehess@googlemail.com wrote:

I recovered all my sats using the following lncli create command:

$ lncli create -multi_file=channel.backup.hh

where channel.backup.hh was my own copied version of the .lnd/channel.backup file.

This was very confusing, because lncli create without that option recovered my wallet with 0 sats, even though there were some onchain sats that were not locked in channels. But with -multi_file, all channels were force closed and the sats waited on channel for me after the (long) synch of lightning finished.

Hard lesson, but not very expensive (miner fees, but hey, no hobby comes for free)

Best regards,

Hauke

On Sun, Dec 15, 2019 at 6:41 AM Taylor Helsper notifications@github.com wrote:

Were you able to recover your on-chain or in-channel funds after recovering your wallet?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mynodebtc/mynode/issues/105?email_source=notifications&email_token=AJQX5VA5JEQEAPDHOHF6M4DQYW7QBA5CNFSM4JZREZI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG4R5UQ#issuecomment-565780178, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQX5VBLCI7XWLBCTZPKE6DQYW7QBANCNFSM4JZREZIQ .

tehelsper commented 4 years ago

Added option to recover seed + SCB file.