MacOS Intel : about to fork child process, waiting until server is ready for connections, ERROR: child process failed, exited with 1

I have installed the mongodb community according the docs installation
But when I have tried the following command to run mongod I have this error message (and of course when I tried to connect to connect to mongoDB with mongosh the connection is refused) :

mongod --config /usr/local/etc/mongod.conf --fork
about to fork child process, waiting until server is ready for connections.
forked process: 5724
ERROR: child process failed, exited with 1

Where is the problem ? The mongod.conf is in the good path and I don’t know how to open this config file to see if there is some things to change.

You are trying to start mongod manually from cmd line
What does your install instructions say?
They would have asked you to run some brew commands
Check if any mongod is already running using command brew services list
If there is already a mongod running you cannot start another mongod on the same port

You can always do a cat on your config file to see what dirs it is using
You can start a mongod by giving different values other than default
mongod --port 29000 --logpath your_logpath --dbapath your_dbpath --fork
once it is up connect
mongosh --port 29000

1 Like

I have tried the “brew services list” and all my programs have the status ‘none’.

I have checked with “cat mongod.conf” and I have that :slight_smile:

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

So I have tried with this data with “mongod --port 29000 --dbpath /usr/local/var/mongodb --logpath /usr/local/var/log/mongodb/mongo.log --fork” and other ports and I have the same error.

The instruction I have folllowed are here : https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-os-x/

I have made

xcode-select --install
brew tap mongodb/brew
brew update
brew install mongodb-community@7.0

And after the command “mongod --config /usr/local/etc/mongod.conf --fork”

