Error: The database is unavailable

I installed the latest fdb 6.2 from the offical website, and sudo service foundationdb status works fine: running. no any errors happend. but when I use fdbcli to check the status, it shows:

Using cluster file `/etc/foundationdb/fdb.cluster’.

The database is unavailable; type `status’ for more information.

Welcome to the fdbcli. For help, type `help’.
fdb> status

Using cluster file `/etc/foundationdb/fdb.cluster’.

The coordinator(s) have no record of this database. Either the coordinator
addresses are incorrect, the coordination state on those machines is missing, or
no database has been created. (reachable)

Unable to locate the data distributor worker.

Unable to locate the ratekeeper worker.

what’s the problem it could be?


May be there is no data or the data is not correct.

If you do not have any data yet, you can try to create a new empty database: ‘configure new ssd’ in fdbcli.

For what it’s worth, when you install the database from the installation packages, it’s supposed to configure the database for you (it uses configure new single memory). It’s possible for this step to fail, though, in which case you’ll need to run it manually as Oleg said. To run configure new, you’ll need to provide both a redundancy mode (typically single for a local installation) and storage engine (memory or ssd for now).

thanks. I used “configure new single ssd” to make it work fine now.
by the way, could you tell me where I can find the detail documents about how to check how many databases and tables in fdb, like “select * from table-name”?

Thanks for your information. at the first time when I installed fdb, it indeed no any error when using fdbcli, but later when I tried to change the datadir by modifying the /etc/foundationdb/foundationdb.conf, fdb service can start successfully but fdbcli failed and the error is like what I mentioned above, so I uninstalled the fdb and reinstalled again then the same symptom happened “fdb service can start successfully but fdbcli failed” .

I think this kind of error is relative to that I uninstalled the fdb by using ‘rpm -e’ but didn’t remove those directories like /var/lib/foundationdb/ and /var/log/foundationdb/ and /etc/foundationdb/.

Changing the datarir in /etc/foundationdb/foundationdb.conf may be not sufficient. You should also copy its contents from the old location to the new one.

how to check how many databases and tables in fdb, like “select * from table-name

Fdb is not a relational database so there is no any tables in it. All data are within the single scope of key-value pairs. You can query this database with fdbcli:

getrangekeys ‘’ \xff

thanks.I got it. another question: does fdb support compression and can we configure the compression model?

why changing the datadir in /etc/foundationdb/foundationdb.conf may be not sufficient? you know, I am going to save data to one SSD, the default datadir is /var/lib/foundationdb/data and my /var/lib/foundationdb directory locates on HDD other than SSD, so what I did is setting like below and it seems work fine.
datadir = /opt/data/fdb5.2.5/data/4500


why changing the datadir in /etc/foundationdb/foundationdb.conf may be not sufficient?

The fdb installation creates a database with files in /var/lib/foundationdb/data. For using another dir, you have to move the old database files there and continue using the old database or create a new one with ‘configure’ statement.

got it! Thanks :smiley:

Just a heads up – you should use double quotes ("") instead of single quotes when querying in fdbcli. Single quotes are not special characters, so the above would query beginning with the literal string "''" rather than the empty string "". So instead, make sure to query like this:

fdb> getrangekeys "" \xff

There is not automatic value compression available in any storage engine. Both storage engines are undergoing an improvement/rewrite, and prefix compression of keys will be a feature of both the new memory storage engine (memory-radixtree-beta) and the new ssd storage engine (ssd-redwood-experimental).

thanks!you mean there is prefix compression that only works for key, am I right?

Thanks :slight_smile: