Bandwidthdb error: no such table: bandwidth_usage_rollups

docker pull storjlabs/storagenode

2020-03-24T19:31:35.440+0300 INFO storagenode/peer.go:452 Node 1WGxwSP2bKhpt4KJ3ZcoS6C4JWd9PhT9YjKFA8AK7BdYaJsckw started
2020-03-24T19:31:35.440+0300 INFO storagenode/peer.go:453 Public server started on [::]:28967
2020-03-24T19:31:35.440+0300 INFO storagenode/peer.go:454 Private server started on
2020-03-24T19:31:35.441+0300 FATAL process/exec_conf.go:288 Unrecoverable error {“error”: “bandwidthdb error: no such table: bandwidth_usage_rollups”, “errorVerbose”: “bandwidthdb error: no such table: bandwidth_usage_rollups\n\*bandwidthDB).Summary:112\n\*bandwidthDB).MonthSummary:79\n\*Service).usedBandwidth:174\n\*Service).Run:83\n\*Peer).Run.func6:436\n\*Group).Go.func1:57”}

Can you show your docker run command ? Please remove any personal info from it.

sudo docker run -d --restart unless-stopped -p 28967:28967 -p 14002:14002 -e WALLET=“0xWallet” -e EMAIL="" -e ADDRESS=“localhost:28967” -e BANDWIDTH=“20PB” -e STORAGE=“970GB” -v /etc/localtime:/etc/localtime:ro --mount type=bind,source="/home/user/storj",destination=/app/identity --mount type=bind,source="/mnt/disk1/storj",destination=/app/config --name storagenode storjlabs/storagenode
address,wallet,email replace

-e ADDRESS=“localhost:28967”

This should not be “localhost” it should be an external IP address or the DDNS you configured and the port you opened on your router

Please try using this template:

docker run -d --restart unless-stopped --stop-timeout 300 \
-p 28967:28967 \
-p \
-e EMAIL="" \
-e ADDRESS="" \
-e STORAGE="2TB" \
--mount type=bind,source="<identity-dir>",destination=/app/identity \
--mount type=bind,source="<storage-dir>",destination=/app/config \
--name storagenode storjlabs/storagenode:beta

address,wallet,email replace

  1. Stop the storagenode
  2. Make a backup of bandwidth.db (for example - just copy it to bandwidth.db.bak)
  3. Execute either with a local installed sqlite3 or with a docker container (see for reference):
sqlite3 bandwidth.db
CREATE TABLE bandwidth_usage (
                                                satellite_id  BLOB    NOT NULL,
                                                action        INTEGER NOT NULL,
                                                amount        BIGINT  NOT NULL,
                                                created_at    TIMESTAMP NOT NULL
CREATE TABLE bandwidth_usage_rollups (
                                                                                interval_start  TIMESTAMP NOT NULL,
                                                                                satellite_id    BLOB    NOT NULL,
                                                                                action          INTEGER NOT NULL,
                                                                                amount          BIGINT  NOT NULL,
                                                                                PRIMARY KEY ( interval_start, satellite_
id, action )
CREATE INDEX idx_bandwidth_usage_satellite ON bandwidth_usage(satellite_id);
CREATE INDEX idx_bandwidth_usage_created   ON bandwidth_usage(created_at);
  1. Try to start storagenode and take a look into logs.