Unknown engine problem in MongoDB aarch64 on raspberry pi 3

Hello everyone! I have opensuse leap 42.2 aarch64 on my raspberry pi 3. I’ve installed mongodb from server_database repo (openSUSE_Factory_ARM) and it fails to start.

MongoDB version: mongodb-3.2.11-3.6.aarch64
Repo: http://software.opensuse.org/download.html?project=server%3Adatabase&package=mongodb

Logs with default settings:

2017-03-29T11:34:00.903+0200 I CONTROL  [initandlisten] MongoDB starting : pid=2002 port=27017 dbpath=/var/lib/mongodb 64-bit host=linux
2017-03-29T11:34:00.903+0200 I CONTROL  [initandlisten] db version v3.2.11
2017-03-29T11:34:00.903+0200 I CONTROL  [initandlisten] git version: 009580ad490190ba33d1c6253ebd8d91808923e4
2017-03-29T11:34:00.903+0200 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2j-fips  26 Sep 2016
2017-03-29T11:34:00.903+0200 I CONTROL  [initandlisten] allocator: system
2017-03-29T11:34:00.903+0200 I CONTROL  [initandlisten] modules: none
2017-03-29T11:34:00.903+0200 I CONTROL  [initandlisten] build environment:
2017-03-29T11:34:00.904+0200 I CONTROL  [initandlisten]     distarch: arm64
2017-03-29T11:34:00.904+0200 I CONTROL  [initandlisten]     target_arch: arm64
2017-03-29T11:34:00.904+0200 I CONTROL  [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,::1", http: { JSONPEnabled: false, RESTInterfaceEnabled: false, enabled: false }, ipv6: true, port: 27017 }, processManagement: { fork: true }, security: { authorization: "enabled" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, logRotate: "reopen", path: "/var/log/mongodb/mongod.log" } }
2017-03-29T11:34:00.949+0200 I STORAGE  [initandlisten] exception in initAndListen: 28663 Cannot start server. The default storage engine 'wiredTiger' is not available with this build of mongod. Please specify a different storage engine explicitly, e.g. --storageEngine=mmapv1., terminating
2017-03-29T11:34:00.949+0200 I CONTROL  [initandlisten] dbexit:  rc: 100

Log message when explicitly specify


storage:
  engine: wiredTiger

in /etc/mongodb.conf:

2017-03-28T08:54:17.651+0200 I CONTROL  [initandlisten] MongoDB starting : pid=23137 port=27017 dbpath=/var/lib/mongodb 64-bit host=linux
2017-03-28T08:54:17.651+0200 I CONTROL  [initandlisten] db version v3.2.11
2017-03-28T08:54:17.651+0200 I CONTROL  [initandlisten] git version: 009580ad490190ba33d1c6253ebd8d91808923e4
2017-03-28T08:54:17.651+0200 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2j-fips  26 Sep 2016
2017-03-28T08:54:17.652+0200 I CONTROL  [initandlisten] allocator: system
2017-03-28T08:54:17.652+0200 I CONTROL  [initandlisten] modules: none
2017-03-28T08:54:17.652+0200 I CONTROL  [initandlisten] build environment:
2017-03-28T08:54:17.652+0200 I CONTROL  [initandlisten]     distarch: arm64
2017-03-28T08:54:17.652+0200 I CONTROL  [initandlisten]     target_arch: arm64
2017-03-28T08:54:17.652+0200 I CONTROL  [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,::1", http: { JSONPEnabled: false, RESTInterfaceEnabled: false, enabled: false }, ipv6: true, port: 27017 }, processManagement: { fork: true }, security: { authorization: "enabled" }, storage: { dbPath: "/var/lib/mongodb", engine: "wiredTiger", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, logRotate: "reopen", path: "/var/log/mongodb/mongod.log" } }
2017-03-28T08:54:17.697+0200 I STORAGE  [initandlisten] exception in initAndListen: 18656 Cannot start server with an unknown storage engine: wiredTiger, terminating
2017-03-28T08:54:17.697+0200 I CONTROL  [initandlisten] dbexit:  rc: 100

Log message when explicitly specify


storage:
  engine: mmapv1

in mongodb.conf:

2017-03-28T08:53:34.445+0200 I CONTROL  [initandlisten] MongoDB starting : pid=23120 port=27017 dbpath=/var/lib/mongodb 64-bit host=linux
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten] db version v3.2.11
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten] git version: 009580ad490190ba33d1c6253ebd8d91808923e4
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2j-fips  26 Sep 2016
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten] allocator: system
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten] modules: none
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten] build environment:
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten]     distarch: arm64
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten]     target_arch: arm64
2017-03-28T08:53:34.446+0200 I CONTROL  [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,::1", http: { JSONPEnabled: false, RESTInterfaceEnabled: false, enabled: false }, ipv6: true, port: 27017 }, processManagement: { fork: true }, security: { authorization: "enabled" }, storage: { dbPath: "/var/lib/mongodb", engine: "mmapv1", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, logRotate: "reopen", path: "/var/log/mongodb/mongod.log" } }
2017-03-28T08:53:34.492+0200 I STORAGE  [initandlisten] exception in initAndListen: 18656 Cannot start server with an unknown storage engine: mmapv1, terminating
2017-03-28T08:53:34.492+0200 I CONTROL  [initandlisten] dbexit:  rc: 100

MongoDB for ARM with WiredTiger requires 3.3.11 or newer - official ARM64 support came in 3.4.

For now it’s updated to 3.4.3 in arm factory repo. But the problem still the same.

To the @OP,
You copied your logfile again and again instead of the mongodb.conf files you intended to post.

As is always the case nowadays, when an app or service doesn’t start, you should invoke “systemctl status servicename” which returns a number of valuable information including a probably relevant snippet from the journal (system log)

systemctl status mongodb.service

TSU

Link to the package in question?

Most likely they’re compiling it with if-arch-x86_64-then-include-Wired as was the case with the previous spec file.

So for now repo version is updated to: mongodb-3.4.3-3.1.aarch64.rpm (source: mongodb-3.4.3-3.1.src.rpm)

My config file (it’s default config with only changes in engine line - I’ve tried all options of it and showed in logs in post above):


# mongod.conf


# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/


# Where and how to store data.
storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
  engine: wiredTiger
#  mmapv1:
#  wiredTiger:


# Where and how to log messages.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log
  logRotate: reopen


# What type of connections to allow.
net:
  port: 27017
  bindIp: 127.0.0.1,::1
  ipv6: true
  http:
    enabled: false
    JSONPEnabled: false
    RESTInterfaceEnabled: false




# How to manage mongod.
processManagement:
  fork: true


# Security settings.
security:
  authorization: enabled


#operationProfiling:


#replication:


#sharding:


## Enterprise-Only Options:


#auditLog:


#snmp:

The spec used to create the ARCH64 version is horribly broken because it contains;


%ifarch x86_64    
    --wiredtiger=on \
%else
    --wiredtiger=off \
%endif

It doesn’t check for the existence of ARM64 but only Intel x86_64 and completely disables Wiredtiger. I rigged the .spec to build one but my ARM64 devices STILL haven’t arrived so I haven’t been able to test it (and I won’t put it out without testing)

Although it’s not exactly the same, you can always deploy and test your ARM-specific modifications in a QEMU virtual machine running on your x86 hardware.

For what you’re testing, I don’t even think that you need to emulate exactly the OP’s hardware, you can test on any ARM image.

TSU

You’re absolutely right but we’re working on setting up OBS workers on ARM64 on our private infra so I’ll wait before hacking together anything :slight_smile: