Closed justinmchase closed 3 years ago
Related to:
Hi @justinmchase , Are you configuring the external IPs? I can see you are using localhost to connect to MongoDB. I would try the following:
externalAccess.autoDiscovery.enabled=true
for the MongoDB replicas to auto-detect the rest of the nodes. I tried adding those settings:
--set externalAccess.enabled=true \
--set externalAccess.autoDiscovery.enabled=true \
--set externalAccess.service.type=NodePort \
--set externalAccess.service.nodePorts[0]='31017' \
Again, same results. I can see the port is open via http and giving that default message but trying to connect via the tool just hangs and timesout. Perhaps I'm not configuring the connection string correctly but I'm not sure.
Hi @justinmchase ,
Could you share the connection string you are using?
Apart from that, from the screenshot you shared in the first comment it seems that your MongoDB is properly exposed.
Also, the replicaCount
seems to be 1
while a replica set needs at least three pods to provide its benefits: https://docs.mongodb.com/manual/core/replica-set-architecture-three-members/
@miguelaeh
I don't have a connection string, I was trying to use that UI and I think once it connects it may give me the connection string it constructed but it doesn't seem to be working.
And yeah I'm just running this on my local machine and wanted to get access to the Change Streams feature which seems to require replica mode. I don't really care about having 3... unless its required to function at all?
Hi @justinmchase , It should not be needed to use Compass to obtain a connection string, since the browser says it is properly exposed could you try creating your connection string and try to connect from your computer using the MongoDB client?
You can follow this https://docs.mongodb.com/manual/reference/connection-string/
hi @justinmchase, did you manage to get this working. I am also after the Change Stream feature and using Kind. Been searching all over with no luck.
Which chart:
mongodb
Describe the bug When I set the chart into replicaset mode I cannot connect from mongo compass to my server any longer. I'm running in docker-desktop.
To Reproduce Steps to reproduce the behavior:
kubectl port-forward service/mongodb-external-0 27017
version.BuildInfo{Version:"v3.5.4", GitCommit:"1b5edb69df3d3a08df77c9902dc17af864ff05d1", GitTreeState:"clean", GoVersion:"go1.15.11"}
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:15:20Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
An error occurred while loading navigation: 'not master and slaveOk=false': It is recommended to change your read preference in the connection dialog to Primary Preferred or Secondary Preferred or provide a replica set name for a full topology connection.