-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
priority: mediumNormal priorityNormal priorityrepo: interxstatus: readyReady to be worked onReady to be worked ontype: refactorCode quality improvementCode quality improvement
Description
Description
The Ethereum indexer fails on startup with the following error:
ERROR tasks/block.go:118 tasks - BlockManager - set last block - write to file
{"error": "open /srv/block.data: is a directory"}
Root Cause
When Docker Compose starts with the volume mount:
- "./worker/ethereum/sai-ethereum-indexer/block.data:/srv/block.data"If the source path does not exist on the host, Docker creates it as a directory instead of a file. The indexer expects a regular file to store the last processed block height.
Affected Code
- worker/ethereum/sai-ethereum-indexer/tasks/block.go:116 - ioutil.WriteFile() fails when path is a directory
- Volume mount in docker-compose configuration
Workaround
rm -rf ./worker/ethereum/sai-ethereum-indexer/block.data
touch ./worker/ethereum/sai-ethereum-indexer/block.data
docker compose restart ethereum-indexer
Metadata
Metadata
Assignees
Labels
priority: mediumNormal priorityNormal priorityrepo: interxstatus: readyReady to be worked onReady to be worked ontype: refactorCode quality improvementCode quality improvement