Background:
- Using
satoshipay/stellar-horizon:0.11.1
for Horizon
Stellar Core seems to be running. Based on logs, we get the latest sequence number and ledger:
2018-04-18T10:31:32.695 GDYMW [Ledger INFO] Got consensus: [seq=8508865, prev=fc51bd, tx_count=7, sv: [ txH: c3108f, ct: 1524047493, upgrades: [ ] ]]
2018-04-18T10:31:37.620 GDYMW [Herder INFO] Quorum information for 8508864 : {"agree":3,"disagree":0,"fail_at":2,"hash":"273af2","missing":0,"phase":"EXTERNALIZE"}
2018-04-18T10:31:37.630 GDYMW [Ledger INFO] Got consensus: [seq=8508866, prev=1e8788, tx_count=7, sv: [ txH: 6deefc, ct: 1524047497, upgrades: [ ] ]]
2018-04-18T10:31:37.630 GDYMW [Ledger INFO] Got consensus: [seq=8508866, prev=1e8788, tx_count=7, sv: [ txH: 6deefc, ct: 1524047497, upgrades: [ ] ]]
Setup Horizon to read from Stellar Cores Database. Horizon ENV Variables:
INGEST = true
CATCHUP_RECENT = 1440
HISTORY_RETENTION_COUNT = 1000
STELLAR_CORE_DATABASE_URL = <redacted>
STELLAR_CORE_URL = <redacted>
DATABASE_URL = <redacted>
Stellar Core and port is reachable from the Horizon machine. Horizon runs, but I don't see core_latest_ledger
being updated:
"horizon_version": "",
"core_version": "v9.1.0",
"history_latest_ledger": 0,
"history_elder_ledger": 0,
"core_latest_ledger": 1,
"core_elder_ledger": 0,
"network_passphrase": "Test SDF Network ; September 2015",
"protocol_version": 9
Checked the Horizon logs:
time="2018-04-18T10:38:28Z" level=error msg="import session failed: failed to load header: sql: no rows in result set" pid=1
Checked here, and it looks like someone else encountered the problem: Horizon not Synchronizing ("import session failed: failed to load header: sql: no rows in result set" pid=8077)
I cleared the Horizon Database and restarted Horizon. Horizon Database was reinitialized and horizon is running again, but I still encountered the same error:
level=error msg="import session failed: failed to load header: sql: no rows in result set" pid=1
I ran through the steps here: https://www.stellar.org/developers/horizon/reference/admin.html#correcting-gaps-in-historical-data
I didn't encounter any errors, but after restarting Horizon I encountered the same error:
level=error msg="import session failed: failed to load header: sql: no rows in result set" pid=1
My last resort would be to clear the stellar-core
database and make sure it has no gaps. Any advice on the next steps?
UPDATE:
I updated Horizon to 0.12.3. Horizon runs and I no longer encounter the import session
error, however I encountered another error:
level=warning msg="ingest: waiting for stellar-core sync"
I tried with an empty horizon database and I still get this error.