macOS Apple M3 Max 上的 mongodb-community 7.0.12:MongoNetworkError:连接 ECONNREFUSED 127.0.0.1:27017

问题描述 投票:0回答:1

将(我的工作)mongodb-community 7.0.11 升级到 7.0.12

在 macOS 14.5 Sonoma 上使用:

brew upgrade 

&也尝试过:

brew uninstall mongodb-community
brew install mongodb-community

brew services restart mongodb-community

==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)

当我尝试运行“mongosh”时,我得到:

mongosh 
Current Mongosh Log ID: 667d256eae84701ef1dc2c4f
Connecting to:      mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.10
MongoNetworkError: connect ECONNREFUSED 127.0.0.1:2701

当我尝试连接“MongoDB Compass”和“Studio 3T”时出现类似的错误:

mongodb://localhost:27017
connect ECONNREFUSED 127.0.0.1:27017, connect ECONNREFUSED ::1:27017

如果我尝试运行 mongod 或 mongos,我会得到:

Illegal instruction: 4

Apple M3 Max/ARM 64 上的 MongoDB 是否存在问题?

'Google'd'直到奶牛回家并且找不到解决办法!短暂性脑缺血发作。

mongodb macos homebrew
1个回答
0
投票

已修复:

下载并解压:https://www.mongodb.com/try/download/community

mongodb-macos-arm64-7.0.12-rc1.tgz

已复制:

usr/local/Cellar/mongodb-macos-aarch64-7.0.12-rc1/

光盘:

/usr/local/Cellar/mongodb-macos-aarch64-7.0.12-rc1/bin

运行:

./mongod --config /usr/local/etc/mongod.conf

在:

/usr/local/Cellar/mongodb-macos-aarch64-7.0.12-rc1/bin

运行:

mongosh

终端:

Current Mongosh Log ID: 667e9aa330e84e420487fce7
Connecting to:      mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.10
Using MongoDB:      7.0.12-rc1
Using Mongosh:      2.2.10

For mongosh info see: https://docs.mongodb.com/mongodb-shell/

------
   The server generated these startup warnings when booting
   2024-06-28T12:11:16.630+01:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
   2024-06-28T12:11:16.630+01:00: Soft rlimits for open file descriptors too low
------

Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded.
  You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js.
test> db = connect("127.0.0.1:27017/beWhereWhenDB");
beWhereWhenDB
beWhereWhenDB> 

beWhereWhenDB> // Users

beWhereWhenDB> load('/Users/NOTiFY/IdeaProjects/BeWhereWhen/js/beWhereWhen/Users.js')
>>>>> 1.1 dbName = beWhereWhenDB
>>>>> 1.2 dbName = beWhereWhenDB
>>>>> 1.3 collectionUsers deleteMany = [object Object]
>>>>> 1.4 collectionUsers = [object Object]
true
beWhereWhenDB> 

beWhereWhenDB> // Events, Meetings, Social

beWhereWhenDB> load('/Users/NOTiFY/IdeaProjects/BeWhereWhen/js/bewherewhen/EventsMeetingsSocial.js')
>>>>> 3.1 dbName = beWhereWhenDB
>>>>> 2.2 dbName = beWhereWhenDB
>>>>> 2.3 collectionEventsMeetingsSocial deleteMany = [object Object]
>>>>> 2.4 collectionEventsMeetingsSocial = [object Object]
true
beWhereWhenDB> 

beWhereWhenDB> 

beWhereWhenDB> // Events

beWhereWhenDB> load('/Users/NOTiFY/IdeaProjects/BeWhereWhen/js/beWhereWhen/BeWhereWhen.js')
>>>>> 3.1 dbName = beWhereWhenDB
>>>>> 3.2 dbName = beWhereWhenDB
>>>>> 3.3 collectionBeWhereWhen deleteMany = [object Object]
>>>>> 3.4 collectionBeWhereWhen = [object Object]
true
beWhereWhenDB> load('/Users/NOTiFY/IdeaProjects/BeWhereWhen/js/beWhereWhen/BeWhereWhen_Events.js')
>>>>> 4.1 collectionBeWhereWhen events = [object Object]
true

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.