mongodb - mongoimport 套接字意外关闭
问题描述
我正在使用 mongoimport 将 json 文件导入 MongoDB Cloud Atlas,但以下命令返回超时错误。我的命令有什么问题?
mongoimport -u=foo -p=bar mongodb://clustersandbox-shard-00-01.wudsw.mongodb.net:27017 -d=foobar --type=json -c=users --drop --file=users.metadata.json
错误信息:
2021-07-24T23:48:00.709+0800 error connecting to host: could not connect to server: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: clustersandbox-shard-00-01.wudsw.mongodb.net:27017, Type: Unknown, Last error: connection() error occured during connection handshake: connection(clustersandbox-shard-00-01.wudsw.mongodb.net:27017[-64]) socket was unexpectedly closed: EOF }, ] }
我已将我的 IP 地址列入白名单。
解决方案
推荐阅读
- typescript - Vuetify 错误:“beforeCreate 挂钩中的错误:“错误:Vuetify 未正确初始化”
- c - ncursesw 函数未声明
- java - 在最近的应用程序按钮上的android中调用了哪个方法
- sql - 选择 COUNT distinct 并将其向上舍入到最接近的 hr
- python - 在同一个项目中使用 Fabric 2 和 Fabric 3
- ruby - Rspec 未通过测试,其中 'Diff:' 看起来相同
- vega-lite - 变通以显示基于周期时间列的 vega-lite 图表?
- google-data-studio - 使用 CASE WHEN 语句和聚合创建字段失败
- angular - 从 Angular 应用程序启动/停止 docker 的容器
- mongodb - 包含日期范围的最佳 Mongo 索引策略是什么