Closed Echo009 closed 4 years ago
@guiguan I need you help , thank you very much. (・ェ・。)
@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 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 bothmongo
binary (shell) and mongo driver connections. In your case, themongo
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 .
Environment
Operating system : osx (version 10.15.3) dbkoda version : v1.1.0
config.yml
use Docker and do not create new container
Error Information
it is no problem from the command
I need you help , thank you very much. (・ェ・。)