ElementsProject / ElementsProject/lightning

Failed to replicate query: database disk image is malformed

Open
#6,027 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.1k
Forks
1k
Avg merge
4d 10h
Merged PRs (30d)
13

Description

When I start up lightningd with ``sudo systemctl start lightningd``, no error is returned.

When I run ``sudo journalctl -f -u lightningd``, I get this:
```
$ sudo journalctl -f -u lightningd
-- Journal begins at Tue 2023-01-31 10:49:40 EET. --
Feb 11 14:24:44 raspibolt systemd[1]: Started Core Lightning daemon.
Feb 11 14:25:54 raspibolt sh[184030]: Failed to replicate query: database disk image is malformed: database disk image is malformed: DELETE FROM blocks WHERE height > 775495
Feb 11 14:25:54 raspibolt systemd[1]: lightningd.service: Main process exited, code=exited, status=1/FAILURE
Feb 11 14:25:54 raspibolt systemd[1]: lightningd.service: Killing process 184047 (node) with signal SIGKILL.
Feb 11 14:25:54 raspibolt systemd[1]: lightningd.service: Failed with result 'exit-code'.
Feb 11 14:25:54 raspibolt systemd[1]: lightningd.service: Consumed 3.860s CPU time.
Feb 11 14:26:24 raspibolt systemd[1]: lightningd.service: Scheduled restart job, restart counter is at 3417.
Feb 11 14:26:24 raspibolt systemd[1]: Stopped Core Lightning daemon.
Feb 11 14:26:24 raspibolt systemd[1]: lightningd.service: Consumed 3.860s CPU time.
Feb 11 14:26:24 raspibolt systemd[1]: Started Core Lightning daemon.
```
Lightning daemon isn't running:
```
$ lightning-cli getinfo
lightning-cli: Connecting to 'lightning-rpc': Connection refused
```
Do you know what's the fault?

Extra information that might be helpful: Verification progress is 99.9993% in my Bitcoin node.
- This is copy-pasted from [SE](https://bitcoin.stackexchange.com/questions/117146/c-lightning-failed-to-replicate-query-database-disk-image-is-malformed/117237#117237) as requested.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.