具体报错内容
Error response from daemon: Container 53e19ff18138ef1ab12010320c299263e6994a5bb271435419fa49c297aa104b is restarting, wait until the container is running
第一种情况 容器未启动
docker restart 容器id
重启容器id
第二种情况
容器启动成功显示成功
使用容器时报错
docker stats 容器id
再次运行容器,发现容器启动之后又停止
docker logs mongo
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADEF96928","b":"561AD7555000","o":"7A41928","s":"_ZN5mongo15printStackTraceEv","C":"mongo::printStackTrace()","s+":"38"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADEF91D3B","b":"561AD7555000","o":"7A3CD3B","s":"_ZN5mongo12_GLOBAL__N_111myTerminateEv","C":"mongo::(anonymous namespace)::myTerminate()","s+":"DB"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADF1391FA","b":"561AD7555000","o":"7BE41FA","s":"_ZN10__cxxabiv111__terminateEPFvvE","C":"__cxxabiv1::__terminate(void (*)())","s+":"A"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADF139265","b":"561AD7555000","o":"7BE4265","s":"_ZSt9terminatev","C":"std::terminate()","s+":"15"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADF1393B9","b":"561AD7555000","o":"7BE43B9","s":"__cxa_throw","s+":"49"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADF1BF185","b":"561AD7555000","o":"7C6A185","s":"_ZSt20__throw_system_errori","C":"std::__throw_system_error(int)","s+":"88"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADF1BF3FD","b":"561AD7555000","o":"7C6A3FD","s":"_ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE","C":"std::thread::_M_start_thread(std::unique_ptr >, void (*)())","s+":"2D"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADC394E2C","b":"561AD7555000","o":"4E3FE2C","s":"_ZN5mongo27startSignalProcessingThreadENS_13LogFileStatusE","C":"mongo::startSignalProcessingThread(mongo::LogFileStatus)","s+":"11C"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADAF8AE58","b":"561AD7555000","o":"3A35E58","s":"_ZN5mongo11mongod_mainEiPPc","C":"mongo::mongod_main(int, char**)","s+":"3D8"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADAF85635","b":"561AD7555000","o":"3A30635","s":"main","s+":"C"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"7FE0AC85BD90","b":"7FE0AC832000","o":"29D90","s":"__libc_init_first","s+":"90"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"7FE0AC85BE40","b":"7FE0AC832000","o":"29E40","s":"__libc_start_main","s+":"80"}}}
{"t":{"$date":"2023-09-07T01:38:35.286+00:00"},"s":"I", "c":"CONTROL", "id":31445, "ctx":"main","msg":"Frame","attr":{"frame":{"a":"561ADAF85565","b":"561AD7555000","o":"3A30565","s":"_start","s+":"25"}}}
chatgpt分析日志
异常的类型为 std::system_error
,错误消息为 “Operation not permitted”
这是由于系统资源不足以启动该容器,
解决方案: 安装低版本体积更小
或者更换虚拟机安装(关闭其他虚拟机)安装不报错