Mongod.service failed

Hello, I’m having problems with my mongod, every time I restart the machine, systemctl doesn’t start the mongod process automatically, in addition to deleting my pidFilePath: /var/run/mongodb (I imagine that the mongod process doesn’t start because that reason). After I start the mongod process manually (after having created the pidFilePath again), I can perform operations normally, but the status of mongod.service remains as failed. Is there a way to correct such an error, what consequences does it bring?

!!The remaining prints are in the comments!!

other prints! (part 1)

other prints! (part 2)

other prints! (part 3)

Check this thread as it seems to be the same issue.

Hi Steve, first of all I would like to thank you for the reply, as I was able to make some headway on account of this post. But, I have a new error, systemctl is not able to start the mongod process through mongod --config /etc/mongod. I’ve already tested uploading the mongod.conf manually to validate the configuration file and it worked, so I think the cause of the problem is not the file. Do you have any more information or ideas? @steevej

You need to look at the log file for error description.