Unable to start mongo instance on Mac OS Monterrey 12.6 using homebrew

I have installed mongodb with homebrew following the guidelines here, but for some reason I cannot start my mongo instance I get the following error when running brew services run mongodb-community

before I didn’t have that error, but some type of update happened that I can no longer run my mongo instance

Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /usr/local/opt/mongodb-community/homebrew.mxcl.mongodb-community.plist` exited with 5.

mongo logs inside /usr/local/var/log/mongodb

{"t":{"$date":"2022-09-13T17:27:48.638+02:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2022-09-13T17:27:48.643+02:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"-","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-09-13T17:27:48.648+02: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":"2022-09-13T17:27:48.666+02:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2022-09-13T17:27:48.673+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2022-09-13T17:27:48.673+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2022-09-13T17:27:48.673+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2022-09-13T17:27:48.673+02:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2022-09-13T17:27:48.673+02:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":21736,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"DSs-MacBook-Pro.local"}}
{"t":{"$date":"2022-09-13T17:27:48.673+02: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-09-13T17:27:48.673+02:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"21.6.0"}}}
{"t":{"$date":"2022-09-13T17:27:48.673+02: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-09-13T17:27:48.674+02:00"},"s":"E",  "c":"NETWORK",  "id":23024,   "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Permission denied"}}
{"t":{"$date":"2022-09-13T17:27:48.674+02:00"},"s":"F",  "c":"ASSERT",   "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":1120}}
{"t":{"$date":"2022-09-13T17:27:48.674+02:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

It says permission denied on that TMP file
Check ownership of this file
ls -lrt /tmp/mongodb-27017.sock
Check if you have any mongod running
ps -ef|grep mongod or try mongo/mongosh depending on your shell
If you can connect means mongod is up
Looks like you brought up mongod as root
If TMP file is owned by root shutdown all mongods and remove that TMP.sock file and start your service again

In addition to the advice that Ramachandra provided, if mongod had been started by root it’s highly probable that the data and log files/directories are also owned by the root user. You will need to check those as well and change the ownership of those before mongod will run as your normal user.

Thanks @Ramachandra_Tummala and @Doug_Duncan for the reply I’m a frontend developer so I don’t have too much experience with this sort of thing, so I might need your help a bit more.

When I do ls -lrt /tmp/mongodb-27017.sock

I get the following srwx------ 1 root wheel 0 Sep 15 11:37 /tmp/mongodb-27017.sock
so I guess the owner of this is root

I deleted the mongodb-27017.sock and restarted the service (I have stopped all services before this)

When I check the ownership again, now I get srwx------ 1 ds wheel 0 Sep 15 11:48 /tmp/mongodb-27017.sock (ds == my user)

But I’m still unable to start the mongo-community though.

I get the following error:

{"t":{"$date":"2022-09-15T11:48:25.621+02:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2022-09-15T11:48:25.627+02:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"-","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-09-15T11:48:25.639+02: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":"2022-09-15T11:48:25.639+02:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2022-09-15T11:48:25.643+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2022-09-15T11:48:25.643+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2022-09-15T11:48:25.643+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2022-09-15T11:48:25.643+02:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2022-09-15T11:48:25.643+02:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":4834,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"DSs-MacBook-Pro.local"}}
{"t":{"$date":"2022-09-15T11:48:25.644+02: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-09-15T11:48:25.644+02:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"21.6.0"}}}
{"t":{"$date":"2022-09-15T11:48:25.644+02: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-09-15T11:48:25.645+02: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-09-15T11:48:25.645+02: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-09-15T11:48:25.646+02:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3584M,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-09-15T11:48:26.070+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1663235306:69670][4834:0x11c7a5600], 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-09-15T11:48:26.072+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1663235306:72132][4834:0x11c7a5600], 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-09-15T11:48:26.072+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1663235306:72436][4834:0x11c7a5600], 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-09-15T11:48:26.072+02: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-09-15T11:48:26.072+02:00"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"13: Permission denied"}}
{"t":{"$date":"2022-09-15T11:48:26.072+02: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-09-15T11:48:26.072+02:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

This is my mongod.conf I have the following inside

systemLog:
  destination: file
  path: /usr/local/var/log/mongodb/mongo.log
  logAppend: true
storage:
  dbPath: /usr/local/var/mongodb
net:
  bindIp: 127.0.0.1

And this are the permissions for `usr/local/var/…

