Mongod server not starting

I successfully built MongoDB version 8 from source, but I’m encountering an error when trying to start the server. Here’s the error message:

Error:
× mongod.service - MongoDB Database Server
Loaded: loaded (/etc/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-11-05 10:01:21 IST; 19min ago
Process: 7284 ExecStart=/home/mohakg/Mongo_v8_arm/mongo/build/install/bin/mongod --config /etc/mongod.conf (code=exited, status=1/FAILURE)
CPU: 118ms

Nov 05 10:01:21 ip-172-32-8-86 systemd[1]: Starting MongoDB Database Server…
Nov 05 10:01:21 ip-172-32-8-86 mongod[7284]: {“t”:{“$date”:“2024-11-05T04:31:21.397Z”},“s”:“F”, “c”:“CONTROL”, “id”:20574, “ctx”:“main”}
Nov 05 10:01:21 ip-172-32-8-86 systemd[1]: mongod.service: Control process exited, code=exited, status=1/FAILURE
Nov 05 10:01:21 ip-172-32-8-86 systemd[1]: mongod.service: Failed with result ‘exit-code’.
Nov 05 10:01:21 ip-172-32-8-86 systemd[1]: Failed to start MongoDB Database Server.

If anyone has suggestions on resolving this issue, I’d greatly appreciate it.

What does your conf file say?

Hi Mr. Jack,

Below is my config file content

MongoDB configuration file

Where and how to store data

storage:
dbPath: /data/db # Adjust this if your dbPath is different

Network interfaces

net:
bindIp: 127.0.0.1 # IP address to bind to
port: 27017 # Default MongoDB port

Process management

systemLog:
destination: file
path: /var/log/mongodb/mongod.log # Change path as needed
logAppend: true

Optional: security options

security:
authorization: enabled # Enable authorization if required

Does this path actually exist?

In addition to

What does the log says?

1 Like

Hello,
We are able to start the MongoDB server V8, V7 on Icelake (x86-64) machine. We are facing the issue that is mentioned above is with Graviton3(ARM) machine.
So we would like to know if the support for MongoDB in ARM for V8,V7 is still in progress or is there any work in progress in this aspect.

Hi Mr. Jack & Mr. Steeve,

Yes /data/db path exists and inside logs it is showing error only

What is the error? Please share the content of the log.

cat /var/log/mongodb/mongod.log

{“t”:{“$date”:“2024-11-14T11:22:00.829+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:20698, “ctx”:“main”,“msg”:“***** SERVER RESTARTED *****”}
{“t”:{“$date”:“2024-11-14T11:22:00.833+05:30”},“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”:“2024-11-14T11:22:00.854+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4648601, “ctx”:“main”,“msg”:“Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set at least one of the related parameters”,“attr”:{“relatedParameters”:[“tcpFastOpenServer”,“tcpFastOpenClient”,“tcpFastOpenQueueSize”]}}
{“t”:{“$date”:“2024-11-14T11:22:00.855+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4915701, “ctx”:“main”,“msg”:“Initialized wire specification”,“attr”:{“spec”:{“incomingExternalClient”:{“minWireVersion”:0,“maxWireVersion”:26},“incomingInternalClient”:{“minWireVersion”:0,“maxWireVersion”:26},“outgoing”:{“minWireVersion”:6,“maxWireVersion”:26},“isInternalClient”:true}}}
{“t”:{“$date”:“2024-11-14T11:22:00.861+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:5945603, “ctx”:“main”,“msg”:“Multi threading initialized”}
{“t”:{“$date”:“2024-11-14T11:22:00.861+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:4615611, “ctx”:“initandlisten”,“msg”:“MongoDB starting”,“attr”:{“pid”:32764,“port”:27017,“dbPath”:“/data/db”,“architecture”:“64-bit”,“host”:“ip-172-32-8-86”}}
{“t”:{“$date”:“2024-11-14T11:22:00.861+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:20533, “ctx”:“initandlisten”,“msg”:“DEBUG build (which is slower)”}
{“t”:{“$date”:“2024-11-14T11:22:00.862+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:23403, “ctx”:“initandlisten”,“msg”:“Build Info”,“attr”:{“buildInfo”:{“version”:“8.1.0-alpha-4615-g18b4c39”,“gitVersion”:“18b4c3934ec251acf7d34fbfc3db8957fb6acb96”,“openSSLVersion”:“OpenSSL 3.0.2 15 Mar 2022”,“modules”:,“allocator”:“tcmalloc-google”,“environment”:{“distarch”:“aarch64”,“target_arch”:“aarch64”}}}}
{“t”:{“$date”:“2024-11-14T11:22:00.862+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:51765, “ctx”:“initandlisten”,“msg”:“Operating System”,“attr”:{“os”:{“name”:“Ubuntu”,“version”:“22.04”}}}
{“t”:{“$date”:“2024-11-14T11:22:00.862+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:21951, “ctx”:“initandlisten”,“msg”:“Options set by command line”,“attr”:{“options”:{“config”:“/etc/mongod.conf”,“net”:{“bindIp”:“127.0.0.1”,“port”:27017},“storage”:{“dbPath”:“/data/db”},“systemLog”:{“destination”:“file”,“logAppend”:true,“path”:“/var/log/mongodb/mongod.log”}}}}
{“t”:{“$date”:“2024-11-14T11:22:00.864+05:30”},“s”:“I”, “c”:“STORAGE”, “id”:22297, “ctx”:“initandlisten”,“msg”:“Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem",“tags”:["startupWarnings”]}
{“t”:{“$date”:“2024-11-14T11:22:00.864+05:30”},“s”:“E”, “c”:“STORAGE”, “id”:22312, “ctx”:“initandlisten”,“msg”:“Error creating journal directory”,“attr”:{“directory”:“/data/db/journal”,“error”:“boost::filesystem::create_directory: Permission denied [system:13]: "/data/db/journal"”}}
{“t”:{“$date”:“2024-11-14T11:22:00.864+05:30”},“s”:“E”, “c”:“CONTROL”, “id”:20558, “ctx”:“initandlisten”,“msg”:“std::exception in initAndListen, terminating”,“attr”:{“error”:“boost::filesystem::create_directory: Permission denied [system:13]: "/data/db/journal"”}}
{“t”:{“$date”:“2024-11-14T11:22:00.864+05:30”},“s”:“I”, “c”:“REPL”, “id”:4784900, “ctx”:“initandlisten”,“msg”:“Stepping down the ReplicationCoordinator for shutdown”,“attr”:{“waitTimeMillis”:15000}}
{“t”:{“$date”:“2024-11-14T11:22:00.864+05:30”},“s”:“I”, “c”:“REPL”, “id”:4794602, “ctx”:“initandlisten”,“msg”:“Attempting to enter quiesce mode”}
{“t”:{“$date”:“2024-11-14T11:22:00.864+05:30”},“s”:“I”, “c”:“-”, “id”:6371601, “ctx”:“initandlisten”,“msg”:“Shutting down the FLE Crud thread pool”}
{“t”:{“$date”:“2024-11-14T11:22:00.864+05:30”},“s”:“I”, “c”:“COMMAND”, “id”:4784901, “ctx”:“initandlisten”,“msg”:“Shutting down the MirrorMaestro”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“SHARDING”, “id”:4784902, “ctx”:“initandlisten”,“msg”:“Shutting down the WaitForMajorityService”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:8314100, “ctx”:“initandlisten”,“msg”:“Shutdown: Closing listener sockets”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4784905, “ctx”:“initandlisten”,“msg”:“Shutting down the global connection pool”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:4784906, “ctx”:“initandlisten”,“msg”:“Shutting down the FlowControlTicketholder”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“-”, “id”:20520, “ctx”:“initandlisten”,“msg”:“Stopping further Flow Control ticket acquisitions.”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4784918, “ctx”:“initandlisten”,“msg”:“Shutting down the ReplicaSetMonitor”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“SHARDING”, “id”:4784921, “ctx”:“initandlisten”,“msg”:“Shutting down the MigrationUtilExecutor”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“ASIO”, “id”:22582, “ctx”:“initandlisten”,“msg”:“Killing all outstanding egress activity.”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:20562, “ctx”:“initandlisten”,“msg”:“Shutdown: Closing open transport sessions”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4784923, “ctx”:“initandlisten”,“msg”:“Shutting down the ASIO transport SessionManager”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:4784928, “ctx”:“initandlisten”,“msg”:“Shutting down the TTL monitor”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:6278511, “ctx”:“initandlisten”,“msg”:“Shutting down the Change Stream Expired Pre-images Remover”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:4784929, “ctx”:“initandlisten”,“msg”:“Acquiring the global lock for shutdown”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“-”, “id”:4784931, “ctx”:“initandlisten”,“msg”:“Dropping the scope cache for shutdown”}
{“t”:{“$date”:“2024-11-14T11:22:00.865+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:20565, “ctx”:“initandlisten”,“msg”:“Now exiting”}
{“t”:{“$date”:“2024-11-14T11:22:00.866+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:8423404, “ctx”:“initandlisten”,“msg”:“mongod shutdown complete”,“attr”:{“Summary of time elapsed”:{“Statistics”:{“Enter terminal shutdown”:“0 ms”,“Step down the replication coordinator for shutdown”:“0 ms”,“Time spent in quiesce mode”:“0 ms”,“Shut down FLE Crud subsystem”:“0 ms”,“Shut down MirrorMaestro”:“0 ms”,“Shut down WaitForMajorityService”:“1 ms”,“Shut down the global connection pool”:“0 ms”,“Shut down the flow control ticket holder”:“0 ms”,“Shut down the replica set monitor”:“0 ms”,“Shut down the migration util executor”:“0 ms”,“Shut down the transport layer”:“0 ms”,“Shut down the TTL monitor”:“0 ms”,“Shut down expired pre-images and documents removers”:“0 ms”,“Wait for the oplog cap maintainer thread to stop”:“0 ms”,“Shut down full-time data capture”:“0 ms”,“Shut down online certificate status protocol manager”:“0 ms”,“shutdownTask total elapsed time”:“1 ms”}}}}
{“t”:{“$date”:“2024-11-14T11:22:00.866+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:23138, “ctx”:“initandlisten”,“msg”:“Shutting down”,“attr”:{“exitCode”:100}}

Nice. By reading the error message in the log we can see that the error is:

One of the most useful skill in programming and system admin is to be able to read.

2 Likes

@Mohak_Goel, I hope my replied reached you and that you were able to fix your file permission issues.

Please followup.

@Mohak_Goel, I have looked at your previous threads and it looks like you have the tendency to let them die off despite having answers from other users. It would be nice if you could change this behaviour.

Hi @steevej,
Thank you for your support! The mongod server is now working fine.

1 Like