Mongoimport on mongodb atlas 错误eof,连接

问题描述

这是我的命令

mongoimport --host <hostname>.mongodb.net:27017 --db <databasename> --collection <collectionname> --type csv --file <filename>.csv --headerline --authenticationDatabase admin --username <username> --password <password> --authenticationMechanism SCRAM-SHA-1

这是我收到的“礼物”。我第一次尝试 mongoimport 到 atlas。

2021-05-02T20:22:01.292+0300 error connecting to host: Could not connect to server: server selection error: server selection timeout,current topology: { Type: Single,Servers: [{ Addr: <hostname>.mongodb.net:27017,Type: UnkNown,State: Connected,Average RTT: 0,Last error: connection() : connection(<hostname>.mongodb.net:27017[-61]) incomplete read of message header: EOF },] }

解决方法

似乎这个错误没有明显和简单的答案。我不知道是不是因为我有免费层集群,或者可能是某种过时的 mongo cli 包,或者它实际上可以是任何东西。

所以,我刚刚通过 mongo 指南针连接到我的集群,并使用老式 GUI 方式进行了导入。

问题“已解决”。