I can't start the mongodb service. the log shows that it received a "CTRL_CLOSE_EVENT signal" and shutdown automatically. But I did not close up the cmommand line window. Here is the log:
{"t":{"$date":"2021-01-28T13:00:48.971+08:00"},"s":"I", "c":"CONTROL", "id":23373, "ctx":"thread1","msg":"CTRL_CLOSE_EVENT signal"}
{"t":{"$date":"2021-01-28T13:00:48.971+08:00"},"s":"I", "c":"CONTROL", "id":23371, "ctx":"consoleTerminate","msg":"Received event, will terminate after current command ends","attr":{"controlCode":"CTRL_CLOSE_EVENT"}}
{"t":{"$date":"2021-01-28T13:00:48.971+08:00"},"s":"I", "c":"REPL", "id":4784900, "ctx":"consoleTerminate","msg":"Stepping down the ReplicationCoordinator for shutdown","attr":{"waitTimeMillis":10000}}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"COMMAND", "id":4784901, "ctx":"consoleTerminate","msg":"Shutting down the MirrorMaestro"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"SHARDING", "id":4784902, "ctx":"consoleTerminate","msg":"Shutting down the WaitForMajorityService"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"NETWORK", "id":20562, "ctx":"consoleTerminate","msg":"Shutdown: going to close listening sockets"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"NETWORK", "id":4784905, "ctx":"consoleTerminate","msg":"Shutting down the global connection pool"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"STORAGE", "id":4784906, "ctx":"consoleTerminate","msg":"Shutting down the FlowControlTicketholder"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"-", "id":20520, "ctx":"consoleTerminate","msg":"Stopping further Flow Control ticket acquisitions."}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"NETWORK", "id":4784918, "ctx":"consoleTerminate","msg":"Shutting down the ReplicaSetMonitor"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"SHARDING", "id":4784921, "ctx":"consoleTerminate","msg":"Shutting down the MigrationUtilExecutor"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"CONTROL", "id":4784925, "ctx":"consoleTerminate","msg":"Shutting down free monitoring"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"STORAGE", "id":4784927, "ctx":"consoleTerminate","msg":"Shutting down the HealthLog"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"STORAGE", "id":4784929, "ctx":"consoleTerminate","msg":"Acquiring the global lock for shutdown"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"-", "id":4784931, "ctx":"consoleTerminate","msg":"Dropping the scope cache for shutdown"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"FTDC", "id":4784926, "ctx":"consoleTerminate","msg":"Shutting down full-time data capture"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"CONTROL", "id":20565, "ctx":"consoleTerminate","msg":"Now exiting"}
{"t":{"$date":"2021-01-28T13:00:48.972+08:00"},"s":"I", "c":"CONTROL", "id":23138, "ctx":"consoleTerminate","msg":"Shutting down","attr":{"exitCode":12}}
question from:https://stackoverflow.com/questions/65931494/mongodb-shutdown-automatically-when-start-it