0

Following Install MongoDB Community Edition on macOS:

Started like this: brew services start mongodb-community@6.0

no error was raised, but when I do: brew services list

kukodajanos@Kukodas-MacBook-Pro ~ % brew services list
Name                  Status      User        File
mongodb-community     error  3584 kukodajanos ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
mongodb-community@4.2 error  3584 kukodajanos ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community@4.2.plist
  1. I stopped and restarted.
  2. Reinstalled community edition
  3. Restarted my computer
  4. did sudo chmod 777 /tmp/mongodb-27017.sock

What else I can do?

See this in the logs, what is wrong?

kukodajanos@Kukodas-MacBook-Pro ~ % tail /opt/homebrew/var/log/mongodb/mongo.log 
{"t":{"$date":"2022-11-21T11:32:37.516+01:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/opt/homebrew/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2022-11-21T11:32:37.516+01:00"},"s":"W",  "c":"STORAGE",  "id":22302,   "ctx":"initandlisten","msg":"Recovering data from the last clean checkpoint."}
{"t":{"$date":"2022-11-21T11:32:37.516+01: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-11-21T11:32:38.130+01:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1669026758:130299][4360:0x109930580], 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: /opt/homebrew/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}

Found this too: https://stackoverflow.com/a/60605550/239219

But databases in my case are not under /var/lib/

Are the files belong to mongodb-community@6.0 these?

kukodajanos@Kukodas-MacBook-Pro ~ % brew list mongodb-community@6.0
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/install_compass
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/mongod
/opt/homebrew/Cellar/mongodb-community/6.0.1/bin/mongos
/opt/homebrew/Cellar/mongodb-community/6.0.1/homebrew.mxcl.mongodb-community.plist
/opt/homebrew/Cellar/mongodb-community/6.0.1/MPL-2
/opt/homebrew/Cellar/mongodb-community/6.0.1/THIRD-PARTY-NOTICES

Tried this also:

kukodajanos@Kukodas-MacBook-Pro ~ % sudo chown -R mongodb:mongodb /opt/homebrew/var/mongodb
chown: mongodb: illegal group name
0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.