How to connect to FoundationDB with MongoDB CLI?

(xet7) #1

I installed these packages, tried on Ubuntu 18.04 and Linux Mint 19.1:

  • fdb-document-layer_1.6.0-1_amd64.deb
  • foundationdb-clients_6.0.15-1_amd64.deb
  • foundationdb-server_6.0.15-1_amd64.deb

Then I started it with

sudo service foundationdb start

And this showed that it seems to be running:

sudo service foundationdb status

But connecting with mongodb client v3.2.11 and v3.6.3 to port 27016 does not work, it seems there is nothing running on that port. Also mongorestore does not work.

What steps am I missing?

(Alex Miller) #2

You’ve started the FoundationDB service, but not the FoundationDB Document Layer service.

You can start the latter with: sudo /etc/init.d/fdb-document-layer start

I’d be interested in more details on your setup though, as it looks like installing fdb-document-layer should invoke a post-install script that starts the service?

(and @mbhaskar to double check the above)

(xet7) #3

No, these did not start automatically, I needed to start them from /etc/init.d scripts on Ubuntu 18.04 64bit server running on bare metal server that has about 300 GB RAM, it’s from CNCF to Wekan Open Source project.

I’m maintainer of Wekan , Wekan uses Meteor Javascript framework with Node 8.15.0. I’m trying to find alternatives to MongoDB because of MongoDB database corruption and scalability.

When I tried Wekan with FoundationDB I did get thise errors after database creation and migrations:

> Starting add-custom-html-before-body-end migration.
> Finishing add-custom-html-before-body-end migration./home/wekan/repos/wekan/.build/bundle/programs/server/node_modules/fibers/future.js:313
MongoError: "You may not modify '_id' in an update"       at Function.create (/home/wekan/repos/wekan/.build/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:43:12)
    at toError (/home/wekan/repos/wekan/.build/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:149:22)
    at coll.s.topology.update (/home/wekan/repos/wekan/.build/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:1370:39)
    at /home/wekan/repos/wekan/.build/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:532:18
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickDomainCallback (internal/process/next_tick.js:219:9)

(Bhaskar Muppana) #4

It should have started the service after installation. That’s a bug. I could reproduce this on 16.04 as well. I have raised an issue

Do you have the specific query that is causing the “_id update” issue? It is not valid to update the _id field as it is the primary key. As far as I know, that’s the case with MongoDB as well. If you can point us to an example, we can confirm if that’s expected behavior or a bug.