MongoDB-社区未在Mac上启动并显示错误 [英] MongoDB-Community not starting on Mac and giving errors

查看:75
本文介绍了MongoDB-社区未在Mac上启动并显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写这封信的目的是,我以前使用brew(High Sierra)安装了mongodb-community,并且它正在运行.然后最近我升级了,它似乎没有连接起来.当我在终端中运行mongo时,出现错误:

I am writing to inform that i had installed mongodb-community some time back using brew (High Sierra) and it was running. Then recently i upgraded and it doesn't seem to wire up. When i am running mongo in terminal, I am getting error:

MongoDB shell version v4.4.0
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:362:17
@(connect):2:6
exception: connect failed
exiting with code 1

当我检查日志以启动mongodb-community服务时,出现以下错误:

When i checked logs for starting the mongodb-community service, I am getting following error:

{"t":{"$date":"2020-09-04T21:01:35.015-07:00"},"s":"W",  "c":"CONTROL",  "id":20698,   "ctx":"main","msg":"***** SERVER RESTARTED *****","tags":["startupWarnings"]}
{"t":{"$date":"2020-09-04T21:01:35.021-07: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":"2020-09-04T21:01:35.027-07:00"},"s":"W",  "c":"ASIO",     "id":22601,   "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2020-09-04T21:01:35.027-07:00"},"s":"I",  "c":"NETWORK",  "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2020-09-04T21:01:35.028-07:00"},"s":"I",  "c":"STORAGE",  "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":58706,"port":27017,"dbPath":"/Users/my_username/homebrew/var/mongodb","architecture":"64-bit","host":"SC-*"}}
{"t":{"$date":"2020-09-04T21:01:35.029-07:00"},"s":"I",  "c":"CONTROL",  "id":23403,   "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.0","gitVersion":"563487e100c4215e2dce98d0af2a6a5a2d67c5cf","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2020-09-04T21:01:35.029-07:00"},"s":"I",  "c":"CONTROL",  "id":51765,   "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"17.7.0"}}}
{"t":{"$date":"2020-09-04T21:01:35.029-07:00"},"s":"I",  "c":"CONTROL",  "id":21951,   "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/Users/my_username/homebrew/etc/mongod.conf","net":{"bindIp":"127.0.0.1"},"storage":{"dbPath":"/Users/my_username/homebrew/var/mongodb"},"systemLog":{"destination":"file","logAppend":true,"path":"/Users/my_username/homebrew/var/log/mongodb/mongo.log"}}}}
{"t":{"$date":"2020-09-04T21:01:35.038-07:00"},"s":"I",  "c":"STORAGE",  "id":22270,   "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/Users/my_username/homebrew/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2020-09-04T21:01:35.038-07:00"},"s":"I",  "c":"STORAGE",  "id":22315,   "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=7680M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}}
{"t":{"$date":"2020-09-04T21:01:36.177-07:00"},"s":"W",  "c":"STORAGE",  "id":22347,   "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}
{"t":{"$date":"2020-09-04T21:01:36.178-07:00"},"s":"F",  "c":"STORAGE",  "id":28595,   "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"45: Operation not supported"}}
{"t":{"$date":"2020-09-04T21:01:36.178-07:00"},"s":"F",  "c":"-",        "id":23091,   "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":1100}}
{"t":{"$date":"2020-09-04T21:01:36.178-07:00"},"s":"F",  "c":"-",        "id":23092,   "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}

我可以寻求您的帮助来解决此问题吗?我没有sudo权限,无法升级操作系统,但是可以使用任何方法使用mongo

Can i please seek your help in fixing this? I am not having sudo rights and can't upgrade the OS, but am open to use mongo using any method

推荐答案

类似的问题,最终可行的解决方案:

similar issue, final worked solution:

  1. 卸载(最新的但无效的版本: 4.4.3 )

酿造卸载mongodb-community

  1. 重新安装,旧但可用的 4.2.1

简单安装mongodb-community@4.2

  1. 运行

  • 现在:酿造服务运行mongodb-community@4.2
  • 现在并设置为可启动:酿造服务启动mongodb-community@4.2
    1. 检查状态

    酿酒服务

    这篇关于MongoDB-社区未在Mac上启动并显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