themattman/mongodb-raspberrypi-docker

arch specific version still errors

Closed this issue · 8 comments

boomam commented

...With it being unofficial, I dont expect that this would be looked into with any priority, but to flag this up -
Build successfully runs, container successfully pulls, deployment however fails with the same issues as normal mongo in its log -

WARNING: Using unofficial community build for Raspberry Pi which was purpose-built to overcome the micro-architecture limitations.
  see also https://github.com/docker-library/mongo/issues/485#issuecomment-970864306
  see also https://en.wikichip.org/wiki/arm/armv8#ARMv8_Extensions_and_Processor_Features
  see https://jira.mongodb.org/browse/SERVER-55178
WARNING: MongoDB 5.0+ requires ARMv8.2-A or higher, and your current system does not appear to implement any of the common features for that!
  see https://github.com/themattman/mongodb-raspberrypi-binaries

Specifically, using v6.1.0-rc4.

deployment however fails with the same issues as normal mongo in its log

What is the return code of mongod? What do the mongod logs say?

The log line you quoted from Docker is expected on successful execution. It is a warning, part of which I authored noting that these are unofficial and for the Pi. For the next release in this repo I have removed the second warning.

boomam commented

Hi,
I'll keep an eye out for the second release and re-test then - IIRC (it was a while ago i was testing this), the container was crashing after the above error regardless, netting the same end result as the 'official' container after it fails.
Thanks!

@boomam give one of the new releases a spin.

Attempting to run r7.0.1, docker import, Cannot create container for service mongo: No command specified

I am not very familiar with Docker, but could you try docker load instead of docker import?

@boomam give one of the new releases a spin.

@themattman
Apologies for the delay.
Tested today, appears to start. Need to do a little more testing.

Created a PR here to add some basic build steps, as i saw a question in the other issue.

Just tested with 6.0.11 (previous test was with 7.0.3), built and replaced the image/release on a Graylog stack.

Fundamentally, it looks like Mongo comes up

However, for those on old MongoDb versions (such as those using Graylog on a Raspberry Pi 4), i had to do a few upgrade/migration steps -
 
The TL:DR is that, as-is, the container constantly restarts with an error similar to the below -

ctx=initandlisten msg=Wrong mongod version attr={"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"4.2\" }. 
See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility. :: 
caused by :: Invalid feature compatibility version value, expected '5.0' or '5.3' or '6.0. See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility.). 
If the current featureCompatibilityVersion is below 5.0, see the documentation on upgrading at https://docs.mongodb.com/master/release-notes/5.0/#upgrade-procedures."}

After a little trial and error, and verifying what upgrade steps were needed here, i performed the following steps -

  1. I copied the mongo data to an x86 host, and deployed a 4.4.26-rc0-focal image, pointing at said data.

  2. I then i used docker exec -it mongo /bin/sh to get to its CLI, and ran the following commands -

mongo
use admin

This logged me into the mongo CLI is admin.

  1. I checked the current featureCompatibiltyVersion level -
    db.runCommand({getParameter: 1, featureCompatibilityVersion: 1})
    Followed by updating it to v5.0 -
    db.adminCommand({ setFeatureCompatibilityVersion: "4.4" })
    Then verified it stuck with the check command again -
    db.runCommand({getParameter: 1, featureCompatibilityVersion: 1})
     

  2. Next, i updated the x86 container to a 5.0.23-rc0-focal image.
     
    Then performed the same steps again, this time updating the version to 5.0.
     

  3. Following this, i copied the data back to the Raspberry Pi, corrected permissions, started the 6.0.11 image from here, and....it stays up!

Then to make it easier for myself, in future, i did one last version update to v6.0, should i ever upgrade to v7.x+.

 
In my case, starting Graylog v5 still was not successful, as it needed some additional steps.
 
Hopefully this helps people upgrade!

Thank you for the detailed steps, @boomam! I have seen at least one other user who is using these images/binaries for Graylog. Adding a wiki page on the repo might be a good next step for common applications (e.g. Unifi). Yes, it looks like you ran into the one-upgrade-at-a-time requirement from MongoDB. Glad you got it sorted to be able to jump from 4.4 up to 6.x!

I'll close this issue for now as it appears that the docker images themselves are sound.