1

Error message while starting the mongoDB service. Error:

Permission denied @ rb_sysopen - /Users/syedahmed/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist

I installed/reinstall the mongoDB couple times. But I am getting same problem

" error : permission denied"

I am using the community@4.2 edition in Mac OS Mojave 10.14

I have tried different ways after reading suggestions in stack overflow but nothing has worked.

I have installed following the instruction from mongoDB.

The services doesn't start.

how to config the username and password using config? I am not sure.

while installing from brew it did not ask for config any password or username.

brew services start mongodb-community@4.2

if I start service typing just: mongo Following error message comes:

MongoDB shell version v4.2.0 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb 2019-09-01T23:23:31.392-0400 E QUERY [js] 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:341:17 @(connect):2:6 2019-09-01T23:23:31.397-0400 F - [main] exception: connect failed 2019-09-01T23:23:31.397-0400 E - [main] exiting with code 1 –

  • what OS are you installing Mongo on? – Marcello Miorelli Sep 2 at 17:41
  • Have you noticed the Permission denied in the error messages? – Marcello Miorelli Sep 2 at 17:42
  • is this port number available: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused – Marcello Miorelli Sep 2 at 17:43
  • I am using the MacOS Mojave 10.14.5. I have installed using the brew. It goes to default folder. Even if you try with other version it also doesn't allow to access. – Syed Ahmed Sep 2 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.