【发布时间】:2023-03-19 08:35:01
【问题描述】:
我有一个使用 MeteorUp 部署到 Digital Ocean 的 MeteorJs 应用程序。如何使用本地 Windows 机器上的 MongoDB 客户端连接到 MongoDB 数据库?我尝试使用 MyDigitalOceanIP: 27017 但我收到“连接失败”错误。
错误:
Connection failed.
SERVER [MyDigitalOceanIP:27017] (Type: UNKNOWN) CONNECTING
Details:
Timed out after 5000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=MyDigitalOceanIP:27017, type=UNKNOWN, state=CONNECTING}]
docker 容器 ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
91502fe2c115 mup-todousingreactandmeteorjs:latest "/bin/sh -c 'bash $M…" 12 minutes ago Up 12 minutes 0.0.0.0:80->80/tcp ToDoUsingReactAndMeteorJs
2d4be51b46a2 mongo:3.4.1 "/entrypoint.sh mong…" 21 minutes ago Up 21 minutes 127.0.0.1:27017->27017/tcp mongodb
更新:2019 年 9 月 2 日:
我现在收到 Exhausted available authentication methods 错误。
SSH Tunnel error: authentication failed: Exhausted available authentication methods
Stacktrace:
|_/ SSH Tunnel error: authentication failed: Exhausted available authentication methods
|____/ SSH Tunnel error: Exhausted available authentication methods
这是我尝试过的。
a. Copied public key from my local machine to ~/.ssh/authorized_keys folder in my Digital Ocean VM.
b. updated PasswordAuthentication, ChallengeResponseAuthentication, PubkeyAuthentication to yes in /etc/ssh/sshd_config.
c. In my local PC, created a standard connection with
c.1. server localhost and port 27017,
c.2. Authentication Mode None
c.3. Use SSL protocol to connect as unchecked.
c.4. Use SSH tunnel to connect with ssh address as my public IP, port 22, SSH user name as the root user name. I tried with both ssh auth mode as private key(in OpenSSH format) and password.
【问题讨论】:
标签: mongodb docker meteor digital-ocean meteor-up