Bug 1303846 - mongod does not start on i686: The default storage engine 'wiredTiger' is not available with this build of mongod
Summary: mongod does not start on i686: The default storage engine 'wiredTiger' is not...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mongodb
Version: rawhide
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marek Skalický
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1305214
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-02 08:41 UTC by Petr Pisar
Modified: 2018-08-02 12:02 UTC (History)
8 users (show)

Fixed In Version: mongodb-4.0.0-3.fc29
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-02 12:02:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1334640 0 unspecified CLOSED mongod does not start on armv7: The default storage engine 'mmapv1' is not available with this build of mongod 2021-02-22 00:41:40 UTC

Internal Links: 1334640

Description Petr Pisar 2016-02-02 08:41:16 UTC
Since mongodb-3.2.0, the server refuses to start with an empty database on i686. This is a log from my package using mongod for tests:

+ mkdir test_db
+ mongod --fork --logpath /builddir/build/BUILD/MongoDB-v0.708.4.0/mongod.log --pidfilepath /builddir/build/BUILD/MongoDB-v0.708.4.0/mongod.pid --dbpath /builddir/build/BUILD/MongoDB-v0.708.4.0/test_db/
2016-02-02T08:20:19.367+0000 I CONTROL  [main] 
2016-02-02T08:20:19.367+0000 W CONTROL  [main] 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
2016-02-02T08:20:19.367+0000 I CONTROL  [main] 
about to fork child process, waiting until server is ready for connections.
forked process: 14456
ERROR: child process failed, exited with error number 100
+ test_rc=100
Error: Could not start mongod server
+ '[' -n 100 ']'
+ printf 'Error: Could not start mongod server\n'
+ cat mongod.log
2016-02-02T08:20:19.375+0000 I CONTROL  [initandlisten] MongoDB starting : pid=14456 port=27017 dbpath=/builddir/build/BUILD/MongoDB-v0.708.4.0/test_db/ 32-bit host=buildvm-02-nfs.phx2.fedoraproject.org
2016-02-02T08:20:19.375+0000 I CONTROL  [initandlisten] db version v3.2.1
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten] git version: a14d55980c2cdc565d4704a7e3ad37e4e535c1b2
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2f-fips  28 Jan 2016
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten] allocator: tcmalloc
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten] modules: none
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten] build environment:
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten]     distarch: i386
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten]     target_arch: i386
2016-02-02T08:20:19.376+0000 I CONTROL  [initandlisten] options: { processManagement: { fork: true, pidFilePath: "/builddir/build/BUILD/MongoDB-v0.708.4.0/mongod.pid" }, storage: { dbPath: "/builddir/build/BUILD/MongoDB-v0.708.4.0/test_db/" }, systemLog: { destination: "file", path: "/builddir/build/BUILD/MongoDB-v0.708.4.0/mongod.log" } }
2016-02-02T08:20:19.409+0000 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
2016-02-02T08:20:19.409+0000 I CONTROL  [initandlisten] dbexit:  rc: 100
RPM build errors:
+ exit 1

They error message states the mongod defults to wiredTiger storage that is not supported.

I think the server should work with default configuration. Plesse either enable the wiredTiger on i686 or change the default storage to something that is available there.

Tested with mongodb-server-3.2.1-3.fc24.i686.

Comment 1 Marek Skalický 2016-02-02 13:02:03 UTC
WiredTiger is not supported on 32 bit architectures, so it is not possible to enable it on i686.
Also 32 bit builds are deprecated sice 3.2 release. And even 32bit binaries downloaded from mongodb.org don't start with the same error.

There is the bug in Fedora! For i686 it is not specified storage.engie option in mongod.conf file. So mongod won't start with default config file.

