Errors with mongo-community6 on mac cannot start - mongodb

I am having these issues with mongo startup on mac. There are two. One when I start without sudo and one with sudo. Setup with brew.
brew install mongodb-community#6.0
Tried: sudo brew services restart mongodb-community
Without sudo, permission denied error.
{"t":{"$date":"2022-12-10T14:01:32.755-05:00"},"s":"E", "c":"NETWORK", "id":23024, "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Permission denied"}}
With sudo
{"t":{"$date":"2022-12-10T13:55:50.382-05:00"},"s":"F", "c":"CONTROL", "id":20573, "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."}}
{"t":{"$date":"2022-12-10T13:5

Related

MongoDB 6.0.x - No longer runs on macOS Ventura 13.1 or 13.2

Just upgraded (14.12.2022) to macOS Ventura 13.1 (22C65).
Using Mongo on /usr/local/Cellar/mongodb-community/6.0.1/bin:
brew services restart mongodb-community#6.0
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
Then I run "mongosh":
mongosh
Now gives:
Current Mongosh Log ID: 6399ebcbf7b524ab8380978a
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.1
MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
Also unable to use: MongoDB Compass or Studio 3T.
Was working fine before I upgraded macOS Ventura 13.0.1 -> 13.1. TIA.
/usr/local/var/log/mongodb/mongo.log
{"t":{"$date":"2022-12-14T17:26:52.465+00:00"},"s":"I", "c":"NETWORK", "id":4915701, "ctx":"thread1","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2022-12-14T17:26:52.466+00:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"thread1","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2022-12-14T17:26:52.467+00:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"thread1","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"REPL", "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"CONTROL", "id":5945603, "ctx":"thread1","msg":"Multi threading initialized"}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"CONTROL", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":4184,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"MacBook-Pro-2.local"}}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"6.0.1","gitVersion":"32f0f9c88dc44a2c8073a5bd47cf779d4bfdee6b","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"22.2.0"}}}
{"t":{"$date":"2022-12-14T17:26:52.480+00:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/usr/local/etc/mongod.conf","net":{"bindIp":"127.0.0.1"},"storage":{"dbPath":"/usr/local/var/mongodb"},"systemLog":{"destination":"file","logAppend":true,"path":"/usr/local/var/log/mongodb/mongo.log"}}}}
{"t":{"$date":"2022-12-14T17:26:52.482+00:00"},"s":"I", "c":"NETWORK", "id":5693100, "ctx":"initandlisten","msg":"Asio socket.set_option failed with std::system_error","attr":{"note":"acceptor TCP fast open","option":{"level":6,"name":261,"data":"00 04 00 00"},"error":{"what":"set_option: Invalid argument","message":"Invalid argument","category":"asio.system","value":22}}}
{"t":{"$date":"2022-12-14T17:26:52.502+00:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/usr/local/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2022-12-14T17:26:52.502+00:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=32256M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_level=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progress:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
{"t":{"$date":"2022-12-14T17:26:53.152+00:00"},"s":"E", "c":"WT", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1671038813:151111][4184:0x7ff845fae8c0], wiredtiger_open: [WT_VERB_DEFAULT][ERROR]: int __posix_open_file(WT_FILE_SYSTEM *, WT_SESSION *, const char *, WT_FS_OPEN_FILE_TYPE, uint32_t, WT_FILE_HANDLE **), 805: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2022-12-14T17:26:53.154+00:00"},"s":"E", "c":"WT", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1671038813:154273][4184:0x7ff845fae8c0], wiredtiger_open: [WT_VERB_DEFAULT][ERROR]: int __posix_open_file(WT_FILE_SYSTEM *, WT_SESSION *, const char *, WT_FS_OPEN_FILE_TYPE, uint32_t, WT_FILE_HANDLE **), 805: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2022-12-14T17:26:53.155+00:00"},"s":"E", "c":"WT", "id":22435, "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1671038813:155027][4184:0x7ff845fae8c0], wiredtiger_open: [WT_VERB_DEFAULT][ERROR]: int __posix_open_file(WT_FILE_SYSTEM *, WT_SESSION *, const char *, WT_FS_OPEN_FILE_TYPE, uint32_t, WT_FILE_HANDLE **), 805: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2022-12-14T17:26:53.155+00:00"},"s":"W", "c":"STORAGE", "id":22347, "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}
{"t":{"$date":"2022-12-14T17:26:53.155+00:00"},"s":"F", "c":"STORAGE", "id":28595, "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"13: Permission denied"}}
{"t":{"$date":"2022-12-14T17:26:53.155+00:00"},"s":"F", "c":"ASSERT", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":702}}
{"t":{"$date":"2022-12-14T17:26:53.155+00:00"},"s":"F", "c":"ASSERT", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
BTW - Had to move back to "mongodb-community/5.0.7":
cd /usr/local/Cellar/mongodb-community/5.0.7/bin
./mongod --repair --dbpath /usr/local/var/mongodb --storageEngine wiredTiger
...
./mongod --config /usr/local/etc/mongod.conf
Then works:
./mongo
MongoDB shell version v5.0.7
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("fb718853-38f5-4ac7-809a-b5e5b4c3d184") }
MongoDB server version: 5.0.7
================
Warning: the "mongo" shell has been superseded by "mongosh",
which delivers improved usability and compatibility.The "mongo" shell has been deprecated and will be removed in
an upcoming release.
For installation instructions, see
https://docs.mongodb.com/mongodb-shell/install/
================
---
The server generated these startup warnings when booting:
2022-12-14T21:38:33.980+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
2022-12-14T21:38:33.998+00:00: Soft rlimits for open file descriptors too low
2022-12-14T21:38:33.998+00:00: currentValue: 256
2022-12-14T21:38:33.998+00:00: recommendedMinimum: 64000
---
---
Enable MongoDB's free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
---
FIXED (20/12/22):
brew unpin mongodb-community
brew upgrade
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
You have 2 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
Error: Not upgrading 1 pinned package:
wildfly-as 27.0.1
==> Upgrading 1 outdated package:
mongodb/brew/mongodb-community 6.0.3
==> Fetching mongodb/brew/mongodb-community
==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-6.0.3.tgz
######################################################################## 100.0%
==> Upgrading mongodb/brew/mongodb-community
-> 6.0.3
==> Caveats
To restart mongodb/brew/mongodb-community after an upgrade:
brew services restart mongodb/brew/mongodb-community
Or, if you don't want/need a background service you can just run:
mongod --config /usr/local/etc/mongod.conf
==> Summary
๐Ÿบ /usr/local/Cellar/mongodb-community/6.0.3: 10 files, 208.8MB, built in 3 seconds
==> Running `brew cleanup mongodb-community`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /usr/local/Cellar/mongodb-community/5.0.7... (11 files, 182.5MB)
brew services restart mongodb/brew/mongodb-community
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
23.01.23
Just upgrade macOS to 13.2 & 'mongodb-community' fails to run 6.0.3 & 6.0.4.
mongosh
Current Mongosh Log ID: 63ceeb88a1274eb5a6e6f8e0
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.2
MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
Just noticed on โ€˜brewโ€™ that MongoDB 6.0.1 can be upgraded to โ†’ 6.0.3 (20.12.22).
brew unpin mongodb-community
brew upgrade
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
You have 2 outdated formulae installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
==> Upgrading 1 outdated package:
mongodb/brew/mongodb-community 6.0.3
==> Fetching mongodb/brew/mongodb-community
==> Downloading https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-6.0.3.tgz
######################################################################## 100.0%
==> Upgrading mongodb/brew/mongodb-community
-> 6.0.3
==> Caveats
To restart mongodb/brew/mongodb-community after an upgrade:
brew services restart mongodb/brew/mongodb-community
Or, if you don't want/need a background service you can just run:
mongod --config /usr/local/etc/mongod.conf
==> Summary
๐Ÿบ /usr/local/Cellar/mongodb-community/6.0.3: 10 files, 208.8MB, built in 3 seconds
==> Running `brew cleanup mongodb-community`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /usr/local/Cellar/mongodb-community/5.0.7... (11 files, 182.5MB)
Obviously a bug with MongoDB on macOS. The two upgrads of 6.01 to 6.0.2/6.0.3 fixes:
brew services restart mongodb/brew/mongodb-community
Stopping `mongodb-community`... (might take a while)
==> **Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)**
==> **Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)**
(23/01/2023):
Just upgrade Intel macOS to 13.2 & 'mongodb-community' fails to run 6.0.3.
brew services restart mongodb/brew/mongodb-community
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
mongosh
Current Mongosh Log ID: 63ceeb88a1274eb5a6e6f8e0
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.2
MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
(25/01/2023) Fixed MongoDB mongodb-community 6.0.4 on macOS 13.2 using 'brew':
Deleted files inside:
usr/local/var/mongodb/
Run:
brew services stop mongodb-community
mongod --config /usr/local/etc/mongod.conf
mongod --repair --dbpath /usr/local/var/mongodb --storageEngine wiredTiger
brew services restart mongodb/brew/mongodb-community
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
Then run 'mongosh':
Current Mongosh Log ID: 63d12734740a00eef4b7d5f3
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.2
Using MongoDB: 6.0.4
Using Mongosh: 1.6.2
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
------
The server generated these startup warnings when booting
2023-01-25T12:57:12.608+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
------
------
Enable MongoDB's free cloud-based monitoring service, which will then receive and display
metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you
and anyone you share the URL with. MongoDB may use this information to make product
improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring()
To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
------
Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded.
You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js.
test>
For anyone else finding this thread and still having issues with an M1 Mac, be sure Homebrew is properly (re)installed.
Homebrew uses different directories on M1 (/opt/homebrew) than Intel. And even though Brew won't complain, mongosh won't start if Brew was installed in the old intel directories and therefore mongo was installed in the wrong place as well.
See this post for details on how to properly install Homebrew on M1
then follow the official MongoDB install here and mongosh will properly connect.

