Bug 1087307 - MongoDB is unable to start on openSUSE Tumbleweed for ARM
MongoDB is unable to start on openSUSE Tumbleweed for ARM
Status: RESOLVED FIXED
: 1046807 (view as bug list)
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Jacob W
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-28 13:12 UTC by Victor Zhestkov
Modified: 2018-05-16 09:09 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Zhestkov 2018-03-28 13:12:02 UTC
It seems mongodb-server was compiled with no engines.
It returns the error 100 on starting.
I've increased logging verbosity and here is the result:
2018-03-28T16:05:40.619+0300 D NETWORK  [main] fd limit hard:64000 soft:64000 max conn: 51200
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] MongoDB starting : pid=2717 port=27017 dbpath=/var/lib/mongodb 64-bit host=softiron1000
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] db version v3.6.2
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] git version: 489d177dbd0f0420a8ca04d39fd78d0a2c539420
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.0g-fips  2 Nov 2017
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] allocator: tcmalloc
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] modules: none
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] build environment:
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten]     distarch: aarch64
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten]     target_arch: aarch64
2018-03-28T16:05:40.626+0300 I CONTROL  [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,::1", ipv6: true, port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid" }, security: { authorization: "enabled" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, logRotate: "reopen", path: "/var/log/mongodb/mongod.log", verbosity: 5 } }
2018-03-28T16:05:40.626+0300 D NETWORK  [initandlisten] fd limit hard:64000 soft:64000 max conn: 51200
2018-03-28T16:05:40.627+0300 D -        [initandlisten] User Assertion: 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. src/mongo/db/service_context_d.cpp 151
2018-03-28T16:05:40.627+0300 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-03-28T16:05:40.627+0300 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2018-03-28T16:05:40.627+0300 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2018-03-28T16:05:40.627+0300 I CONTROL  [initandlisten] now exiting
2018-03-28T16:05:40.627+0300 I CONTROL  [initandlisten] shutting down with code:100


I tried to change the engine in the config file to mmapv1, but it returns the following:
2018-03-28T16:09:50.363+0300 D NETWORK  [main] fd limit hard:64000 soft:64000 max conn: 51200
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] MongoDB starting : pid=2728 port=27017 dbpath=/var/lib/mongodb 64-bit host=softiron1000
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] db version v3.6.2
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] git version: 489d177dbd0f0420a8ca04d39fd78d0a2c539420
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.0g-fips  2 Nov 2017
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] allocator: tcmalloc
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] modules: none
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] build environment:
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten]     distarch: aarch64
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten]     target_arch: aarch64
2018-03-28T16:09:50.370+0300 I CONTROL  [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1,::1", ipv6: true, port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid" }, 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", verbosity: 5 } }
2018-03-28T16:09:50.370+0300 D NETWORK  [initandlisten] fd limit hard:64000 soft:64000 max conn: 51200
2018-03-28T16:09:50.370+0300 D -        [initandlisten] User Assertion: 18656:Cannot start server with an unknown storage engine: mmapv1 src/mongo/db/service_context_d.cpp 168
2018-03-28T16:09:50.371+0300 I STORAGE  [initandlisten] exception in initAndListen: Location18656: Cannot start server with an unknown storage engine: mmapv1, terminating
2018-03-28T16:09:50.371+0300 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2018-03-28T16:09:50.371+0300 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2018-03-28T16:09:50.371+0300 I CONTROL  [initandlisten] now exiting
2018-03-28T16:09:50.371+0300 I CONTROL  [initandlisten] shutting down with code:100
Comment 1 Boris Manojlovic 2018-03-29 09:57:41 UTC
I have no arm *suse machine so i could not test builds of mongodb, but let me look into build logs for any clue regarding this report
Comment 2 Boris Manojlovic 2018-03-29 11:44:23 UTC
after looking into build log and a bit of googling, i have now added explicit 
--mmapv1 on  in code snippet as it is will not fall trough to mmapv1 engine type, so after few hours (i hope) you could test binary from my branch repository
%ifarch x86_64
    --wiredtiger=on \
%else
    --wiredtiger=off \
    --mmapv1=on \
%endif


https://build.opensuse.org/project/show/home:bmanojlovic:branches:server:database
Comment 3 Victor Zhestkov 2018-03-30 07:25:16 UTC
The repository is not existing still. But do you know what was the reason to exclude wiredtiger engine?
Comment 4 Boris Manojlovic 2018-03-30 08:00:16 UTC
Reason is big endian architectures, i could try restructuring spec file to enable arm first, hm ok let me look once more
(just done manual publish, sorry for that)
Comment 5 Victor Zhestkov 2018-03-30 08:07:02 UTC
Then it's easier for me to build it from sources. I'll try to do it a bit later and let you know the result.
Comment 6 Victor Zhestkov 2018-03-30 09:19:13 UTC
I tried to build mongodb on ARM with wiredtiger enabled.
Here is the reason why it was disabled in spec file:

/tmp/ccjhiAKr.s: Assembler messages:
/tmp/ccjhiAKr.s:35: Error: selected processor does not support `crc32cb w2,w2,w3'
/tmp/ccjhiAKr.s:59: Error: selected processor does not support `crc32cx w2,w2,x4'
/tmp/ccjhiAKr.s:79: Error: selected processor does not support `crc32cb w2,w2,w0'
scons: *** [build/blah/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o] Error 1
scons: building terminated because of errors.
build/blah/third_party/wiredtiger/src/checksum/arm64/crc32-arm64.o failed: Error 1

Now running build with --mmapv1=on. It's not fast on this hardware
Comment 7 Victor Zhestkov 2018-03-30 16:20:55 UTC
Boris, I've modified spec file this way:
%ifarch x86_64
    --wiredtiger=on \
%else
    --mmapv1=on \
    --wiredtiger=off \
%endif

there are 2 such parts in %build and %install sections. I've modified both.

Rebuild and reinstall mongodb from new packages. Now it's working with mmapv1 engine. But it requires the engine to be specified in config like this:

storage:
  dbPath: /var/lib/mongodb
  engine: mmapv1
  journal:
    enabled: true
Comment 8 Boris Manojlovic 2018-03-30 18:25:41 UTC
This is exactly what i have done.
SR with these changes has been created and i assume will soon be accepted.
Please confirm after it has been accepted and rebuilt that its function as expected.
Comment 9 Boris Manojlovic 2018-04-03 20:45:46 UTC
Victor, can you please try latest package that SHOULD include wiredTiger engine!
same place a before
https://build.opensuse.org/package/show/home:bmanojlovic:branches:server:database/mongodb
Comment 10 Victor Zhestkov 2018-04-05 19:57:10 UTC
Hi Boris.
I just tested it. It works! I've also tested it with
engine: mmapv1
But this option is not working now, as the mmapv1 engine is not compiled in I suppose. I don't know if it's significant, but I don't need it.
Comment 11 Boris Manojlovic 2018-04-05 22:04:48 UTC
in that case i am closing this bug report, but it will take some time until package is rebuilt in main repository
Comment 12 Guillaume GARDET 2018-05-16 09:09:54 UTC
*** Bug 1046807 has been marked as a duplicate of this bug. ***