Now I have a MongoDB 4.2.23 Enterprise Atlas cluster created at https://cloud.mongodb.com/
I am unable to make pump and dashboard connect to that mongo cluster (even after setting relevant USESSL and optional SSLINSECURESKIPVERIFY variables as mentioned below.
pump.mongo.env
# Outdated variables in docs that doesn't work https://tyk.io/docs/tyk-pump/tyk-pump-configuration/tyk-pump-environment-variables/
# Docs should be updated
TYK_PMP_PUMPS_MONGO_META_MONGOUSESSL=true
TYK_PMP_PUMPS_MONGO_META_MONGOSSLINSECURESKIPVERIFY=true
TYK_PMP_PUMPS_MONGOAGGREGATE_META_MONGOUSESSL=true
TYK_PMP_PUMPS_MONGOAGGREGATE_META_MONGOSSLINSECURESKIPVERIFY=true
TYK_PMP_PUMPS_MONGOSELECTIVE_META_MONGOUSESSL=true
TYK_PMP_PUMPS_MONGOSELECTIVE_META_MONGOSSLINSECURESKIPVERIFY=true
TYK_PMP_PUMPS_MAIN_TYPE=mongo
TYK_PMP_PUMPS_MAIN_META_COLLECTIONNAME=tyk_analytics
TYK_PMP_PUMPS_MAIN_META_MONGOURL=mongodb+srv://<username>:<password>@something.xyz.mongodb.net/tyk_analytics
# added by me
TYK_PMP_PUMPS_MAIN_META_MONGOUSESSL=true
TYK_PMP_PUMPS_MAIN_META_MONGOSSLINSECURESKIPVERIFY=true
TYK_PMP_PUMPS_MAIN_META_MAXINSERTBATCHSIZEBYTES=80000
TYK_PMP_PUMPS_MAIN_META_MAXDOCUMENTSIZEBYTES=20112
TYK_PMP_PUMPS_MAINAGG_TYPE=mongo-pump-aggregate
TYK_PMP_PUMPS_MAINAGG_META_MONGOURL=mongodb+srv://<username>:<password>@something.xyz.mongodb.net/tyk_analytics
# added by me
TYK_PMP_PUMPS_MAINAGG_META_MONGOUSESSL=true
TYK_PMP_PUMPS_MAINAGG_META_MONGOSSLINSECURESKIPVERIFY=true
TYK_PMP_PUMPS_MAINAGG_META_USEMIXEDCOLLECTION=true
TYK_PMP_PUMPS_MAINAGG_META_TRACKALLPATHS=true
TYK_PMP_UPTIMEPUMPCONFIG_COLLECTIONNAME=tyk_uptime_analytics
TYK_PMP_UPTIMEPUMPCONFIG_MONGOURL=mongodb+srv://<username>:<password>@something.xyz.mongodb.net/tyk_analytics
# added by me
TYK_PMP_UPTIMEPUMPCONFIG_MONGOUSESSL=true
TYK_PMP_UPTIMEPUMPCONFIG_MONGOSSLINSECURESKIPVERIFY=true
TYK_PMP_UPTIMEPUMPCONFIG_MAXINSERTBATCHSIZEBYTES=500000
TYK_PMP_UPTIMEPUMPCONFIG_MAXDOCUMENTSIZEBYTES=200000
@Olu Connection string of this form mongodb://<username>:<password>@some-cluster-01-shard-00-00.abcde.mongodb.net:27017,some-cluster-01-shard-00-01.abcde.mongodb.net:27017,some-cluster-01-shard-00-02.abcde.mongodb.net:27017/tyk_analytics?replicaSet=atlas-fghij-shard-0&authSource=admin is working perfectly fine with pump If I set USESSL as
Issue is dashboard is still not working probably because TYK_DB_MONGOUSESSL=true as mentioned in docs is outdated/incorrect (like outdated pump variables mentioned above). Any idea how to make dashboard work with that same connection string with TLS?
Currently I am getting this error
time="2022-12-08T08:12:12Z" level=fatal msg="Could not connect to config store" error="no reachable servers"
Dashboard env
TYK_DB_LICENSEKEY=<license>
TYK_DB_STORAGE_MAIN_TYPE=mongo
TYK_DB_STORAGE_MAIN_CONNECTIONSTRING=<same string that works in pump>
TYK_DB_MONGOUSESSL=true # doesn't seem to be working although it's mentioned in docs
TYK_DB_STORAGE_MAIN_MONGOUSESSL=true # also doesn't work
...
Thanks. TYK_DB_MONGOURL is working perfectly fine with TYK_DB_MONGOUSESSL after removing TYK_DB_STORAGE_MAIN_ variables. Dashboard is starting although I couldn’t verify complete functionality since my license has been expired. I will try to renew that. I was following this demo tyk-pro-docker-demo/docker-compose.yml at master · TykTechnologies/tyk-pro-docker-demo · GitHub that created this confusion.