I did a few more attempts, following these steps:
- Install 16.04
- apt update
- apt upgrade
- apt install mongodb
- Create simple database (using compass), insert a collection with a few entries
- do-release-upgrade
- MongoDB fails to start
Errors in the logs:
May 28 11:55:31 mongo systemd[1]: Started An object/document-oriented database.
May 28 11:55:35 mongo systemd[1]: mongodb.service: Main process exited,
code=dumped, status=11/SEGV
May 28 11:55:35 mongo systemd[1]: mongodb.service: Failed with result
'core-dump'.
I attempted to start mongo manually:
> mongod --dbpath=/var/lib/mongodb
Which resulted in this output:
CONTROL [initandlisten] MongoDB starting : pid=1889 port=27017
dbpath=/var/lib/mongodb 64-bit host=mongo
CONTROL [initandlisten] db version v3.6.3
CONTROL [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
CONTROL [initandlisten] allocator: tcmalloc
CONTROL [initandlisten] modules: none
CONTROL [initandlisten] build environment:
CONTROL [initandlisten] distarch: x86_64
CONTROL [initandlisten] target_arch: x86_64
CONTROL [initandlisten] options: { storage: { dbPath: "/var/lib/mongodb" } }
- [initandlisten] Detected unclean shutdown -
/var/lib/mongodb/mongod.lock is not empty.
- [initandlisten] Detected data files in /var/lib/mongodb created by the
'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.
JOURNAL [initandlisten] journal dir=/var/lib/mongodb/journal
JOURNAL [initandlisten] recover begin
JOURNAL [initandlisten] info no lsn file in journal/ directory
JOURNAL [initandlisten] recover lsn: 0
JOURNAL [initandlisten] recover /var/lib/mongodb/journal/j._0
JOURNAL [initandlisten] recover cleaning up
JOURNAL [initandlisten] removeJournalFiles
JOURNAL [initandlisten] old journal file will be removed:
/var/lib/mongodb/journal/j._0
JOURNAL [initandlisten] recover done
JOURNAL [initandlisten] preallocating a journal file
/var/lib/mongodb/journal/prealloc.0
JOURNAL [durability] Durability thread started
JOURNAL [journal writer] Journal writer thread started
CONTROL [initandlisten]
CONTROL [initandlisten] ** WARNING: Access control is not enabled for the
database.
CONTROL [initandlisten] ** Read and write access to data and
configuration is unrestricted.
CONTROL [initandlisten] ** WARNING: You are running this process as the root
user, which is not recommended.
CONTROL [initandlisten]
CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
CONTROL [initandlisten] ** Remote systems will be unable to connect
to this server.
CONTROL [initandlisten] ** Start the server with --bind_ip <address>
to specify which IP
CONTROL [initandlisten] ** addresses it should serve responses from,
or with --bind_ip_all to
CONTROL [initandlisten] ** bind to all interfaces. If this behavior
is desired, start the
CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable
this warning.
CONTROL [initandlisten]
INDEX [initandlisten] error: hashtable namespace index max chain reached:1335
- [initandlisten] Invalid access at address: 0
- [initandlisten] Got signal: 11 (Segmentation fault).
0x5647cf8da4ca 0x5647cf8d978e 0x5647cf8d9ddc 0x7efc9dee2890 0x5647ce46862d
0x5647ce468a5f 0x5647ce46f4b0 0x5647ce14b196 0x5647ce14e56b 0x5647ce15151a
0x5647ce0dbe19 0x7efc9db00b97 0x5647ce13d74a
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"5647CD89F000","o":"203B4CA","s":"_ZN5mongo15printStackTraceERSo"},{"b":"5647CD89F000","o":"203A78E"},{"b":"5647CD89F000","o":"203ADDC"},{"b":"7EFC9DED0000","o":"12890"},{"b":"5647CD89F000","o":"BC962D","s":"_ZN5mongo12DatabaseImpl30_getOrCreateCollectionInstanceEPNS_16OperationContextERKNS_15NamespaceStringE"},{"b":"5647CD89F000","o":"BC9A5F","s":"_ZN5mongo12DatabaseImpl4initEPNS_16OperationContextE"},{"b":"5647CD89F000","o":"BD04B0","s":"_ZN5mongo18DatabaseHolderImpl6openDbEPNS_16OperationContextENS_10StringDataEPb"},{"b":"5647CD89F000","o":"8AC196"},{"b":"5647CD89F000","o":"8AF56B"},{"b":"5647CD89F000","o":"8B251A","s":"_ZN5mongo11mongoDbMainEiPPcS1_"},{"b":"5647CD89F000","o":"83CE19","s":"main"},{"b":"7EFC9DADF000","o":"21B97","s":"__libc_start_main"},{"b":"5647CD89F000","o":"89E74A","s":"_start"}],"processInfo":{
"mongodbVersion" : "3.6.3", "gitVersion" :
"9586e557d54ef70f9ca4b43c26892cd55257e1a5", "compiledModules" : [], "uname" : {
"sysname" : "Linux", "release" : "4.15.0-101-generic", "version" : "#102-Ubuntu
SMP Mon May 11 10:07:26 UTC 2020", "machine" : "x86_64" }, "somap" : [ { "b" :
"5647CD89F000", "elfType" : 3, "buildId" :
"40A22A63C3F04AF7F9D3983994C20023104C5804" }, { "b" : "7FFC82359000", "path" :
"linux-vdso.so.1", "elfType" : 3, "buildId" :
"8998D33E41188E68AF2FCA086FF5EBB349F863ED" }, { "b" : "7EFCA0965000", "path" :
"/usr/lib/x86_64-linux-gnu/libstemmer.so.0d", "elfType" : 3, "buildId" :
"278CA72E21C11FF2E15A86B0B2C13A8922951702" }, { "b" : "7EFCA0748000", "path" :
"/lib/x86_64-linux-gnu/libz.so.1", "elfType" : 3, "buildId" :
"EF3E006DFE3132A41D4D4DC0E407D6EA658E11C4" }, { "b" : "7EFCA0540000", "path" :
"/usr/lib/x86_64-linux-gnu/libsnappy.so.1", "elfType" : 3, "buildId" :
"55765D88D03CC928130D788F1C7E4BF8415AC7E3" }, { "b" : "7EFCA02C6000", "path" :
"/usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.5", "elfType" : 3, "buildId" :
"BF65D47C8CD968E616F7D179F84A80CA71DB8249" }, { "b" : "7EFCA00BD000", "path" :
"/usr/lib/x86_64-linux-gnu/libpcrecpp.so.0", "elfType" : 3, "buildId" :
"089B8438CC1394E978E56C556C9CAE768BD2F18C" }, { "b" : "7EFC9FE3C000", "path" :
"/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1", "elfType" : 3,
"buildId" : "9F69F11220BB1FAAB0B73A2B6F4B0E81D9B901CE" }, { "b" :
"7EFC9FC22000", "path" :
"/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1", "elfType" : 3,
"buildId" : "32B8421A0643426D9FB008005F5A86688065008B" }, { "b" :
"7EFC9FA1D000", "path" : "/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1",
"elfType" : 3, "buildId" : "4BA851D242F2DB710CB1817DE860CF97AE2F9714" }, { "b"
: "7EFC9F7AD000", "path" : "/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4",
"elfType" : 3, "buildId" : "572D5C17FBDA6B678DF653411F676819DE18CA6B" }, { "b"
: "7EFC9F592000", "path" : "/lib/x86_64-linux-gnu/libresolv.so.2", "elfType" :
3, "buildId" : "390E9CC4C215314B6D8ADE6D6E28F8518418039C" }, { "b" :
"7EFC9F305000", "path" : "/usr/lib/x86_64-linux-gnu/libssl.so.1.1", "elfType" :
3, "buildId" : "38AE5B4499DA422AA6D86BAED1902662DED5F730" }, { "b" :
"7EFC9EE3A000", "path" : "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1",
"elfType" : 3, "buildId" : "68CECD8742C0C91CDC82709C3E52A8C9F9451FC5" }, { "b"
: "7EFC9EC32000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3,
"buildId" : "9826FBDF57ED7D6965131074CB3C08B1009C1CD8" }, { "b" :
"7EFC9EA2E000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3,
"buildId" : "25AD56E902E23B490A9CCDB08A9744D89CB95BCC" }, { "b" :
"7EFC9E6A5000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType"
: 3, "buildId" : "F2119A44A99758114620C8E9D8E243D7094F77F6" }, { "b" :
"7EFC9E307000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3,
"buildId" : "A33761AB8FB485311B3C85BF4253099D7CABE653" }, { "b" :
"7EFC9E0EF000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3,
"buildId" : "679F3AE11120EC7C483BC9295345D836F5C104F7" }, { "b" :
"7EFC9DED0000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" :
3, "buildId" : "28C6AADE70B2D40D1F0F3D0A1A0CAD1AB816448F" }, { "b" :
"7EFC9DADF000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3,
"buildId" : "B417C0BA7CC5CF06D1D1BED6652CEDB9253C60D0" }, { "b" :
"7EFC9D86D000", "path" : "/lib/x86_64-linux-gnu/libpcre.so.3", "elfType" : 3,
"buildId" : "5B3416BB188EAF3FA4B7530AAE6C1890B38B0372" }, { "b" :
"7EFC9D652000", "path" : "/usr/lib/x86_64-linux-gnu/libunwind.so.8", "elfType"
: 3, "buildId" : "7995F03B59E1D6EB7968EEA5B8534910D4E8E8D6" }, { "b" :
"7EFCA0BB6000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3,
"buildId" : "64DF1B961228382FE18684249ED800AB1DCEAAD4" }, { "b" :
"7EFC9D42C000", "path" : "/lib/x86_64-linux-gnu/liblzma.so.5", "elfType" : 3,
"buildId" : "8FBCCA354D964860B9E6EB3736E9B7BC6177B417" } ] }}
mongod(_ZN5mongo15printStackTraceERSo+0x3A) [0x5647cf8da4ca]
mongod(+0x203A78E) [0x5647cf8d978e]
mongod(+0x203ADDC) [0x5647cf8d9ddc]
libpthread.so.0(+0x12890) [0x7efc9dee2890]
mongod(_ZN5mongo12DatabaseImpl30_getOrCreateCollectionInstanceEPNS_16OperationContextERKNS_15NamespaceStringE+0x8D)
[0x5647ce46862d]
mongod(_ZN5mongo12DatabaseImpl4initEPNS_16OperationContextE+0x1FF)
[0x5647ce468a5f]
mongod(_ZN5mongo18DatabaseHolderImpl6openDbEPNS_16OperationContextENS_10StringDataEPb+0xCE0)
[0x5647ce46f4b0]
mongod(+0x8AC196) [0x5647ce14b196]
mongod(+0x8AF56B) [0x5647ce14e56b]
mongod(_ZN5mongo11mongoDbMainEiPPcS1_+0x61A) [0x5647ce15151a]
mongod(main+0x9) [0x5647ce0dbe19]
libc.so.6(__libc_start_main+0xE7) [0x7efc9db00b97]
mongod(_start+0x2A) [0x5647ce13d74a]
----- END BACKTRACE -----
Segmentation fault (core dumped)
I tried using the --repair flag:
mongod --dbpath=/var/lib/mongodb --repair
I CONTROL [initandlisten] MongoDB starting : pid=1941 port=27017
dbpath=/var/lib/mongodb 64-bit host=mongo
I CONTROL [initandlisten] db version v3.6.3
I CONTROL [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
I CONTROL [initandlisten] allocator: tcmalloc
I CONTROL [initandlisten] modules: none
I CONTROL [initandlisten] build environment:
I CONTROL [initandlisten] distarch: x86_64
I CONTROL [initandlisten] target_arch: x86_64
I CONTROL [initandlisten] options: { repair: true, storage: { dbPath:
"/var/lib/mongodb" } }
W - [initandlisten] Detected unclean shutdown -
/var/lib/mongodb/mongod.lock is not empty.
I - [initandlisten] Detected data files in /var/lib/mongodb created by
the 'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.
I STORAGE [initandlisten] **************
You specified --repair but there are dirty journal files. Please
restart without --repair to allow the journal files to be replayed.
If you wish to repair all databases, please shutdown cleanly and
run with --repair again.
**************
I STORAGE [initandlisten] exception in initAndListen: Location12596: old lock
file, terminating
I NETWORK [initandlisten] shutdown: going to close listening sockets...
I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
I CONTROL [initandlisten] now exiting
I CONTROL [initandlisten] shutting down with code:100
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1881083
Title:
Upgrading Ubuntu from 16.04 to 18.04 breaks MongoDB
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mongodb/+bug/1881083/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs