服务器运维 - mongodb 错误集合

启动时错误

  • 对于错误一定要从日志下手,不要再乱搜,看着日志来才能针对性的拿到解决方案

错误日志 Operation not permitted(权限不足)

找到问题

关键错误日志

{"t":{"$date":"2021-11-19T14:49:52.359+08:00"},"s":"E",  "c":"NETWORK",  "id":23024,   "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Operation not permitted"}}
  • 从最后几行可以看出关键在这里,/tmp/mongodb-27017.sock对于这个文件的操作权限不足

解决问题

  • 这个文件归属mongo操作不了, 删除后又mongo创建后就有操作权限了

场景

完整日志

{"t":{"$date":"2021-11-19T14:49:52.352+08:00"},"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":"2021-11-19T14:49:52.357+08:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2021-11-19T14:49:52.358+08:00"},"s":"I",  "c":"NETWORK",  "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
{"t":{"$date":"2021-11-19T14:49:52.358+08:00"},"s":"I",  "c":"STORAGE",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":2471261,"port":27017,"dbPath":"/home/mongodb/data","architecture":"64-bit","host":"ebs-99186"}}
{"t":{"$date":"2021-11-19T14:49:52.358+08:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.6","gitVersion":"72e66213c2c3eab37d9358d5e78ad7f5c1d0d0d7","openSSLVersion":"OpenSSL 1.1.1f  31 Mar 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu2004","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2021-11-19T14:49:52.358+08:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Ubuntu","version":"20.04"}}}
{"t":{"$date":"2021-11-19T14:49:52.358+08:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/www/server/mongodb/config.conf","net":{"bindIp":"0.0.0.0","port":27017},"processManagement":{"fork":true,"pidFilePath":"/www/server/mongodb/log/configsvr.pid"},"security":{"authorization":"disabled","javascriptEnabled":false},"storage":{"dbPath":"/home/mongodb/data","directoryPerDB":true,"journal":{"enabled":true}},"systemLog":{"destination":"file","logAppend":true,"path":"/www/server/mongodb/log/config.log"}}}}
{"t":{"$date":"2021-11-19T14:49:52.359+08:00"},"s":"E",  "c":"NETWORK",  "id":23024,   "ctx":"initandlisten","msg":"Failed to unlink socket file","attr":{"path":"/tmp/mongodb-27017.sock","error":"Operation not permitted"}}
{"t":{"$date":"2021-11-19T14:49:52.359+08:00"},"s":"F",  "c":"-",        "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":40486,"file":"src/mongo/transport/transport_layer_asio.cpp","line":919}}
{"t":{"$date":"2021-11-19T14:49:52.359+08:00"},"s":"F",  "c":"-",        "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
posted @ 2021-11-19 15:00  Z_DK  阅读(410)  评论(0编辑  收藏  举报