SouthbankSoftware / dbkoda

State of the art MongoDB IDE
https://www.dbkoda.com
GNU Affero General Public License v3.0
870 stars 42 forks source link

Failed to create Mongo shell, which exited with code 1 and output message at MongoShell. #64

Closed Echo009 closed 4 years ago

Echo009 commented 4 years ago

Environment

Operating system : osx (version 10.15.3) dbkoda version : v1.1.0

config.yml

use Docker and do not create new container image

Error Information

image

it is no problem from the command image

I need you help , thank you very much. (・ェ・。)

Echo009 commented 4 years ago

@guiguan I need you help , thank you very much. (・ェ・。)

guiguan commented 4 years ago

@Echo009 I think your configuration is correct. The problem is that you were trying to connect to the mongo server in the same container as the mongo client. dbKoda makes use of both mongo binary (shell) and mongo driver connections. In your case, the mongo binary can connect to the server correctly, as they both are in the same local container network. However, the mongo driver cannot connect, because it is on your host level.

If you try to connect to an external mongo server, your config should work. If you still want to connect to the mongo server in your docker container, you can expose the server port (27017) to your host, then use your host_ip:27017 (not localhost) as the host port in the mongo connection string.

Echo009 commented 4 years ago

@Echo009 I think your configuration is correct. The problem is that you were trying to connect to the mongo server in the same container as the mongo client. dbKoda makes use of both mongo binary (shell) and mongo driver connections. In your case, the mongo binary can connect to the server correctly, as they both are in the same local container network. However, the mongo driver cannot connect, because it is on your host level.

If you try to connect to an external mongo server, your config should work. If you still want to connect to the mongo server in your docker container, you can expose the server port (27017) to your host, then use your host_ip:27017 (not localhost) as the host port in the mongo connection string.

Thank you very much .