drwxrwxr-x    7 ds    admin   224B Sep 13 14:13 .
drwxr-xr-x   18 root  wheel   576B Sep 13 14:13 ..
drwxr-xr-x    3 ds    admin    96B Nov  5  2020 cache
drwxrwxr-x    4 ds    admin   128B Feb 24  2020 homebrew
drwxr-xr-x    3 ds    admin    96B Nov 16  2020 log
drwxr-xr-x  136 ds    admin   4.3K Sep 15 11:37 mongodb
drwxr-xr-x    3 ds    admin    96B Sep 13 14:13 run

The above lines show that you’re still having permission problems. This time on files in the data directory (/uar/local/var/mongodb/). My guess is that the files under this path are owned by the root user as well. To check run ls -alh /usr/local/var/mongodb/*. If things are owned by the root user, then you would either need to delete them or change the ownership of the files.

I’m assuming you installed via brew and then started the mongod as the root user and that’s why all the permissions are messed up. You should never run (almost) any service as the root user, and only then if you understand, and are willing to accept, the risks involved with doing so.

2 Likes

When I run ls -alh /usr/local/var/mongodb/*

I get the following:

-rw-------  1 ds    admin    47B Nov 16  2020 /usr/local/var/mongodb/WiredTiger
-rw-------  1 ds    admin    21B Nov 16  2020 /usr/local/var/mongodb/WiredTiger.lock
-rw-------  1 root  admin   1.3K Sep 15 11:37 /usr/local/var/mongodb/WiredTiger.turtle
-rw-------  1 ds    admin   424K Sep 15 11:37 /usr/local/var/mongodb/WiredTiger.wt
-rw-------  1 ds    admin    12K Sep 15 11:37 /usr/local/var/mongodb/WiredTigerHS.wt
-rw-------  1 ds    admin    44K Sep 15 11:37 /usr/local/var/mongodb/_mdb_catalog.wt
-rw-------  1 ds    admin    32K Sep 15 11:37 /usr/local/var/mongodb/collection-0--5484561422099317879.wt
-rw-------  1 ds    admin   4.0K Aug 16 17:50 /usr/local/var/mongodb/collection-0--8938186976542024012.wt
-rw-------  1 ds    admin    44K Aug 30 12:20 /usr/local/var/mongodb/collection-0-6646607318980365885.wt
-rw-------  1 ds    admin    36K Aug  4 10:27 /usr/local/var/mongodb/collection-0-828309438715058860.wt
-rw-------  1 ds    admin   4.0K Aug 16 17:50 /usr/local/var/mongodb/collection-1--8938186976542024012.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-177-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-178-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-179-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-180-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-185-997841842072881824.wt
-rw-------  1 ds    admin    36K Aug 31 13:35 /usr/local/var/mongodb/collection-186--6760981820974790918.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-186-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-187-997841842072881824.wt
-rw-------  1 ds    admin    36K Aug 31 13:46 /usr/local/var/mongodb/collection-188--6760981820974790918.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-188-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-193-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/collection-194-997841842072881824.wt
-rw-------  1 ds    admin    52K Aug  4 10:28 /usr/local/var/mongodb/collection-2--5484561422099317879.wt
-rw-------  1 ds    admin   4.0K Aug 16 17:50 /usr/local/var/mongodb/collection-2--8938186976542024012.wt
-rw-------  1 ds    admin    60K Aug 31 13:46 /usr/local/var/mongodb/collection-2-236702729281165765.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-2-7829836989468010820.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-237--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-238--3421962067213660962.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-24-4461830987773809247.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-240--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-241--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-243--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-244--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-245--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-246--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-247--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-248--3421962067213660962.wt
-rw-------  1 ds    admin    36K Aug  4 10:27 /usr/local/var/mongodb/collection-3--4968984876227865773.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-30--7761360505503786663.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-32--7761360505503786663.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-34--7761360505503786663.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-3771--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-3772--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jun 15 15:44 /usr/local/var/mongodb/collection-3778--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jun 15 15:44 /usr/local/var/mongodb/collection-3779--3383466982208816242.wt
-rw-------  1 ds    admin    12K Aug  4 10:27 /usr/local/var/mongodb/collection-3798--3383466982208816242.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-3800--3383466982208816242.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-3802--3383466982208816242.wt
-rw-------  1 ds    admin    12K Sep  1 14:39 /usr/local/var/mongodb/collection-4--5484561422099317879.wt
-rw-------  1 ds    admin    12K Aug  4 10:27 /usr/local/var/mongodb/collection-4-8395434167465204535.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-442-285365223316158836.wt
-rw-------  1 ds    admin   3.3M Aug  4 10:27 /usr/local/var/mongodb/collection-454--3592809970845984021.wt
-rw-------  1 ds    admin   3.3M Aug  4 10:27 /usr/local/var/mongodb/collection-456--3592809970845984021.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/collection-6-8395434167465204535.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-761-6865724622955516652.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-765-6865724622955516652.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-767-6865724622955516652.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/collection-769-6865724622955516652.wt
-rw-------  1 ds    admin    44K Aug 31 13:46 /usr/local/var/mongodb/collection-8-7829836989468010820.wt
-rw-------  1 ds    admin   7.2M Aug  4 10:27 /usr/local/var/mongodb/collection-80--7761360505503786663.wt
-rw-------  1 ds    admin    32K Sep 15 11:37 /usr/local/var/mongodb/index-1--5484561422099317879.wt
-rw-------  1 ds    admin    36K Aug 30 12:20 /usr/local/var/mongodb/index-1-6646607318980365885.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-1-828309438715058860.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-10--4968984876227865773.wt
-rw-------  1 ds    admin    36K Aug 31 13:35 /usr/local/var/mongodb/index-118-6865724622955516652.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-181-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-182-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-183-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-184-997841842072881824.wt
-rw-------  1 ds    admin    36K Aug 31 13:35 /usr/local/var/mongodb/index-187--6760981820974790918.wt
-rw-------  1 ds    admin    36K Aug 31 13:46 /usr/local/var/mongodb/index-189--6760981820974790918.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-189-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-190-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-191-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-192-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-196-997841842072881824.wt
-rw-------  1 ds    admin   4.0K Jun 21 17:24 /usr/local/var/mongodb/index-197-997841842072881824.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-2-828309438715058860.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-239--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-242--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-249--3421962067213660962.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-25-4461830987773809247.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-250--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-251--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-252--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-253--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-254--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-255--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-256--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-257--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-258--3421962067213660962.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-259--3421962067213660962.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-26-4461830987773809247.wt
-rw-------  1 ds    admin    36K Aug  4 10:28 /usr/local/var/mongodb/index-3--5484561422099317879.wt
-rw-------  1 ds    admin    44K Aug 31 13:46 /usr/local/var/mongodb/index-3-236702729281165765.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-3-7829836989468010820.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-31--7761360505503786663.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-33--7761360505503786663.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-35--7761360505503786663.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-3773--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-3774--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-3775--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-3776--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-3777--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jun 15 15:44 /usr/local/var/mongodb/index-3780--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jun 15 15:44 /usr/local/var/mongodb/index-3781--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jun 15 15:44 /usr/local/var/mongodb/index-3782--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jun 15 15:44 /usr/local/var/mongodb/index-3783--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Jun 15 15:44 /usr/local/var/mongodb/index-3784--3383466982208816242.wt
-rw-------  1 ds    admin    12K Aug  4 10:27 /usr/local/var/mongodb/index-3799--3383466982208816242.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-3801--3383466982208816242.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-3803--3383466982208816242.wt
-rw-------  1 ds    admin   4.0K Aug 16 17:50 /usr/local/var/mongodb/index-4--8938186976542024012.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-443-285365223316158836.wt
-rw-------  1 ds    admin   492K Aug  4 10:27 /usr/local/var/mongodb/index-455--3592809970845984021.wt
-rw-------  1 ds    admin   492K Aug  4 10:27 /usr/local/var/mongodb/index-457--3592809970845984021.wt
-rw-------  1 ds    admin    12K Sep  1 14:39 /usr/local/var/mongodb/index-5--5484561422099317879.wt
-rw-------  1 ds    admin   4.0K Aug 16 17:50 /usr/local/var/mongodb/index-5--8938186976542024012.wt
-rw-------  1 ds    admin    12K Aug  4 10:27 /usr/local/var/mongodb/index-5-8395434167465204535.wt
-rw-------  1 ds    admin    12K Sep  1 15:14 /usr/local/var/mongodb/index-6--5484561422099317879.wt
-rw-------  1 ds    admin   4.0K Aug 16 17:50 /usr/local/var/mongodb/index-6--8938186976542024012.wt
-rw-------  1 ds    admin    32K Aug  4 10:27 /usr/local/var/mongodb/index-7-8395434167465204535.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-762-6865724622955516652.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-766-6865724622955516652.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-768-6865724622955516652.wt
-rw-------  1 ds    admin   4.0K Jul  6 12:13 /usr/local/var/mongodb/index-770-6865724622955516652.wt
-rw-------  1 ds    admin   508K Aug  4 10:27 /usr/local/var/mongodb/index-81--7761360505503786663.wt
-rw-------  1 ds    admin    44K Aug 31 13:46 /usr/local/var/mongodb/index-9-7829836989468010820.wt
-rw-------  1 ds    admin     0B Sep 15 11:37 /usr/local/var/mongodb/mongod.lock
-rw-------  1 ds    admin    52K Sep 15 11:37 /usr/local/var/mongodb/sizeStorer.wt
-rw-------  1 ds    admin   114B Nov 16  2020 /usr/local/var/mongodb/storage.bson

/usr/local/var/mongodb/diagnostic.data:
total 400800
drwx------   35 ds  admin   1.1K Sep  1 15:14 .
drwxr-xr-x  136 ds  admin   4.3K Sep 15 11:37 ..
-rw-------    1 ds  admin   8.2M Nov 29  2021 metrics.2021-11-18T11-49-09Z-00000
-rw-------    1 ds  admin   1.2M Nov 30  2021 metrics.2021-11-29T14-41-45Z-00000
-rw-------    1 ds  admin    10M Dec 14  2021 metrics.2021-11-30T14-16-00Z-00000
-rw-------    1 ds  admin    10M Jan  1  2022 metrics.2021-12-14T09-18-59Z-00000
-rw-------    1 ds  admin    10M Jan 15  2022 metrics.2022-01-01T16-09-07Z-00000
-rw-------    1 ds  admin   8.9M Jan 25  2022 metrics.2022-01-15T10-11-43Z-00000
-rw-------    1 ds  admin   3.4M Jan 31  2022 metrics.2022-01-25T16-09-27Z-00000
-rw-------    1 ds  admin   1.7M Feb  1  2022 metrics.2022-01-31T12-45-14Z-00000
-rw-------    1 ds  admin    10M Feb 13  2022 metrics.2022-02-01T13-04-03Z-00000
-rw-------    1 ds  admin   4.0M Feb 16  2022 metrics.2022-02-13T14-12-22Z-00000
-rw-------    1 ds  admin   1.1M Feb 17  2022 metrics.2022-02-16T18-39-49Z-00000
-rw-------    1 ds  admin   7.0M Feb 24  2022 metrics.2022-02-17T13-36-11Z-00000
-rw-------    1 ds  admin    10M Mar  7  2022 metrics.2022-02-24T12-53-15Z-00000
-rw-------    1 ds  admin   4.0M Mar 11  2022 metrics.2022-03-07T10-52-13Z-00000
-rw-------    1 ds  admin    10M Mar 25 08:58 metrics.2022-03-14T11-48-19Z-00000
-rw-------    1 ds  admin   1.2M Mar 28 10:00 metrics.2022-03-25T07-58-11Z-00000
-rw-------    1 ds  admin    10M Apr  7 12:57 metrics.2022-03-28T08-04-37Z-00000
-rw-------    1 ds  admin    10M Apr 16 11:41 metrics.2022-04-07T10-57-17Z-00000
-rw-------    1 ds  admin    10M Apr 26 09:42 metrics.2022-04-16T09-41-27Z-00000
-rw-------    1 ds  admin   8.7M May  5 13:05 metrics.2022-04-26T07-42-58Z-00000
-rw-------    1 ds  admin    90K May  5 13:31 metrics.2022-05-05T11-05-16Z-00000
-rw-------    1 ds  admin   1.8M May  8 22:06 metrics.2022-05-05T13-06-17Z-00000
-rw-------    1 ds  admin    10M May 19 19:38 metrics.2022-05-09T12-10-40Z-00000
-rw-------    1 ds  admin    10M Jun 15 13:19 metrics.2022-05-19T17-38-50Z-00000
-rw-------    1 ds  admin   158K Jun 15 15:44 metrics.2022-06-15T11-19-30Z-00000
-rw-------    1 ds  admin   5.2M Jun 21 17:24 metrics.2022-06-16T07-45-34Z-00000
-rw-------    1 ds  admin   7.8M Jul  6 12:13 metrics.2022-06-27T09-46-37Z-00000
-rw-------    1 ds  admin    13K Jul  6 12:14 metrics.2022-07-06T10-14-28Z-00000
-rw-------    1 ds  admin   909K Jul 19 10:16 metrics.2022-07-18T08-41-51Z-00000
-rw-------    1 ds  admin    10M Aug 22 21:04 metrics.2022-08-04T08-27-31Z-00000
-rw-------    1 ds  admin    10M Sep  1 11:53 metrics.2022-08-22T19-04-17Z-00000
-rw-------    1 ds  admin   449K Sep  1 15:13 metrics.2022-09-01T09-53-05Z-00000
-rw-------    1 ds  admin    10K Sep  1 15:14 metrics.interim

/usr/local/var/mongodb/journal:
total 24
drwx------    5 ds    admin   160B Sep 15 11:37 .
drwxr-xr-x  136 ds    admin   4.3K Sep 15 11:37 ..
-rw-------    1 root  admin   100M Sep 15 11:37 WiredTigerLog.0000000048
-rw-------    1 root  admin   100M Sep 15 11:37 WiredTigerPreplog.0000000001
-rw-------    1 root  admin   100M Sep 15 11:37 WiredTigerPreplog.0000000002

So I have 4 files owned by root

-rw-------  1 root  admin   1.3K Sep 15 11:37 /usr/local/var/mongodb/WiredTiger.turtle
-rw-------    1 root  admin   100M Sep 15 11:37 WiredTigerLog.0000000048
-rw-------    1 root  admin   100M Sep 15 11:37 WiredTigerPreplog.0000000001
-rw-------    1 root  admin   100M Sep 15 11:37 WiredTigerPreplog.0000000002

How can I change the permissions back to my user ?

I did installed mongod with brew but don’t remmeber running anything as root mosty likely I types something by mistake without knowing

@Doug_Duncan I guess I can change ownership of a filme with chown <$USER> <fileName> ??

You would need to run the following commands:

sudo chown ds /usr/local/var/mongodb/WiredTiger.turtle
sudo chown ds /usr/local/var/mongodb/journal/WiredTiger*
2 Likes

Ok this work, I changed all file permissions,

Howeever still unable to run mongod

{"t":{"$date":"2022-09-15T15:52:43.582+02:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2022-09-15T15:52:43.601+02:00"},"s":"I",  "c":"CONTROL",  "id":23285,   "ctx":"-","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2022-09-15T15:52:43.601+02:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"-","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-09-15T15:52:43.605+02:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2022-09-15T15:52:43.611+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2022-09-15T15:52:43.611+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2022-09-15T15:52:43.611+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"main","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"ShardSplitDonorService","namespace":"config.tenantSplitDonors"}}
{"t":{"$date":"2022-09-15T15:52:43.611+02:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"main","msg":"Multi threading initialized"}
{"t":{"$date":"2022-09-15T15:52:43.611+02:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":16054,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"DSs-MacBook-Pro.local"}}
{"t":{"$date":"2022-09-15T15:52:43.611+02: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-09-15T15:52:43.611+02:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"21.6.0"}}}
{"t":{"$date":"2022-09-15T15:52:43.611+02: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-09-15T15:52:43.615+02: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-09-15T15:52:43.616+02: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-09-15T15:52:43.617+02:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3584M,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-09-15T15:52:44.627+02:00"},"s":"I",  "c":"STORAGE",  "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":1010}}
{"t":{"$date":"2022-09-15T15:52:44.628+02:00"},"s":"I",  "c":"RECOVERY", "id":23987,   "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2022-09-15T15:52:44.629+02:00"},"s":"I",  "c":"WT",       "id":4366408, "ctx":"initandlisten","msg":"No table logging settings modifications are required for existing WiredTiger tables","attr":{"loggingEnabled":true}}
{"t":{"$date":"2022-09-15T15:52:44.710+02:00"},"s":"W",  "c":"CONTROL",  "id":22120,   "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
{"t":{"$date":"2022-09-15T15:52:44.717+02: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.4\" }. 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-09-15T15:52:44.717+02:00"},"s":"I",  "c":"REPL",     "id":4784900, "ctx":"initandlisten","msg":"Stepping down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":15000}}
{"t":{"$date":"2022-09-15T15:52:44.718+02:00"},"s":"I",  "c":"REPL",     "id":4794602, "ctx":"initandlisten","msg":"Attempting to enter quiesce mode"}
{"t":{"$date":"2022-09-15T15:52:44.718+02:00"},"s":"I",  "c":"-",        "id":6371601, "ctx":"initandlisten","msg":"Shutting down the FLE Crud thread pool"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"COMMAND",  "id":4784901, "ctx":"initandlisten","msg":"Shutting down the MirrorMaestro"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"SHARDING", "id":4784902, "ctx":"initandlisten","msg":"Shutting down the WaitForMajorityService"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"NETWORK",  "id":20562,   "ctx":"initandlisten","msg":"Shutdown: going to close listening sockets"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"NETWORK",  "id":4784905, "ctx":"initandlisten","msg":"Shutting down the global connection pool"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"CONTROL",  "id":4784906, "ctx":"initandlisten","msg":"Shutting down the FlowControlTicketholder"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"-",        "id":20520,   "ctx":"initandlisten","msg":"Stopping further Flow Control ticket acquisitions."}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"CONTROL",  "id":4784908, "ctx":"initandlisten","msg":"Shutting down the PeriodicThreadToAbortExpiredTransactions"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"REPL",     "id":4784909, "ctx":"initandlisten","msg":"Shutting down the ReplicationCoordinator"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"SHARDING", "id":4784910, "ctx":"initandlisten","msg":"Shutting down the ShardingInitializationMongoD"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"REPL",     "id":4784911, "ctx":"initandlisten","msg":"Enqueuing the ReplicationStateTransitionLock for shutdown"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"-",        "id":4784912, "ctx":"initandlisten","msg":"Killing all operations for shutdown"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"-",        "id":4695300, "ctx":"initandlisten","msg":"Interrupted all currently running operations","attr":{"opsKilled":3}}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"TENANT_M", "id":5093807, "ctx":"initandlisten","msg":"Shutting down all TenantMigrationAccessBlockers on global shutdown"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"COMMAND",  "id":4784913, "ctx":"initandlisten","msg":"Shutting down all open transactions"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"REPL",     "id":4784914, "ctx":"initandlisten","msg":"Acquiring the ReplicationStateTransitionLock for shutdown"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"INDEX",    "id":4784915, "ctx":"initandlisten","msg":"Shutting down the IndexBuildsCoordinator"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"NETWORK",  "id":4784918, "ctx":"initandlisten","msg":"Shutting down the ReplicaSetMonitor"}
{"t":{"$date":"2022-09-15T15:52:44.719+02:00"},"s":"I",  "c":"SHARDING", "id":4784921, "ctx":"initandlisten","msg":"Shutting down the MigrationUtilExecutor"}
{"t":{"$date":"2022-09-15T15:52:44.720+02:00"},"s":"I",  "c":"ASIO",     "id":22582,   "ctx":"MigrationUtil-TaskExecutor","msg":"Killing all outstanding egress activity."}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"COMMAND",  "id":4784923, "ctx":"initandlisten","msg":"Shutting down the ServiceEntryPoint"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"CONTROL",  "id":4784925, "ctx":"initandlisten","msg":"Shutting down free monitoring"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"CONTROL",  "id":4784927, "ctx":"initandlisten","msg":"Shutting down the HealthLog"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"CONTROL",  "id":4784928, "ctx":"initandlisten","msg":"Shutting down the TTL monitor"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"CONTROL",  "id":6278511, "ctx":"initandlisten","msg":"Shutting down the Change Stream Expired Pre-images Remover"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"CONTROL",  "id":4784929, "ctx":"initandlisten","msg":"Acquiring the global lock for shutdown"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"CONTROL",  "id":4784930, "ctx":"initandlisten","msg":"Shutting down the storage engine"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":22320,   "ctx":"initandlisten","msg":"Shutting down journal flusher thread"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":22321,   "ctx":"initandlisten","msg":"Finished shutting down journal flusher thread"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":22322,   "ctx":"initandlisten","msg":"Shutting down checkpoint thread"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":22323,   "ctx":"initandlisten","msg":"Finished shutting down checkpoint thread"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":20282,   "ctx":"initandlisten","msg":"Deregistering all the collections"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":22317,   "ctx":"initandlisten","msg":"WiredTigerKVEngine shutting down"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":22318,   "ctx":"initandlisten","msg":"Shutting down session sweeper thread"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":22319,   "ctx":"initandlisten","msg":"Finished shutting down session sweeper thread"}
{"t":{"$date":"2022-09-15T15:52:44.721+02:00"},"s":"I",  "c":"STORAGE",  "id":4795902, "ctx":"initandlisten","msg":"Closing WiredTiger","attr":{"closeConfig":"leak_memory=true,"}}
{"t":{"$date":"2022-09-15T15:52:44.975+02:00"},"s":"I",  "c":"STORAGE",  "id":4795901, "ctx":"initandlisten","msg":"WiredTiger closed","attr":{"durationMillis":254}}
{"t":{"$date":"2022-09-15T15:52:44.975+02:00"},"s":"I",  "c":"STORAGE",  "id":22279,   "ctx":"initandlisten","msg":"shutdown: removing fs lock..."}
{"t":{"$date":"2022-09-15T15:52:44.976+02:00"},"s":"I",  "c":"-",        "id":4784931, "ctx":"initandlisten","msg":"Dropping the scope cache for shutdown"}
{"t":{"$date":"2022-09-15T15:52:44.976+02:00"},"s":"I",  "c":"CONTROL",  "id":20565,   "ctx":"initandlisten","msg":"Now exiting"}
{"t":{"$date":"2022-09-15T15:52:44.976+02:00"},"s":"I",  "c":"CONTROL",  "id":23138,   "ctx":"initandlisten","msg":"Shutting down","attr":{"exitCode":62}}

the logs tell me

{"t":{"$date":"2022-09-15T15:52:44.717+02: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.4\" }. 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."}}

so don’t know is that’s still the cause or is the fact that when I try to run brew services list I still see mongodb-community error 15872 root ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist does this file also need to be owned by ds or root ?

You had an older version of MongoDB installed (4.4) that created the database files and you are now trying to run MongoDB 6.0.1 on your system. Below are the relevant log entries showing this:

Do you need the data from the older version? If not you can go into /usr/local/var/mongodb and delete all the files/folders. Those should get recreated the next time you start the mongod process. If you need/want to keep the data, then you would need to install MongoDB 5.0.x to let the FeatureCompatabilityVersion get updated to 5.0, and then you can reinstall MongoDB 6.0.

1 Like

The plist file should be owned by your user. It seems you’ve got you system in a weird state. I am not sure how that would have happened. I don’t think that there should be anything in your home directory that is not owned by you.

Ok, let me try those 2 things you mentioned and will come here an update.

1.deleting all the previous data (I can actually reimported again from a dump)
2. changing also the permissions on my home folder

If you have an m1 your location will be different (see SO post).

So:

sudo chown osUserName /opt/homebrew/var/mongodb/WiredTiger.turtle
sudo chown osUserName /opt/homebrew/var/mongodb/journal/WiredTiger*