mongod won't start after upgrade from 3 to 5

I'm running ubuntu 20.04 and did the following:
$ sudo apt purge '*mongo*
and
$ sudo apt install -y mongodb-org
everything appeared to install correclty but when I run $ sudo systemctl status mongod I get a failure
The log shows the following errors:
{"t":{"$date":"2022-07-28T04:58:05.912-07:00"},"s":"E", "c":"NETWORK", "id":23024, "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Operation not permitted"}}
{"t":{"$date":"2022-07-28T04:58:05.912-07:00"},"s":"F", "c":"-", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":1019}}
{"t":{"$date":"2022-07-28T04:58:05.912-07:00"},"s":"F", "c":"-", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
How do I fix?

error starting mongodb with brew start on macOS Catalina 10.15.6

I have tried a few troubleshoots to no avail. They don't seem to match my specific error. I start mongodb with
> brew services start mongodb-community
The terminal says it is succesfully started, but when i
> brew services
to check mongodb's status it says error. No explanation.
But if I open up a new terminal and run mongo, I do however get a more detailed error.
> connecting to: mongodb://127.0.0.1:27017/?
> compressors=disabled&gssapiServiceName=mongodb
> Error: couldn't connect to server 127.0.0.1:27017, connection
> attempt failed: SocketException: Error connecting to
> 127.0.0.1:27017 :: caused by :: Connection refused :
I have found a solution to this problem. The socket exception error is apparently being thrown because the root owns the
/tmp/mongodb-27017.sock
solution
sudo rm -rf /tmp/mongodb-27017.sock
re start mongodb with
brew services start mongodb-community#4.4
it will create a new
/tmp/mongodb-27017.sock
which is owned by user. You can check by
ls -lsah /tmp/mongodb-27017.sock
my output was then
0 srwx------ 1 userName wheel 0B Apr 8 12:05 /tmp/mongodb-27017.sock
where username was previously root.
my solution was found here
https://stackoverflow.com/a/62196227/15311479

MongoDB - couldn't connect to server 127.0.0.1:27017, caused by :Connection refused : connect#src/mongo/shell/mongo.js:374:17

I installed mongodb with homebrew and i use Mac OS Big Sur
when I start mongo db with
$ brew services start mongodb-community
It says that mongodb it successfully started but when i run
$ brew services list
The status of mongodb-community is "error" and if I try to type the command "mongo" in the cmd it gave me the problem explained in the title of this question:
MongoDB shell version v4.4.3
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:374:17
#(connect):2:6
exception: connect failed
exiting with code 1
I ran the following in command line to fix the problem.
mongod --dbpath /usr/local/var/mongodb
this was directly after a re-install.
The error message that clued me in was:
{"t":{"$date":"2021-04-22T11:33:48.608-04:00"},"s":"E", "c":"STORAGE", "id":20557, "ctx":"initandlisten","msg":"DBException in initAndListen, terminating","attr":{"error":"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."}}
more specifically
"error":"NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file."
if you want to run mongodb type on terminal:
mongod --dbpath /usr/local/var/mongodb
If it not works use only:
mongod
And if you want to make CRUD in your db via SHELL or TERMINAL, run this :
mongo
-Archlinux
Search for [.mongodb / mongosh /]
Give execute permission to config.

MongoDB-Community not starting on Mac and giving errors

I am writing to inform that i had installed mongodb-community some time back using brew (High Sierra) and it was running. Then recently i upgraded and it doesn't seem to wire up. When i am running mongo in terminal, I am getting error:
MongoDB shell version v4.4.0
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect#src/mongo/shell/mongo.js:362:17
#(connect):2:6
exception: connect failed
exiting with code 1
When i checked logs for starting the mongodb-community service, I am getting following error:
{"t":{"$date":"2020-09-04T21:01:35.015-07:00"},"s":"W", "c":"CONTROL", "id":20698, "ctx":"main","msg":"***** SERVER RESTARTED *****","tags":["startupWarnings"]}
{"t":{"$date":"2020-09-04T21:01:35.021-07:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2020-09-04T21:01:35.027-07:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2020-09-04T21:01:35.027-07:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2020-09-04T21:01:35.028-07:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":58706,"port":27017,"dbPath":"/Users/my_username/homebrew/var/mongodb","architecture":"64-bit","host":"SC-*"}}
{"t":{"$date":"2020-09-04T21:01:35.029-07:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.0","gitVersion":"563487e100c4215e2dce98d0af2a6a5a2d67c5cf","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2020-09-04T21:01:35.029-07:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"17.7.0"}}}
{"t":{"$date":"2020-09-04T21:01:35.029-07:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/Users/my_username/homebrew/etc/mongod.conf","net":{"bindIp":"127.0.0.1"},"storage":{"dbPath":"/Users/my_username/homebrew/var/mongodb"},"systemLog":{"destination":"file","logAppend":true,"path":"/Users/my_username/homebrew/var/log/mongodb/mongo.log"}}}}
{"t":{"$date":"2020-09-04T21:01:35.038-07:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/Users/my_username/homebrew/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2020-09-04T21:01:35.038-07:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=7680M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
{"t":{"$date":"2020-09-04T21:01:36.177-07:00"},"s":"W", "c":"STORAGE", "id":22347, "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}
{"t":{"$date":"2020-09-04T21:01:36.178-07:00"},"s":"F", "c":"STORAGE", "id":28595, "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"45: Operation not supported"}}
{"t":{"$date":"2020-09-04T21:01:36.178-07:00"},"s":"F", "c":"-", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":1100}}
{"t":{"$date":"2020-09-04T21:01:36.178-07:00"},"s":"F", "c":"-", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
Can i please seek your help in fixing this? I am not having sudo rights and can't upgrade the OS, but am open to use mongo using any method
similar issue, final worked solution:
uninstall (latest, but not worked version: 4.4.3)
brew uninstall mongodb-community
reinstall, old but worked 4.2.1
brew install mongodb-community#4.2
run
for now: brew services run mongodb-community#4.2
for now and set bootable: brew services start mongodb-community#4.2
check status
brew services
The log is telling you what is going on
"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."
So you may want to read documentation of your old mongoDB version to see if it is upgradeable to version 4.4.0, if it is not, consider upgrading to a most recent version that is compatible with the WiredTiger version you are currently using
This link might be useful. To upgrade to mongoDB v4.0 or above you must be running at least mongoDB v3.6, otherwise you will have to to upgrade to v3.6 first
uninstall mongodb
remove /var/lib/mongodb/ # because WiredTiger was not uninstalled cleanly
reinstall mongodb
Had same issue it occurred when my mongodb docker container restarted. What I did was remove mongod.lock its in the root folder where database data is stored.
Try the following steps:
first copy your database folder to be sure you have a backup.
then execute the following command:
mongod --dbpath /data/db --repair
check now if it works, if it still does not work
try to temporarily move the mongod.lock to some other location to test if the mongod.lock is causing the issue. Start mongodb and check if it works. If it does not you should downgrade.
To downgrade to the correct version you can do the following:
bsondump mongo/diagnostic.data/metrics.2021-10-06T08-41-05Z-00000 | jq -s '.[] | select(.type == {"$numberInt": "0"})| .doc.buildInfo.version'
Keep in mind that the metrics file can have a different date this is just an example.
After you have the version you can start your container with that specific version and it should work.