I have tried with “brew services start mongodb-community@7.0” just to see after if with “brew services list” I see mongodb is actived and I have a status error (even if in the message in the terminal just after the “brew services start mongodb” I had a “Successfully started mongodb-community (label: homebrew.mxcl.mongodb-commu”). I don’t know if is normal.

show output of
ls -lrt /usr/local/var/log/mongodb/mongo.log
cat /usr/local/var/log/mongodb/mongo.log
ls -lrt /usr/local/var/mongodb
The command i gave please run it with totally new logpath/dirpaths something like your home dir
You are using the same default/standard paths
If a logfile already exists mongod will fail
Once you start with brew services it should not go into error status

show output of
ls -lrt /usr/local/var/log/mongodb/mongo.log
cat /usr/local/var/log/mongodb/mongo.log
ls -lrt /usr/local/var/mongodb

I have that

ls -lrt /usr/local/var/log/mongodb/mongo.log
-rw-------  1 levequemaxime  admin  15941  3 avr 09:35 /usr/local/var/log/mongodb/mongo.log
cat /usr/local/var/log/mongodb/mongo.log
{"t":{"$date":"2024-04-02T15:30:22.844+02: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":"2024-04-02T15:30:22.855+02:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"thread1","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
{"t":{"$date":"2024-04-02T15:30:22.994+02:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"thread1","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2024-04-02T15:30:23.019+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2024-04-02T15:30:23.019+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2024-04-02T15:30:23.020+02:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"thread1","msg":"Multi threading initialized"}
{"t":{"$date":"2024-04-02T15:30:23.021+02:00"},"s":"I",  "c":"TENANT_M", "id":7091600, "ctx":"thread1","msg":"Starting TenantMigrationAccessBlockerRegistry"}
{"t":{"$date":"2024-04-02T15:30:23.022+02:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":9950,"port":28221,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"macbook-pro-de-leveque.home"}}
{"t":{"$date":"2024-04-02T15:30:23.023+02:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.2","gitVersion":"02b3c655e1302209ef046da6ba3ef6749dd0b62a","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2024-04-02T15:30:23.023+02:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"22.6.0"}}}
{"t":{"$date":"2024-04-02T15:30:23.023+02:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"port":28221},"processManagement":{"fork":true},"storage":{"dbPath":"/usr/local/var/mongodb"},"systemLog":{"destination":"file","path":"/usr/local/var/log/mongodb/mongo.log"}}}}
{"t":{"$date":"2024-04-02T15:30:23.029+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":"2024-04-02T15:30:23.049+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":"2024-04-02T15:30:23.056+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":"2024-04-02T15:30:23.547+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1712064623:530079][9950:0x7ff8468c67c0], 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 **), 819: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2024-04-02T15:30:23.557+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1712064623:557102][9950:0x7ff8468c67c0], 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 **), 819: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2024-04-02T15:30:23.559+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1712064623:559302][9950:0x7ff8468c67c0], 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 **), 819: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2024-04-02T15:30:23.560+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":"2024-04-02T15:30:23.561+02:00"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"13: Permission denied"}}
{"t":{"$date":"2024-04-02T15:30:23.562+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":675}}
{"t":{"$date":"2024-04-02T15:30:23.563+02:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

{"t":{"$date":"2024-04-02T15:32:41.152+02:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"thread1","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2024-04-02T15:32:41.359+02:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"thread1","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
{"t":{"$date":"2024-04-02T15:32:41.359+02: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":"2024-04-02T15:32:41.360+02:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"thread1","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2024-04-02T15:32:41.392+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2024-04-02T15:32:41.392+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2024-04-02T15:32:41.393+02:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"thread1","msg":"Multi threading initialized"}
{"t":{"$date":"2024-04-02T15:32:41.393+02:00"},"s":"I",  "c":"TENANT_M", "id":7091600, "ctx":"thread1","msg":"Starting TenantMigrationAccessBlockerRegistry"}
{"t":{"$date":"2024-04-02T15:32:41.394+02:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":10111,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"macbook-pro-de-leveque.home"}}
{"t":{"$date":"2024-04-02T15:32:41.395+02:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.2","gitVersion":"02b3c655e1302209ef046da6ba3ef6749dd0b62a","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2024-04-02T15:32:41.395+02:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"22.6.0"}}}
{"t":{"$date":"2024-04-02T15:32:41.395+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":"2024-04-02T15:32:41.396+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":"2024-04-02T15:32:41.396+02:00"},"s":"F",  "c":"ASSERT",   "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/asio/asio_transport_layer.cpp","line":1202}}
{"t":{"$date":"2024-04-02T15:32:41.396+02:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

{"t":{"$date":"2024-04-03T09:35:17.070+02:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"thread1","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2024-04-03T09:35:17.178+02:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"thread1","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":21},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":21},"outgoing":{"minWireVersion":6,"maxWireVersion":21},"isInternalClient":true}}}
{"t":{"$date":"2024-04-03T09:35:17.327+02: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":"2024-04-03T09:35:17.333+02:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"thread1","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2024-04-03T09:35:17.391+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationDonorService","namespace":"config.tenantMigrationDonors"}}
{"t":{"$date":"2024-04-03T09:35:17.392+02:00"},"s":"I",  "c":"REPL",     "id":5123008, "ctx":"thread1","msg":"Successfully registered PrimaryOnlyService","attr":{"service":"TenantMigrationRecipientService","namespace":"config.tenantMigrationRecipients"}}
{"t":{"$date":"2024-04-03T09:35:17.393+02:00"},"s":"I",  "c":"CONTROL",  "id":5945603, "ctx":"thread1","msg":"Multi threading initialized"}
{"t":{"$date":"2024-04-03T09:35:17.393+02:00"},"s":"I",  "c":"TENANT_M", "id":7091600, "ctx":"thread1","msg":"Starting TenantMigrationAccessBlockerRegistry"}
{"t":{"$date":"2024-04-03T09:35:17.393+02:00"},"s":"I",  "c":"CONTROL",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":506,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"macbook-pro-de-leveque.home"}}
{"t":{"$date":"2024-04-03T09:35:17.394+02:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"7.0.2","gitVersion":"02b3c655e1302209ef046da6ba3ef6749dd0b62a","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2024-04-03T09:35:17.394+02:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"22.6.0"}}}
{"t":{"$date":"2024-04-03T09:35:17.394+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":"2024-04-03T09:35:17.438+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":"2024-04-03T09:35:17.464+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":"2024-04-03T09:35:17.465+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":"2024-04-03T09:35:18.294+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1712129718:232909][506:0x7ff8555f87c0], 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 **), 819: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2024-04-03T09:35:18.305+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1712129718:304130][506:0x7ff8555f87c0], 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 **), 819: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2024-04-03T09:35:18.309+02:00"},"s":"E",  "c":"WT",       "id":22435,   "ctx":"initandlisten","msg":"WiredTiger error message","attr":{"error":13,"message":"[1712129718:309785][506:0x7ff8555f87c0], 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 **), 819: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied"}}
{"t":{"$date":"2024-04-03T09:35:18.310+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":"2024-04-03T09:35:18.310+02:00"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"13: Permission denied"}}
{"t":{"$date":"2024-04-03T09:35:18.310+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":675}}
{"t":{"$date":"2024-04-03T09:35:18.310+02:00"},"s":"F",  "c":"ASSERT",   "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
ls -lrt /usr/local/var/mongodb
total 1712
-rw-rwx---    1 levequemaxime  admin     21 10 sep  2020 WiredTiger.lock
-rw-rwx---    1 levequemaxime  admin     47 10 sep  2020 WiredTiger
-rw-rwx---    1 levequemaxime  admin    114 10 sep  2020 storage.bson
drwxrwxr-x    3 levequemaxime  admin     96 10 sep  2020 data
-rw-rwx---    1 levequemaxime  admin  36864  1 oct  2020 index-5-609642659574316097.wt
-rw-rwx---    1 levequemaxime  admin  36864  1 oct  2020 index-3-609642659574316097.wt
-rw-rwx---    1 levequemaxime  admin  20480  1 oct  2020 index-1-609642659574316097.wt
-rw-rwx---    1 levequemaxime  admin  36864  1 oct  2020 collection-4-609642659574316097.wt
-rw-rwx---    1 levequemaxime  admin  36864  8 nov  2020 index-1--9165792814349190336.wt
-rw-rwx---    1 levequemaxime  admin  36864  8 nov  2020 collection-0--9165792814349190336.wt
-rw-rwx---    1 levequemaxime  admin  36864 14 nov  2020 index-6-609642659574316097.wt
-rw-rwx---    1 levequemaxime  admin  36864 17 nov  2020 collection-2-609642659574316097.wt
-rw-rwx---    1 levequemaxime  admin  20480 17 nov  2020 collection-0-609642659574316097.wt
drwxrwx---  131 levequemaxime  admin   4192 19 nov 16:38 diagnostic.data
-rw-------    1 levequemaxime  admin  36864 19 nov 16:38 index-1--5845530003528880003.wt
-rw-------    1 levequemaxime  admin  36864 19 nov 16:38 collection-0--5845530003528880003.wt
-rw-------    1 levequemaxime  admin  36864 19 nov 16:38 index-2--5845530003528880003.wt
-rw-rwx---    1 levequemaxime  admin  36864 19 nov 16:38 collection-4-8424902596157467721.wt
-rw-rwx---    1 levequemaxime  admin  36864 19 nov 16:38 index-5-8424902596157467721.wt
-rw-rwx---    1 levequemaxime  admin  36864 19 nov 16:38 index-6-8424902596157467721.wt
-rw-rwx---    1 levequemaxime  admin  36864 19 nov 16:38 index-3-8424902596157467721.wt
-rw-rwx---    1 levequemaxime  admin  90112 19 nov 16:38 collection-2-8424902596157467721.wt
drwxrwx---    5 levequemaxime  admin    160  2 avr 10:19 journal
-rw-rwx---    1 levequemaxime  admin  20480  2 avr 10:19 collection-0-8424902596157467721.wt
-rw-rwx---    1 levequemaxime  admin  20480  2 avr 10:19 index-1-8424902596157467721.wt
-rw-rwx---    1 levequemaxime  admin  36864  2 avr 10:19 _mdb_catalog.wt
-rw-rwx---    1 levequemaxime  admin  36864  2 avr 10:19 sizeStorer.wt
-rw-rwx---    1 levequemaxime  admin   4096  2 avr 10:19 WiredTigerHS.wt
-rw-------    1 root           admin   1285  2 avr 10:19 WiredTiger.turtle
-rw-rwx---    1 levequemaxime  admin  94208  2 avr 10:19 WiredTiger.wt
-rw-rwx---    1 levequemaxime  admin      0  2 avr 10:19 mongod.lock

The command i gave please run it with totally new logpath/dirpaths something like your home dir
You are using the same default/standard paths
If a logfile already exists mongod will fail

but with this command “mongod --port 29000 --logpath your_logpath --dbapath your_dbpath --fork” it aks a precise logfile and path no ? What kind of paths I can give it ?

It clearly says permission issues
Your mongod wt files should be owned by mongod but they are all owned by your user id and the timestamps look very old
Did you have a working mongodb before at same dbpath?
Better to clean dbpath,logpath,tmp files and restart with service if you don’t need those old files
Regarding manual run just give your home dir or create a test dir under your home dir and give full permissions
Whichever dirpath you give your mongod should be able to write to it
Also check this thread.Not a Mac install but concepts are same regarding ownership/permissions etc

My mongodb server failing to start/restart

Ok I managed !

I have created an empty directory ‘test’ in /usr/local/var/mongodb and after I run the command

mongod --dbpath /usr/local/var/mongodb/test --logpath /usr/local/var/mongodb/test/mongo.log --fork

and that works and I can connect normally in mongodb with mongosh, thanks !

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.