cowboysysop / charts

Cowboy Sysop Charts
MIT License
119 stars 71 forks source link

Cant Connect to MongoReplicaSet #530

Open marth52 opened 1 year ago

marth52 commented 1 year ago

Hi there, i am running a mongodb replicaset inside my k8s-cluster, but unfortunately i can not make a proper connection between mongo experess and mongodb. My mongodb replicaset is deployed in a namespace called mongo-replicaset. According to the documentation i need to set the variable mongodbServer inside the mongo-express values file like so:

mongodbServer: "mongodb-0.mongodb-headless.mongo-replicaset.svc.cluster.local,mongodb-1.mongodb-headless.mongo-replicaset.svc.cluster.local,mongodb-2.mongodb-headless.mongo-replicaset.svc.cluster.local/admin?replicaSet=rs0"

But i get the following error inside the mongo express container:

mongodb://<user>:<password>@mongodb-0.mongodb-headless.mongo-replica
set.svc.cluster.local,mongodb-1.mongodb-headless.mongo-replicaset.svc.cluster.local,mongodb-2.mongodb-headless.mongo-replicaset.svc.cl
uster.local/admin?replicaSet=rs0:27017/
MongoError: setName from ismaster does not match provided connection setName [rs0] != [{ rs0: '27017/' }]`

For some reason the value :27017/ gets always attached at the end of my connectionsstring. So this error is basically clear to me due the incorrect connectionsstring.

I am currently using the 1.0.0-alpha.4 image within the mongo express Helm chart.

Is there something i am missing here ?

Any help on that would just be awesome.

Best Regards Martin

sebastien-prudhomme commented 1 year ago

Hi @marth52, Im' sorry but I didn't test 1.0.0alpha at all. I'm waiting for an official 1.0.0 release for maybe 1 year...

jidckii commented 5 months ago

UP

jidckii commented 5 months ago

I customized chart. Need add

mongodbURLargs: "?replicaSet=rs0&authSource=admin&ssl=false"

for change ME_CONFIG_MONGODB_URL

image

Maybe I'll open a PR later