FoundationDB

Trying to make docker image; fdbcli says database not created


(Jon Watte) #1

I am a brand new user!

I’m trying to set up a foundationdb docker image to run the server, exposing port 4500 to the local machine.

I’ve installed server and client using the .deb packages from the download page, as part of the Dockerfile setting up the server container.

While I can get the server to run, when I try to interact with it, I get this error (using fdbcli inside the docker container):

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.

  127.0.0.1:4500  (reachable)

fdb>

I looked at the tutorials, but they all assume that a database has been properly created and set up.

The server is started as:

sudo fdbserver -C /etc/foundationdb/fdb.cluster -d /var/lib/foundationdb/data/ -L /var/log/foundationdb/ -p 127.0.0.1:4500 -l 0.0.0.0:4500

(This runs inside the container)

What’s likely to be the problem here, and more specifically where can I find the necessary information to unblock myself? (I e, “the docs” is not a good answer; tries that – where specifically in the docs?)


(Alec Grieser) #2

It looks like the problem is that the cluster hasn’t been “configured”. Each FDB cluster needs to be told some configuration information about what kind of redundancy mode it should be using, what storage engine, etc. We have detailed information about configuration in our documentation.

For local development, you’ll probably want to run:

fdbcli --exec "configure new single memory ; status"

This configures a new database with single replication (as good as you can get with a single instance) and it uses the memory storage engine. (All data are still durable in a memory engine, but the dataset also must fit in memory and is not optimized for quick recovery.) You could substitute “ssd” for “memory” and that would also probably be fine. Most of our client installers do this transparently behind the scenes, so if you do have the debian package, if you so desired, you could find the script where this is invoked, though that’s probably not worth the effort, tbh.


Fresh LXD container installation of fdb 6.0.15 fails with Database unavailable
Deployment with custom fdb.cluster file
(Jon Watte) #3

Thanks! I had tried running configure new memory (after reading the meager output of help) but that didn’t work.
configure new single memory seems to work great!
That should probably go somewhere early in the “how to install and use” documentation path …


(David Scherer) #4

I’m kind of puzzled why you had to do this yourself; shouldn’t the debian packages have done it during the docker build process? Maybe there is something wrong with the Dockerfile.