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.

I am using 1.1.1, installed as per documentation.


The newer version is without the :beta, but if i install it and start it I am given errors

2020-04-25T19:50:02.387Z 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](*bandwidthDB)).Summary:112\n\[*bandwidthDB](*bandwidthDB)).MonthSummary:79\n\[*Service](*Service)).usedBandwidth:174\n\[*Service](*Service)).Run:83\n\[*Peer](*Peer)).Run.func6:436\n\[*Group](*Group)).Go.func1:57"}

tried renaming bandwidth.db, no go. Cant updated. I am afraid of changing anything else in case I corrupt data.*Group).Go.func1
2020-04-25T19:54:53.159Z        ERROR   orders  orders/service.go:139   cleaning archive        {"error": "ordersdb error: no such table: order_archive_", "errorVerbose": "ordersdb error: no such table: order_archive_\n\*ordersDB).CleanArchive:326\n\*Service).cleanArchive:137\n\*Cycle).Run:87\n\*Cycle).Start.func1:68\n\*Group).Go.func1:57"}*Service).cleanArchive
2020-04-25T19:54:53.158Z        ERROR   orders  orders/service.go:156   listing orders  {"error": "ordersdb error: no such table: unsent_order", "errorVerbose": "ordersdb error: no such table: unsent_order\n\*ordersDB).ListUnsentBySatellite:140\n\*Service).sendOrders:153\n\*Cycle).Run:87\n\*Cycle).Start.func1:68\n\*Group).Go.func1:57"}*Service).sendOrders
2020-04-25T19:54:53.159Z        ERROR   piecestore:cacheUpdate  pieces/cache.go:69      error persisting cache totals to the database:  {"error": "piece space used error: context canceled", "errorVerbose": "piece space used error: context canceled\n\*pieceSpaceUsedDB).UpdateTotal:121\n\*CacheService).PersistCacheTotals:82\n\*CacheService).Run.func1:68\n\*Cycle).Run:87\n\*CacheService).Run:63\n\*Peer).Run.func7:439\n\*Group).Go.func1:57"}*CacheService).Run.func1

Hello @NtTestAlert,
Welcome to the forum!

The fix for this error is posted above: Bandwidthdb error: no such table: bandwidth_usage_rollups

A post was merged into an existing topic: Error: Error creating tables for master database on storagenode: migrate: no such table: main.order_archive_


I have the same issue with the bandwidth_usage_rollups table when I attempt to use the latest version (1.3.3). The beta version (1.1.1) works perfectly without issues.

The sqlite3 fix posted above did not work for me. sqlite3 says that the table already exists. I also backed up bandwidth.db and opened it with DB Browser and found the table. I also tried to use the latest version with a fresh node. Same issue.

I’m afraid version 1.1.1 won’t be supported anymore and my nodes might stop.

Help is much appreciated

1 Like

I am in the same situation, also tried the sqlite commands above and also had the output show tables already exist. Trying to start node (i.e. without ‘:beta’) results in constant restarting.

Welcome to the forum @whiterock!

Why would you do that ?

Why I want to start the node? I am not sure I see what you mean, I wanted to upgrade from 1.1.1 to 1.3.3 and faced the issue that my node kept restarting because of this bandwidth_usage_rollups table missing issue as is outlined in previous posts. Thus I followed the advice in precisely but the error persists and I had to the downgrade again to 1.1.1, i.e. storjlabs/storagenode:beta to keep my node alive, passing ping checks, earning money etc.

Don’t mess with the tags unless you want to ruin your node.

You can’t yet. The docker image isn’t yet available.

Don’t deviate from the documentation. Using anything but the :beta tag can damage your node databases and make the node unable to run even with the current version.

1 Like

Ah, thank you so much! This was exactly the information I needed and was not able to find it anywhere :slight_smile: