MongoDB 3.0.14 for Raspbian Stretch

10 Comments

The main operating system for Raspberry Pi, Raspbian, continues to evolve.  The latest version as of August 2017 is “Raspbian Stretch” — based upon the current stable version of Debian 9.  The previous version was known as “Raspbian Jessie”.  One difference between versions is OpenSSL libraries. OpenSSL is a general purpose cryptography library that provides an open source implementation of the Secure Sockets Layer (SSL).  My previous builds of MongoDB relied on the older library.  As a result, my previous binaries for 3.0.14 and 3.0.9 do not run under Raspbian Stretch.  Given this change as well as other changes to MongoDB source and newer compilers, I could no longer compile MongoDB 3.0.14 with SSL.

After a few source tweaks and use of various compiler flags, I have manged to compile MongoDB core apps and tools.  These binaries do NOT support SSL and only run under Raspian Stretch on a Raspberry Pi 3.  [UPDATE — 2018 Mar 22] I have confirmed that these binaries work on the latest Raspberry Pi 3 Model B+ with the March 2018 version of Raspbian.

You can download a zipped file of the MongoDB core binaries v3.0.14 for Raspbian Stretch from here.

md5sum: a09b9455aa265cac07feeaaaed01a610 –  mongodb_stretch_3_0_14_core.zip

contains:

  • mongo
  • mongod
  • mongos

You can download a zipped file of the MongoDB tools v3.0.14 for Raspbian Stretch from here.

md5sum: fc44e519e58f369d280fb0e000643893 – mongodb_stretch_3_0_14_tools.zip

contains:

  • bsondump
  • mongoexport
  • mongoimport
  • mongorestore
  • mongotop
  • mongodump
  • mongofiles
  • mongooplog
  • mongostat

Installation and use instructions can be found in my previous blog entry: MongoDB 3.0.9 binaries for Raspberry Pi 

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

SaveSave

10 Comments (+add yours?)

  1. Andres
    Dec 29, 2017 @ 23:00:54

    Hey – Thanks for the binaries! I’ve created a Docker image for easier set up. Check it out: https://github.com/andresvidal/rpi3-mongodb3 or https://hub.docker.com/r/andresvidal/rpi3-mongodb3/

    docker run -d \
    –name rpi3-mongodb3 \
    –restart unless-stopped \
    -v /data/db:/data/db \
    -v /data/configdb:/data/configdb \
    -p 27017:27017 \
    -p 28017:28017 \
    andresvidal/rpi3-mongodb3:latest

    Reply

  2. Lukasz
    Jan 22, 2018 @ 02:04:36

    Hey, Excellent work on the binaries! I tried to get them working on my rapbian stretch with RPI3 but when I try to run mongod it still asks for libssl.so.1.0.0 and libcrypto.so.1.0.0 (error while loading shared libraries). Any recommendations ?

    Reply

    • Andy
      Jan 22, 2018 @ 18:14:47

      It seems you might be using the wrong “mongod” binary? Ensure you have downloaded the Stretch version of MongoDB core binaries from: http://andyfelong.com/downloads/mongodb_stretch_3_0_14_core.zip Also, make sure you have latest Stretch version of Raspbian (Version: November 2017, Release Date: 2017-11-29). For me, “cat /etc/os-release” shows “PRETTY_NAME=Raspbian GNU/Linux 9 (stretch)”

      Reply

  3. Harry
    Mar 06, 2018 @ 07:51:10

    Thank you very much. I solved the problem of using MongoDBR in Raspberry Pi 3B

    Reply

  4. Fabix
    Apr 07, 2018 @ 14:33:33

    Hi !
    Thanks a lot for this work. It saves my life for a project on my R-py 3B+ with Raspbian Stretch lite.
    It works at first try.

    Reply

  5. Antonio
    Jul 16, 2018 @ 08:18:01

    Hi Andy,
    The fact that I can run Mongodb 3 on my Raspberry PI 2B is fantastic, thanks a lot for your efforts!

    I’m using it with a piece of software that inserts a few thousands records (∼20k), at the beginning it wa running smoothly, until at a certain point I hit a road block:

    2018-07-16T15:50:36.308+0100 I NETWORK [initandlisten] connection accepted from 127.0.0.1:48870 #5 (4 connections now open)
    2018-07-16T15:50:36.334+0100 F – [conn4] Invalid access at address: 0x5d66ddf7
    2018-07-16T15:50:36.542+0100 F – [conn4] Got signal: 7 (Bus error).

    Now every time the software tries to continue, the mongo server crashes with this error.
    After a short googling I found this answer:

    https://stackoverflow.com/questions/16746134/bus-error-on-mongodb-mongoclient-connect-for-raspberry-pi-arm

    Do you think it could be the issue? If the RAM wouldn’t have been enough, it’d have shown a different error if I’m not mistaken.
    Thanks!

    Reply

    • andy
      Jul 16, 2018 @ 11:03:46

      I believe I did build with “correct” ARM setting(s). Perhaps you are running out of RAM. I suggest a quick test by adding a swap file to see if this “fixes” the issue. Make sure you have at least 1GB free on your SD Card. Make a swapfile:

      sudo dd if=/dev/zero of=/mnt/swapfile bs=1024 count=1000000
      sudo chmod 600 /mnt/swapfile
      sudo mkswap /mnt/swapfile
      sudo swapon /mnt/swapfile

      and restart mongod

      LMK how it goes…

      Reply

Leave a Reply