【MongoDB】MongoDB启动报错"msg":"Failed to unlink socket file"
2022-06-19 13:13 abce 阅读(3611) 评论(0) 编辑 收藏 举报启动时报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # more mongod.log { "t" :{ "$date" : "2022-06-19T12:43:29.495+08:00" }, "s" : "I" , "c" : "CONTROL" , "id" :23285, "ctx" : "main" , "msg" :"Automatically disabling TLS 1.0, to force- enable TLS 1.0 specify --sslDisabledPro tocols 'none' "} { "t" :{ "$date" : "2022-06-19T12:43:29.498+08:00" }, "s" : "W" , "c" : "ASIO" , "id" :22601, "ctx" : "main" , "msg" : "No TransportLayer configured during NetworkInterface startup" } { "t" :{ "$date" : "2022-06-19T12:43:29.498+08:00" }, "s" : "I" , "c" : "NETWORK" , "id" :4648601, "ctx" : "main" , "msg" :"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenSe rver, tcpFastOpenClient, and tcpFastOpenQueueSize."} { "t" :{ "$date" : "2022-06-19T12:43:29.498+08:00" }, "s" : "I" , "c" : "STORAGE" , "id" :4615611, "ctx" : "initandlisten" , "msg" : "MongoDB starting" , "attr" :{ "pid" :4743, "port" :27017, "dbPath" :" /data/mongo_ data /data "," architecture ":" 64-bit "," host ":" VM-16-12-centos"}} { "t" :{ "$date" : "2022-06-19T12:43:29.498+08:00" }, "s" : "I" , "c" : "CONTROL" , "id" :23403, "ctx" : "initandlisten" , "msg" : "Build Info" , "attr" :{ "buildInfo" :{ "version" : "4.4.14" , "gitVersion" :"0b0843 af97c3ec9d2c0995152d96d2aad725aab7 "," openSSLVersion ":" OpenSSL 1.0.1e-fips 11 Feb 2013 "," modules ":[]," allocator ":" tcmalloc "," environment ":{" distmod ":" rhel70 "," distarch ":" x86_64 "," target_arc h ":" x86_64"}}}} { "t" :{ "$date" : "2022-06-19T12:43:29.498+08:00" }, "s" : "I" , "c" : "CONTROL" , "id" :51765, "ctx" : "initandlisten" , "msg" : "Operating System" , "attr" :{ "os" :{ "name" :"CentOS Linux release 7.6.1810 (C ore) "," version ":" Kernel 3.10.0-1160.11.1.el7.x86_64"}}} { "t" :{ "$date" : "2022-06-19T12:43:29.498+08:00" }, "s" : "I" , "c" : "CONTROL" , "id" :21951, "ctx" : "initandlisten" , "msg" : "Options set by command line" , "attr" :{ "options" :{ "config" :" /etc/mongod .co nf "," net ":{" bindIp ":" 0.0.0.0 "," port ":27017}," processManagement ":{" pidFilePath ":" /data/mongo_data/mongod .pid "}," storage ":{" dbPath ":" /data "," directoryPerDB ":true," journal ":{" enabled ":true}," wiredTiger ":{" engineConfig ":{" directoryForIndexes ":true}}}," systemLog ":{" destination ":" file "," logAppend ":true," path ":" /log/mongod .log "," quiet": true }}}} { "t" :{ "$date" : "2022-06-19T12:43:29.499+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" : "2022-06-19T12:43:29.499+08:00" }, "s" : "F" , "c" : "-" , "id" :23091, "ctx" : "initandlisten" , "msg" : "Fatal assertion" , "attr" :{ "msgid" :40486, "file" :"src /mongo/transport/trans port_layer_asio.cpp "," line":948}} { "t" :{ "$date" : "2022-06-19T12:43:29.499+08:00" }, "s" : "F" , "c" : "-" , "id" :23092, "ctx" : "initandlisten" , "msg" : "\n\n***aborting after fassert() failure\n\n" } |
从日志看是因为unlink socket文件。
1 2 3 | # cd /tmp/ # ll |grep mongo srwx------ 1 992 mongod 0 Jun 9 20:45 mongodb-27017.sock |
可以看到,sock文件的属主不对。删除,重启启动即可
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
2017-06-19 rhel 7 设置默认运行级别为图形
2015-06-19 表空间基于时间点的恢复