Need assistance getting mongodb to run. Im new to this and following a udemy course. The instructor and I are unsure how to continue. He says he doesn't see a specific issue

This is what pops up when trying to run this command in the console. Im using a Mac. I have mongodb installed in my users folder and I have the mongodata folder which houses the information created after running the command. What should happen after running the command is that my new database should be up and running according to video in my udemy course for my notes app. I would appreciate any help or guidance. Thank you.

bs@BSs-MacBook-Air ~ % ls
Applications Desktop Documents Downloads Library Movies Music Pictures Projects Public mongodata mongodb
bs@BSs-MacBook-Air ~ % /Users/bs//mongodb/bin/mongod --dbpath=/Users/bs/mongodata
{“t”:{"$date":“2023-01-03T17:38:39.477-06: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":“2023-01-03T17:38:39.479-06: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":“2023-01-03T17:38:39.481-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:4648602, “ctx”:“thread1”,“msg”:“Implicit TCP FastOpen in use.”}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“thread1”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationDonorService”,“namespace”:“config.tenantMigrationDonors”}}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“thread1”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationRecipientService”,“namespace”:“config.tenantMigrationRecipients”}}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“thread1”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“ShardSplitDonorService”,“namespace”:“config.tenantSplitDonors”}}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:5945603, “ctx”:“thread1”,“msg”:“Multi threading initialized”}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:4615611, “ctx”:“initandlisten”,“msg”:“MongoDB starting”,“attr”:{“pid”:10341,“port”:27017,“dbPath”:"/Users/bs/mongodata",“architecture”:“64-bit”,“host”:“BSs-MacBook-Air”}}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:23403, “ctx”:“initandlisten”,“msg”:“Build Info”,“attr”:{“buildInfo”:{“version”:“6.0.3”,“gitVersion”:“f803681c3ae19817d31958965850193de067c516”,“modules”:,“allocator”:“system”,“environment”:{“distarch”:“x86_64”,“target_arch”:“x86_64”}}}}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:51765, “ctx”:“initandlisten”,“msg”:“Operating System”,“attr”:{“os”:{“name”:“Mac OS X”,“version”:“22.1.0”}}}
{“t”:{"$date":“2023-01-03T17:38:39.482-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:21951, “ctx”:“initandlisten”,“msg”:“Options set by command line”,“attr”:{“options”:{“storage”:{“dbPath”:"/Users/bs/mongodata"}}}}
{“t”:{"$date":“2023-01-03T17:38:39.483-06: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":“2023-01-03T17:38:39.484-06: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":“2023-01-03T17:38:39.631-06:00”},“s”:“I”, “c”:“STORAGE”, “id”:4795906, “ctx”:“initandlisten”,“msg”:“WiredTiger opened”,“attr”:{“durationMillis”:147}}
{“t”:{"$date":“2023-01-03T17:38:39.631-06:00”},“s”:“I”, “c”:“RECOVERY”, “id”:23987, “ctx”:“initandlisten”,“msg”:“WiredTiger recoveryTimestamp”,“attr”:{“recoveryTimestamp”:{"$timestamp":{“t”:0,“i”:0}}}}
{“t”:{"$date":“2023-01-03T17:38:39.660-06: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":“2023-01-03T17:38:39.660-06:00”},“s”:“W”, “c”:“CONTROL”, “id”:22140, “ctx”:“initandlisten”,“msg”:“This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning”,“tags”:[“startupWarnings”]}
{“t”:{"$date":“2023-01-03T17:38:39.660-06:00”},“s”:“W”, “c”:“CONTROL”, “id”:22184, “ctx”:“initandlisten”,“msg”:“Soft rlimits for open file descriptors too low”,“attr”:{“currentValue”:256,“recommendedMinimum”:64000},“tags”:[“startupWarnings”]}
{“t”:{"$date":“2023-01-03T17:38:39.662-06:00”},“s”:“I”, “c”:“STORAGE”, “id”:20320, “ctx”:“initandlisten”,“msg”:“createCollection”,“attr”:{“namespace”:“admin.system.version”,“uuidDisposition”:“provided”,“uuid”:{“uuid”:{"$uuid":“40ffca7b-f52b-4984-a120-fb62260dce44”}},“options”:{“uuid”:{"$uuid":“40ffca7b-f52b-4984-a120-fb62260dce44”}}}}
{“t”:{"$date":“2023-01-03T17:38:39.681-06:00”},“s”:“I”, “c”:“INDEX”, “id”:20345, “ctx”:“initandlisten”,“msg”:“Index build: done building”,“attr”:{“buildUUID”:null,“collectionUUID”:{“uuid”:{"$uuid":“40ffca7b-f52b-4984-a120-fb62260dce44”}},“namespace”:“admin.system.version”,“index”:“id”,“ident”:“index-1-6747955549794507941”,“collectionIdent”:“collection-0-6747955549794507941”,“commitTimestamp”:null}}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“REPL”, “id”:20459, “ctx”:“initandlisten”,“msg”:“Setting featureCompatibilityVersion”,“attr”:{“newVersion”:“6.0”}}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“REPL”, “id”:5853300, “ctx”:“initandlisten”,“msg”:“current featureCompatibilityVersion value”,“attr”:{“featureCompatibilityVersion”:“6.0”,“context”:“setFCV”}}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:4915702, “ctx”:“initandlisten”,“msg”:“Updated wire specification”,“attr”:{“oldSpec”:{“incomingExternalClient”:{“minWireVersion”:0,“maxWireVersion”:17},“incomingInternalClient”:{“minWireVersion”:0,“maxWireVersion”:17},“outgoing”:{“minWireVersion”:6,“maxWireVersion”:17},“isInternalClient”:true},“newSpec”:{“incomingExternalClient”:{“minWireVersion”:0,“maxWireVersion”:17},“incomingInternalClient”:{“minWireVersion”:17,“maxWireVersion”:17},“outgoing”:{“minWireVersion”:17,“maxWireVersion”:17},“isInternalClient”:true}}}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:4915702, “ctx”:“initandlisten”,“msg”:“Updated wire specification”,“attr”:{“oldSpec”:{“incomingExternalClient”:{“minWireVersion”:0,“maxWireVersion”:17},“incomingInternalClient”:{“minWireVersion”:17,“maxWireVersion”:17},“outgoing”:{“minWireVersion”:17,“maxWireVersion”:17},“isInternalClient”:true},“newSpec”:{“incomingExternalClient”:{“minWireVersion”:0,“maxWireVersion”:17},“incomingInternalClient”:{“minWireVersion”:17,“maxWireVersion”:17},“outgoing”:{“minWireVersion”:17,“maxWireVersion”:17},“isInternalClient”:true}}}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“REPL”, “id”:5853300, “ctx”:“initandlisten”,“msg”:“current featureCompatibilityVersion value”,“attr”:{“featureCompatibilityVersion”:“6.0”,“context”:“startup”}}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“STORAGE”, “id”:5071100, “ctx”:“initandlisten”,“msg”:“Clearing temp directory”}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:20536, “ctx”:“initandlisten”,“msg”:“Flow Control is enabled on this deployment”}
{“t”:{"$date":“2023-01-03T17:38:39.682-06:00”},“s”:“I”, “c”:“FTDC”, “id”:20625, “ctx”:“initandlisten”,“msg”:“Initializing full-time diagnostic data capture”,“attr”:{“dataDirectory”:"/Users/bs/mongodata/diagnostic.data"}}
{“t”:{"$date":“2023-01-03T17:38:39.684-06:00”},“s”:“I”, “c”:“STORAGE”, “id”:20320, “ctx”:“initandlisten”,“msg”:“createCollection”,“attr”:{“namespace”:“local.startup_log”,“uuidDisposition”:“generated”,“uuid”:{“uuid”:{"$uuid":“eb49e501-c198-4345-a85d-1743412f9799”}},“options”:{“capped”:true,“size”:10485760}}}
{“t”:{"$date":“2023-01-03T17:38:39.703-06:00”},“s”:“I”, “c”:“INDEX”, “id”:20345, “ctx”:“initandlisten”,“msg”:“Index build: done building”,“attr”:{“buildUUID”:null,“collectionUUID”:{“uuid”:{"$uuid":“eb49e501-c198-4345-a85d-1743412f9799”}},“namespace”:“local.startup_log”,“index”:“id”,“ident”:“index-3-6747955549794507941”,“collectionIdent”:“collection-2-6747955549794507941”,“commitTimestamp”:null}}
{“t”:{"$date":“2023-01-03T17:38:39.704-06:00”},“s”:“I”, “c”:“REPL”, “id”:6015317, “ctx”:“initandlisten”,“msg”:“Setting new configuration state”,“attr”:{“newState”:“ConfigReplicationDisabled”,“oldState”:“ConfigPreStart”}}
{“t”:{"$date":“2023-01-03T17:38:39.704-06:00”},“s”:“I”, “c”:“STORAGE”, “id”:22262, “ctx”:“initandlisten”,“msg”:“Timestamp monitor starting”}
{“t”:{"$date":“2023-01-03T17:38:39.704-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:23015, “ctx”:“listener”,“msg”:“Listening on”,“attr”:{“address”:"/tmp/mongodb-27017.sock"}}
{“t”:{"$date":“2023-01-03T17:38:39.704-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:23015, “ctx”:“listener”,“msg”:“Listening on”,“attr”:{“address”:“127.0.0.1”}}
{“t”:{"$date":“2023-01-03T17:38:39.704-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:23016, “ctx”:“listener”,“msg”:“Waiting for connections”,“attr”:{“port”:27017,“ssl”:“off”}}
{“t”:{"$date":“2023-01-03T17:38:39.712-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:20712, “ctx”:“LogicalSessionCacheReap”,“msg”:“Sessions collection is not set up; waiting until next sessions reap interval”,“attr”:{“error”:“NamespaceNotFound: config.system.sessions does not exist”}}
{“t”:{"$date":“2023-01-03T17:38:39.712-06:00”},“s”:“I”, “c”:“STORAGE”, “id”:20320, “ctx”:“LogicalSessionCacheRefresh”,“msg”:“createCollection”,“attr”:{“namespace”:“config.system.sessions”,“uuidDisposition”:“generated”,“uuid”:{“uuid”:{"$uuid":“007ebf5e-c700-4387-ae02-e7a7244bc9be”}},“options”:{}}}
{“t”:{"$date":“2023-01-03T17:38:39.740-06:00”},“s”:“I”, “c”:“INDEX”, “id”:20345, “ctx”:“LogicalSessionCacheRefresh”,“msg”:“Index build: done building”,“attr”:{“buildUUID”:null,“collectionUUID”:{“uuid”:{"$uuid":“007ebf5e-c700-4387-ae02-e7a7244bc9be”}},“namespace”:“config.system.sessions”,“index”:“id”,“ident”:“index-5-6747955549794507941”,“collectionIdent”:“collection-4-6747955549794507941”,“commitTimestamp”:null}}
{“t”:{"$date":“2023-01-03T17:38:39.740-06:00”},“s”:“I”, “c”:“INDEX”, “id”:20345, “ctx”:“LogicalSessionCacheRefresh”,“msg”:“Index build: done building”,“attr”:{“buildUUID”:null,“collectionUUID”:{“uuid”:{"$uuid":“007ebf5e-c700-4387-ae02-e7a7244bc9be”}},“namespace”:“config.system.sessions”,“index”:“lsidTTLIndex”,“ident”:“index-6-6747955549794507941”,“collectionIdent”:“collection-4-6747955549794507941”,“commitTimestamp”:null}}
{“t”:{"$date":“2023-01-03T17:38:39.916-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:22943, “ctx”:“listener”,“msg”:“Connection accepted”,“attr”:{“remote”:“127.0.0.1:56993”,“uuid”:“45d19c77-d0b4-447c-831c-440f5d560246”,“connectionId”:1,“connectionCount”:1}}
{“t”:{"$date":“2023-01-03T17:38:39.924-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:51800, “ctx”:“conn1”,“msg”:“client metadata”,“attr”:{“remote”:“127.0.0.1:56993”,“client”:“conn1”,“doc”:{“driver”:{“name”:“nodejs|Mongoose”,“version”:“4.12.1”},“os”:{“type”:“Darwin”,“name”:“darwin”,“architecture”:“arm64”,“version”:“22.1.0”},“platform”:“Node.js v18.12.1, LE (unified)”,“version”:“4.12.1|6.8.2”}}}
{“t”:{"$date":“2023-01-03T17:38:39.934-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:22943, “ctx”:“listener”,“msg”:“Connection accepted”,“attr”:{“remote”:“127.0.0.1:56994”,“uuid”:“0a47c1a2-e5e1-4a51-b1aa-222b32a6ec85”,“connectionId”:2,“connectionCount”:2}}
{“t”:{"$date":“2023-01-03T17:38:39.934-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:51800, “ctx”:“conn2”,“msg”:“client metadata”,“attr”:{“remote”:“127.0.0.1:56994”,“client”:“conn2”,“doc”:{“driver”:{“name”:“nodejs|Mongoose”,“version”:“4.12.1”},“os”:{“type”:“Darwin”,“name”:“darwin”,“architecture”:“arm64”,“version”:“22.1.0”},“platform”:“Node.js v18.12.1, LE (unified)”,“version”:“4.12.1|6.8.2”}}}
{“t”:{"$date":“2023-01-03T17:38:39.938-06:00”},“s”:“I”, “c”:“STORAGE”, “id”:20320, “ctx”:“conn2”,“msg”:“createCollection”,“attr”:{“namespace”:“notes-api.notes”,“uuidDisposition”:“generated”,“uuid”:{“uuid”:{"$uuid":“a95f0bb1-681d-44b7-be5e-c597b60ce533”}},“options”:{}}}
{“t”:{"$date":“2023-01-03T17:38:39.958-06:00”},“s”:“I”, “c”:“INDEX”, “id”:20345, “ctx”:“conn2”,“msg”:“Index build: done building”,“attr”:{“buildUUID”:null,“collectionUUID”:{“uuid”:{"$uuid":“a95f0bb1-681d-44b7-be5e-c597b60ce533”}},“namespace”:“notes-api.notes”,“index”:“id”,“ident”:“index-8-6747955549794507941”,“collectionIdent”:“collection-7-6747955549794507941”,“commitTimestamp”:null}}
{“t”:{"$date":“2023-01-03T17:38:50.434-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:22943, “ctx”:“listener”,“msg”:“Connection accepted”,“attr”:{“remote”:“127.0.0.1:56995”,“uuid”:“1f944881-0102-4b49-8832-83a2f049109f”,“connectionId”:3,“connectionCount”:3}}
{“t”:{"$date":“2023-01-03T17:38:50.436-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:51800, “ctx”:“conn3”,“msg”:“client metadata”,“attr”:{“remote”:“127.0.0.1:56995”,“client”:“conn3”,“doc”:{“driver”:{“name”:“nodejs|Mongoose”,“version”:“4.12.1”},“os”:{“type”:“Darwin”,“name”:“darwin”,“architecture”:“arm64”,“version”:“22.1.0”},“platform”:“Node.js v18.12.1, LE (unified)”,“version”:“4.12.1|6.8.2”}}}

It looks like MongoDB started successfully, however, the startup command does not have the --fork option. This causes your terminal to “get stuck”.

Two ways to see if everything is ok:

  1. add the --fork after the --dbpath parameter
  2. or open a new terminal and try to run mongo
1 Like

I believe this what you said to do. Can you make sense of all this for me? Thank you. @Leandro_Domingues

bs@BSs-MacBook-Air ~ % /Users/bs//mongodb/bin/mongod --dbpath --=/Users/bs/mongodata
{“t”:{"$date":“2023-01-03T19:18:45.246-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:23285, “ctx”:“thread2”,“msg”:“Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’”}
{“t”:{"$date":“2023-01-03T19:18:45.248-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:4915701, “ctx”:“thread2”,“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":“2023-01-03T19:18:45.259-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:4648602, “ctx”:“thread2”,“msg”:“Implicit TCP FastOpen in use.”}
{“t”:{"$date":“2023-01-03T19:18:45.262-06:00”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“thread2”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationDonorService”,“namespace”:“config.tenantMigrationDonors”}}
{“t”:{"$date":“2023-01-03T19:18:45.263-06:00”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“thread2”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationRecipientService”,“namespace”:“config.tenantMigrationRecipients”}}
{“t”:{"$date":“2023-01-03T19:18:45.263-06:00”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“thread2”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“ShardSplitDonorService”,“namespace”:“config.tenantSplitDonors”}}
{“t”:{"$date":“2023-01-03T19:18:45.263-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:5945603, “ctx”:“thread2”,“msg”:“Multi threading initialized”}
{“t”:{"$date":“2023-01-03T19:18:45.263-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:4615611, “ctx”:“initandlisten”,“msg”:“MongoDB starting”,“attr”:{“pid”:10533,“port”:27017,“dbPath”:"–=/Users/bs/mongodata",“architecture”:“64-bit”,“host”:“BSs-MacBook-Air”}}
{“t”:{"$date":“2023-01-03T19:18:45.263-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:23403, “ctx”:“initandlisten”,“msg”:“Build Info”,“attr”:{“buildInfo”:{“version”:“6.0.3”,“gitVersion”:“f803681c3ae19817d31958965850193de067c516”,“modules”:,“allocator”:“system”,“environment”:{“distarch”:“x86_64”,“target_arch”:“x86_64”}}}}
{“t”:{"$date":“2023-01-03T19:18:45.263-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:51765, “ctx”:“initandlisten”,“msg”:“Operating System”,“attr”:{“os”:{“name”:“Mac OS X”,“version”:“22.1.0”}}}
{“t”:{"$date":“2023-01-03T19:18:45.263-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:21951, “ctx”:“initandlisten”,“msg”:“Options set by command line”,“attr”:{“options”:{“storage”:{“dbPath”:"–=/Users/bs/mongodata"}}}}
{“t”:{"$date":“2023-01-03T19:18:45.267-06: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":“2023-01-03T19:18:45.268-06:00”},“s”:“E”, “c”:“CONTROL”, “id”:20568, “ctx”:“initandlisten”,“msg”:“Error setting up listener”,“attr”:{“error”:{“code”:9001,“codeName”:“SocketException”,“errmsg”:“Address already in use”}}}
{“t”:{"$date":“2023-01-03T19:18:45.269-06:00”},“s”:“I”, “c”:“REPL”, “id”:4784900, “ctx”:“initandlisten”,“msg”:“Stepping down the ReplicationCoordinator for shutdown”,“attr”:{“waitTimeMillis”:15000}}
{“t”:{"$date":“2023-01-03T19:18:45.270-06:00”},“s”:“I”, “c”:“REPL”, “id”:4794602, “ctx”:“initandlisten”,“msg”:“Attempting to enter quiesce mode”}
{“t”:{"$date":“2023-01-03T19:18:45.270-06:00”},“s”:“I”, “c”:"-", “id”:6371601, “ctx”:“initandlisten”,“msg”:“Shutting down the FLE Crud thread pool”}
{“t”:{"$date":“2023-01-03T19:18:45.270-06:00”},“s”:“I”, “c”:“COMMAND”, “id”:4784901, “ctx”:“initandlisten”,“msg”:“Shutting down the MirrorMaestro”}
{“t”:{"$date":“2023-01-03T19:18:45.270-06:00”},“s”:“I”, “c”:“SHARDING”, “id”:4784902, “ctx”:“initandlisten”,“msg”:“Shutting down the WaitForMajorityService”}
{“t”:{"$date":“2023-01-03T19:18:45.270-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:4784905, “ctx”:“initandlisten”,“msg”:“Shutting down the global connection pool”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“NETWORK”, “id”:4784918, “ctx”:“initandlisten”,“msg”:“Shutting down the ReplicaSetMonitor”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“SHARDING”, “id”:4784921, “ctx”:“initandlisten”,“msg”:“Shutting down the MigrationUtilExecutor”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“ASIO”, “id”:22582, “ctx”:“MigrationUtil-TaskExecutor”,“msg”:“Killing all outstanding egress activity.”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“COMMAND”, “id”:4784923, “ctx”:“initandlisten”,“msg”:“Shutting down the ServiceEntryPoint”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:4784925, “ctx”:“initandlisten”,“msg”:“Shutting down free monitoring”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:4784927, “ctx”:“initandlisten”,“msg”:“Shutting down the HealthLog”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:4784928, “ctx”:“initandlisten”,“msg”:“Shutting down the TTL monitor”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:6278511, “ctx”:“initandlisten”,“msg”:“Shutting down the Change Stream Expired Pre-images Remover”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:4784929, “ctx”:“initandlisten”,“msg”:“Acquiring the global lock for shutdown”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:"-", “id”:4784931, “ctx”:“initandlisten”,“msg”:“Dropping the scope cache for shutdown”}
{“t”:{"$date":“2023-01-03T19:18:45.271-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:20565, “ctx”:“initandlisten”,“msg”:“Now exiting”}
{“t”:{"$date":“2023-01-03T19:18:45.272-06:00”},“s”:“I”, “c”:“CONTROL”, “id”:23138, “ctx”:“initandlisten”,“msg”:“Shutting down”,“attr”:{“exitCode”:48}}

See this line:
{“code”:9001,“codeName”:“SocketException”,“errmsg”:“Address already in use”}}}

I believe that as I said mongodb is already running and when you run this same command the error returns saying that the address is already in use. As you didn’t change the port, the default port is 27017

What would you suggest I do? Im new to this so I don’t know the commands or how to change the port. I know how to view them in the console with the command lsof -i:3000 and how to kill a specific one with kill -9 “PID number”. For this course I’m using mongoose, studio 3T, postman, VSC with JS files. I also can’t find my localhost:27017 Mongodb connection In studio 3T. Thank you.

@Leandro_Domingues

Your mongod is already up and running on port 27017
All you have to do is open another session and try to connect using mongosh

You have to shutdown current running mongod and restart with --fork so that it runs in background and your terminal where you started mongod will not be locked or appear to hung
or
If you want to start another mongod while default one is running you have to give different port_number and dbpath
Example:
mongod --port 28000 --dbpath newpath --logpath newpath/mongodb.log --fork

1 Like