connecting to: mongodb://mongo-0.mongo:27017/test?compressors=disabled&gssapiServiceName=mongodb
Error: couldn’t connect to server mongo-0.mongo:27017, connection attempt failed: HostNotFound: Could not find address for mongo-0.mongo:27017: SocketException: Host not found (non-authoritative), try again later :
From the above error, seems like the connection does not work with the url specified.
Can you try configuring the IP and the Port manually to the /etc/hosts/ in the following format:
Just for better understanding, have you been able to connect to the deployment before or is this the first time and you are facing connectivity issues?
Also, could you confirm that can you connect to the database using only mongo without any server address? This would connect to the local server and verify if it is running on the server. You can also try with localhost or 127.0.0.1.
If however, you are able to connect at localhost, then the mentioned IP is not bind with the interface. You may need to enable --bind_ip_all setting on mongod since MongoDB binaries bind only to localhost by default (see security-mongodb-configuration)
You are refer to more documentations here: MongoDB Community Kubernetes Operator that may help with Kubernetes deployment, and also have a look at the related blog post that talks about the operator.
Let us know if more information is needed.
Thanks
Aasawari
New & Unread Topics
Topic list, column headers with buttons are sortable.