However there is no build option to specify default storage engine on build time (I will ask upstream if I don't miss something). And in my point of view the supported way of using mongod in Fedora is by systemd service (or at least with default config file) and therefore it is not necessary to somehow patch it to change this upstream behavior. Without default config file, there is simple fix - add "--storageEngine=mmapv1" parameter to the mongod command.

Are you OK with this?

Comment 2 Petr Pisar 2016-02-02 13:11:56 UTC
That's your point of view. My point of view is the executable should be modified to default to a storage that is supported in the architecture. In other words, no, I'm not fine with it.

Comment 3 Jan Kurik 2016-02-24 14:23:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 4 Marek Skalický 2016-03-31 07:11:08 UTC
(In reply to Petr Pisar from comment #2)
> That's your point of view. My point of view is the executable should be
> modified to default to a storage that is supported in the architecture. In
> other words, no, I'm not fine with it.

This is a reason for default configuration. With your POV every maintainer in Fedora could have to change the code of maintained project to hardcode there every value from default configuration file to be able to be able to run executable without any parameters. For example for databases he should hardcode port, listening interface, database path, socket path,...
This is not the right way!

So I still think this change is not necessary. On the other hand for the backward compatibility it could be better to have default engine working by default since mongod was working this way before.

Comment 5 Petr Pisar 2016-03-31 08:02:59 UTC
You already hard-code a default configuration. But the wrong one that leads to a crash.

Comment 6 Marek Skalický 2016-03-31 08:19:20 UTC
No no! It is an upstream choice. They decided that storage engine should be configured and they don't want to support others as a default. It is the same as with other options...

I am building a new version. For the backward compatibility (I think it is your case too) this is fixed for non x86_64 archs.

Comment 7 Petr Pisar 2016-03-31 08:36:53 UTC
Upstream sometimes does wrong decisions. That's the place when distribution steps in and either fixes it or removes it from the distribution. I'm glad you decided to fix it.

Comment 8 Fedora Update System 2016-04-01 07:08:06 UTC
mongodb-3.2.3-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-150e04ec3b

Comment 9 Marek Skalický 2016-04-01 07:11:52 UTC
This bug is fixed in above mentioned update. So please test it...

For Fedora rawhide (F25) builds are not done yet. It is because new version of gcc with fix is failing to build.

Comment 10 Fedora Update System 2016-04-02 05:25:11 UTC
mongodb-3.2.3-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-150e04ec3b

Comment 11 Fedora Update System 2016-04-06 14:07:37 UTC
mongodb-3.2.3-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Petr Pisar 2018-07-11 07:32:31 UTC
And we have this bug again with mongodb-server-4.0.0-2.fc29.i686:

+ mongod --fork --logpath /builddir/build/BUILD/MongoDB-v2.0.1/mongod.log --pidfilepath /builddir/build/BUILD/MongoDB-v2.0.1/mongod.pid --dbpath /builddir/build/BUILD/MongoDB-v2.0.1/test_db/ --smallfiles
2018-07-11T07:26:48.747+0000 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-07-11T07:26:48.747+0000 I CONTROL  [main] 
2018-07-11T07:26:48.747+0000 W CONTROL  [main] 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
2018-07-11T07:26:48.747+0000 I CONTROL  [main] 
about to fork child process, waiting until server is ready for connections.
forked process: 24849
ERROR: child process failed, exited with error number 100
To see additional information in this output, start without the "--fork" option.
+ test_rc=100
Error: Could not start mongod server
+ '[' -n 100 ']'
+ printf 'Error: Could not start mongod server\n'
+ cat mongod.log
2018-07-11T07:26:48.760+0000 I CONTROL  [initandlisten] MongoDB starting : pid=24849 port=27017 dbpath=/builddir/build/BUILD/MongoDB-v2.0.1/test_db/ 32-bit host=buildhw-06.phx2.fedoraproject.org
2018-07-11T07:26:48.760+0000 I CONTROL  [initandlisten] db version v4.0.0
2018-07-11T07:26:48.760+0000 I CONTROL  [initandlisten] git version: nogitversion
2018-07-11T07:26:48.760+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.0h-fips  27 Mar 2018
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten] allocator: tcmalloc
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten] modules: none
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten] build environment:
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten]     distarch: i386
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten]     target_arch: i386
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten] options: { processManagement: { fork: true, pidFilePath: "/builddir/build/BUILD/MongoDB-v2.0.1/mongod.pid" }, storage: { dbPath: "/builddir/build/BUILD/MongoDB-v2.0.1/test_db/", mmapv1: { smallFiles: true } }, systemLog: { destination: "file", path: "/builddir/build/BUILD/MongoDB-v2.0.1/mongod.log" } }
2018-07-11T07:26:48.761+0000 I STORAGE  [initandlisten] exception in initAndListen: Location28663: 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
2018-07-11T07:26:48.761+0000 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2018-07-11T07:26:48.761+0000 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten] now exiting
2018-07-11T07:26:48.761+0000 I CONTROL  [initandlisten] shutting down with code:100

Comment 13 Petr Pisar 2018-07-11 07:39:55 UTC
armv7 is affected too.

Comment 14 Marek Skalický 2018-08-02 12:02:59 UTC
It should be fixed now. Thanks for reporting it.


Note You need to log in before you can comment on or make changes to this bug.