No analytics data pushed into MongoDB when I use mongo 4.0 with auth

I have run tyk on Ubuntu 16.04 server ,the version for all the parts are:
Gaeway version: 2.7.0
Pump version 0.5.2
Mongo Version 4.0
Redis Version 4.011
DashBoard Versiion 1.7
I use user password for mongodb .
when I run all of the parts .In mongo db I cant see analytics data ,so I found errors in the container of pump ,just like
time=“Sep 10 11:31:11” level=info msg=“## Tyk Analytics Pump, v0.5.2 ##”
time=“Sep 10 11:31:11” level=info msg=“Init Pump: MongoDB Aggregate Pump”
time=“Sep 10 11:31:11” level=info msg=“-- No max batch size set, defaulting to 10MB”
time=“Sep 10 11:31:11” level=info msg=“-- No max document size set, defaulting to 10MB”
time=“Sep 10 11:31:11” level=info msg=“Init Pump: MongoDB Pump”
time=“Sep 10 11:31:11” level=info msg=“-- No max batch size set, defaulting to 10MB”
time=“Sep 10 11:31:11” level=info msg=“-- No max document size set, defaulting to 10MB”
time=“Sep 10 11:31:11” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:16” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:21” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:26” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:31” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:36” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:41” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:46” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:51” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:31:56” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:32:01” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
time=“Sep 10 11:32:06” level=error msg=“Mongo connection failed:server returned error on SASL authentication step: Authentication failed.”
^C

and my pump.conf is :
{
“analytics_storage_type”: “redis”,
“analytics_storage_config”: {
“type”: “redis”,
“host”: “168.1.13.93”,
“port”: 6379,
“hosts”: null,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 100,
“optimisation_max_active”: 0,
“enable_cluster”: false
},
“purge_delay”: 10,
“pumps”: {
“mongo”: {
“name”: “mongo”,
“meta”: {
“collection_name”: “tyk_analytics”,
“mongo_url”: “mongodb://tong:[email protected]:27017/tong_apigw”
}
},
“mongo-pump-aggregate”: {
“name”: “mongo-pump-aggregate”,
“meta”: {
“mongo_url”: “mongodb://tong:[email protected]:27017/tong_apigw”,
“use_mixed_collection”: true
}
}
},
“uptime_pump_config”: {
“collection_name”: “tyk_uptime_analytics”,
“mongo_url”: “mongodb://tong:[email protected]:27017/tong_apigw”
},
“dont_purge_uptime_data”: false
}

I just try /etc/hosts to find my issue ,but it doesn’t work .Please help me for this issue…thank you

Hi

Is the dashboard connecting to mongo with the same connection string? can you share your tyk_analytics.conf for me as well.

Thanks
Josh

thank you for help !
tyk_analytics.conf use the same mongo configuration:
{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://172.17.0.4”,
“Port”: “8080”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
},
“mongo_url”: “mongodb://tong:[email protected]:27017/tong_apigw”,
“mongo_use_ssl”: false,
“mongo_ssl_insecure_skip_verify”: false,
“page_size”: 10,
“admin_secret”: “12345”,
“shared_node_secret”: “352d20ee67be67f6340b4c0605b044b7”,
“redis_port”: 6379,
“redis_host”: “172.17.0.2”,
“redis_password”: “”,
“enable_cluster”: false,
“force_api_defaults”: false,
“notify_on_change”: true,
“license_key”: “eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbGxvd2VkX25vZGVzIjoiN2Y1ZTM4MWYtY2I2YS00MzY4LTdhNmItN2EzZjJkNDBjN2RlIiwiZXhwIjoxNTUzMDUwMjMxLCJvd25lciI6IjVhYjA3NmY3NDVmOTJlMDllYTY2OWZlZSJ9.w_8G_MDSZcU-g0234-wuGTkUVddUk_dcZrZZI19l5qn8OblPF3tRbPJgFPsU6JOHGWKfvej_vTc29hcNKg_iyQoQ1lVdRVzY0djROWgiJ6b5tS4nfJx9I7YyYgZpSK06UkwUpH9U-rjhvQemctJ3F97Hg0OrT1LLUb7SZ2LbOJQSB-AUF6B3EfcnF-zS2QxW9LqPfp3O0IWRrFZ62DEEaruJEBz53teWRJSJlyYdPUHHOTwB2NWk0u9Uzkv55Z0mC8g46EAilLpE_YvPzAyprDcpDNMALJWBl11-RjEX-jOLTdBIRh3MM-4KIewWURPlp1GoD7Myu-11SLW-5ZHA2Q”,
“redis_database”: 0,
“hash_keys”: false,
“email_backend”: {
“enable_email_notifications”: false,
“code”: “”,
“settings”: null,
“default_from_email”: “”,
“default_from_name”: “”,
“dashboard_hostname”: “”
},
“hide_listen_path”: false,
“sentry_code”: “”,
“sentry_js_code”: “”,
“use_sentry”: false,
“enable_master_keys”: false,
“enable_duplicate_slugs”: true,
“show_org_id”: true,

}

when I invoked the admin API to create an organisation ,it failed …

Do you have errors in the dashboards logs? If you look up the error from pump it is related to the authentication. Is your user pass combination definitely correct, i woild suggest going to the mongo docs to read up and make sure you are buikding your connection string correctly

Thanks Josh

pump log:
time=“Sep 14 08:20:48” level=info msg=“## Tyk Analytics Pump, v0.5.2 ##”
time=“Sep 14 08:20:48” level=info msg=“-- No max batch size set, defaulting to 10MB”
time=“Sep 14 08:20:48” level=info msg=“-- No max document size set, defaulting to 10MB”
time=“Sep 14 08:20:48” level=info msg=“Init Pump: MongoDB Pump”
time=“Sep 14 08:20:48” level=info msg=“Init Pump: MongoDB Aggregate Pump”
time=“Sep 14 08:20:48” level=info msg=“-- No max batch size set, defaulting to 10MB”
time=“Sep 14 08:20:48” level=info msg=“-- No max document size set, defaulting to 10MB”
time=“Sep 14 08:20:48” level=info msg=“Init Uptime Pump: MongoDB Pump”
time=“Sep 14 08:20:48” level=info msg=“Starting purge loop @10(s)”
time=“Sep 14 08:20:58” level=warning msg=“Connection dropped, connecting…”
time=“Sep 14 08:20:58” level=warning msg=“Connection dropped, connecting…”

====================================================================
gateway log:
time=“Sep 14 08:20:23” level=info msg=“Redis connection pools are ready after number of retires” currRetry=0
time=“Sep 14 08:20:23” level=info msg=“Redis connection pools are ready”
time=“Sep 14 08:20:23” level=info msg=“–> Standard listener (http)” port=“:8080”
time=“Sep 14 08:20:23” level=info msg=“Setting up Server”
time=“Sep 14 08:20:23” level=info msg=“Registering node.”
time=“Sep 14 08:20:23” level=error msg=“Request failed with error Get http://168.1.13.93:3000/register/node: dial tcp 168.1.13.93:3000: connect: connection refused; retrying in 5s”

time=“Sep 14 08:20:39” level=error msg=“Request failed with error Get http://168.1.13.93:3000/register/node: read tcp 172.17.0.4:52978->168.1.13.93:3000: read: connection reset by peer; retrying in 5s”
time=“Sep 14 08:20:44” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:20:49” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:32:48” level=debug msg=“Setting up analytics DB connection”
time=“Sep 14 08:32:48” level=debug msg=“Connecting to redis cluster”
time=“Sep 14 08:32:48” level=debug msg=“Creating new Redis connection pool”
time=“Sep 14 08:32:48” level=debug msg=“[STORE] Getting WAS: PollerActiveInstanceID”
time=“Sep 14 08:32:48” level=debug msg=“[STORE] Getting: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:32:48” level=debug msg=“Storage Engine already initialised…”
time=“Sep 14 08:32:48” level=debug msg=“Analytics pool workers number” ps=100
time=“Sep 14 08:32:48” level=debug msg=“Analytics total buffer (channel) size” recordsBufferSize=1000
time=“Sep 14 08:32:48” level=debug msg=“Analytics pool worker buffer size” workerBufferSize=10
time=“Sep 14 08:32:48” level=debug msg=“Active Instance is: 7d1d1fb9-89d0-426e-8143-031f1ffc74b7”
time=“Sep 14 08:32:48” level=debug msg=“— I am: 95b2ce42-fc25-46b0-baf4-d8d3bff4b12c”
time=“Sep 14 08:32:48” level=debug msg=“New master found, no tests running”
time=“Sep 14 08:32:48” level=debug msg=“Notifier will not work in hybrid mode”
time=“Sep 14 08:32:48” level=debug msg=“Storage Engine already initialised…”
time=“Sep 14 08:32:48” level=info msg=“Setting up analytics normaliser”
time=“Sep 14 08:32:48” level=debug msg=“Redis log hook active”
time=“Sep 14 08:32:48” level=info msg=“PIDFile location set to: ./tyk-gateway.pid”
time=“Sep 14 08:32:48” level=debug msg=“Initialising default org store”
time=“Sep 14 08:32:48” level=debug msg=“Storage Engine already initialised…”
time=“Sep 14 08:32:48” level=debug msg=“Storage Engine already initialised…”
time=“Sep 14 08:32:48” level=info msg=“Initialising Tyk REST API Endpoints”
time=“Sep 14 08:32:48” level=debug msg=“Loaded API Endpoints”
time=“Sep 14 08:32:48” level=debug msg=“Storage Engine already initialised…”
time=“Sep 14 08:32:48” level=debug msg=“[STORE] SET Raw key is: redis-test-aa2d422e-e84e-4015-a65b-ff32b7d65172”
time=“Sep 14 08:32:48” level=debug msg=“[STORE] Setting key: redis-test-aa2d422e-e84e-4015-a65b-ff32b7d65172”
time=“Sep 14 08:32:48” level=debug msg=“Storage Engine already initialised…”
time=“Sep 14 08:32:48” level=debug msg=“[STORE] Getting WAS: redis-test-aa2d422e-e84e-4015-a65b-ff32b7d65172”
time=“Sep 14 08:32:48” level=debug msg=“[STORE] Getting: redis-test-aa2d422e-e84e-4015-a65b-ff32b7d65172”
time=“Sep 14 08:32:48” level=info msg=“Redis connection pools are ready after number of retires” currRetry=0
time=“Sep 14 08:32:48” level=info msg=“Redis connection pools are ready”
time=“Sep 14 08:32:48” level=info msg=“–> Standard listener (http)” port=“:8080”
time=“Sep 14 08:32:48” level=info msg=“Setting up Server”
time=“Sep 14 08:32:48” level=info msg=“Registering node.”
time=“Sep 14 08:32:48” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:32:49” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:50” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:51” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:52” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:53” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:53” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:32:54” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:55” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:56” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:57” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:58” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:32:58” level=debug msg=“[STORE] Getting WAS: PollerActiveInstanceID”
time=“Sep 14 08:32:58” level=debug msg=“[STORE] Getting: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:32:58” level=debug msg=“Error trying to get value:redigo: nil returned”
time=“Sep 14 08:32:58” level=debug msg=“No Primary instance found, assuming control”
time=“Sep 14 08:32:58” level=debug msg=“[STORE] SET Raw key is: PollerActiveInstanceID”
time=“Sep 14 08:32:58” level=debug msg=“[STORE] Setting key: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:32:58” level=info msg=“Starting Poller”
time=“Sep 14 08:32:58” level=debug msg=“—> Initialising checker”
time=“Sep 14 08:32:58” level=debug msg=“[HOST CHECKER] Config:TriggerLimit: 2”
time=“Sep 14 08:32:58” level=debug msg=“[HOST CHECKER] Config:Timeout: ~10”
time=“Sep 14 08:32:58” level=debug msg=“[HOST CHECKER] Config:WorkerPool: 50”
time=“Sep 14 08:32:58” level=debug msg=“[HOST CHECKER] Init complete”
time=“Sep 14 08:32:58” level=debug msg=“—> Starting checker”
time=“Sep 14 08:32:58” level=debug msg=“[HOST CHECKER] Starting…”
time=“Sep 14 08:32:58” level=debug msg=“[HOST CHECKER] Check loop started…”
time=“Sep 14 08:32:58” level=debug msg=“[HOST CHECKER] Host reporter started…”
time=“Sep 14 08:32:58” level=debug msg=“—> Checker started.”
time=“Sep 14 08:32:58” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:32:59” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:00” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:01” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:02” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:03” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:03” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:04” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:05” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:06” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:07” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:08” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:08” level=debug msg=“[STORE] Getting WAS: PollerActiveInstanceID”
time=“Sep 14 08:33:08” level=debug msg=“[STORE] Getting: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:08” level=debug msg=“Primary instance set, I am master”
time=“Sep 14 08:33:08” level=debug msg=“[STORE] SET Raw key is: PollerActiveInstanceID”
time=“Sep 14 08:33:08” level=debug msg=“[STORE] Setting key: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:08” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:09” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:10” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:11” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:12” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:13” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:13” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:14” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:15” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:16” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:17” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:18” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:18” level=debug msg=“[STORE] Getting WAS: PollerActiveInstanceID”
time=“Sep 14 08:33:18” level=debug msg=“[STORE] Getting: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:18” level=debug msg=“Primary instance set, I am master”
time=“Sep 14 08:33:18” level=debug msg=“[STORE] SET Raw key is: PollerActiveInstanceID”
time=“Sep 14 08:33:18” level=debug msg=“[STORE] Setting key: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:18” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:19” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:20” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:21” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:22” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:23” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:23” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:24” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:25” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:26” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:27” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:28” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:28” level=debug msg=“[STORE] Getting WAS: PollerActiveInstanceID”
time=“Sep 14 08:33:28” level=debug msg=“[STORE] Getting: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:28” level=debug msg=“Primary instance set, I am master”
time=“Sep 14 08:33:28” level=debug msg=“[STORE] SET Raw key is: PollerActiveInstanceID”
time=“Sep 14 08:33:28” level=debug msg=“[STORE] Setting key: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:28” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:29” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:30” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:31” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:32” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:33” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:33” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:34” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:35” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:36” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:37” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:38” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”
time=“Sep 14 08:33:38” level=debug msg=“[STORE] Getting WAS: PollerActiveInstanceID”
time=“Sep 14 08:33:38” level=debug msg=“[STORE] Getting: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:38” level=debug msg=“Primary instance set, I am master”
time=“Sep 14 08:33:38” level=debug msg=“[STORE] SET Raw key is: PollerActiveInstanceID”
time=“Sep 14 08:33:38” level=debug msg=“[STORE] Setting key: host-checker:PollerActiveInstanceID”
time=“Sep 14 08:33:38” level=error msg=“Response failed with code 404; retrying in 5s”
time=“Sep 14 08:33:39” level=debug msg=“Getting exp for key: analytics-tyk-system-analytics”

====================================================================
dashboard log:
time=“Sep 14 08:22:19” level=warning msg=Reconnecting
time=“Sep 14 08:22:19” level=info msg=“Creating new Redis connection pool”
time=“Sep 14 08:22:19” level=error msg=“Redis disconnected or error received, attempting to reconnect: NOAUTH Authentication required.”
time=“Sep 14 08:22:19” level=error msg=“Redis disconnected or error received, attempting to reconnect: NOAUTH Authentication required.”
time=“Sep 14 08:22:19” level=error msg=“Connection to Redis failed, reconnect in 10s” err=“NOAUTH Authentication required.”
time=“Sep 14 08:22:20” level=error msg=“Could not send notification”
time=“Sep 14 08:22:20” level=error msg=“NOAUTH Authentication required.”
time=“Sep 14 08:22:22” level=error msg=“Could not send notification”
time=“Sep 14 08:22:22” level=error msg=“NOAUTH Authentication required.”
time=“Sep 14 08:22:24” level=error msg=“Could not send notification”
time=“Sep 14 08:22:24” level=error msg=“NOAUTH Authentication required.”
time=“Sep 14 08:22:24” level=error msg=“Multi command failed: NOAUTH Authentication required.”
time=“Sep 14 08:22:24” level=error msg=“NOAUTH Authentication required.”
time=“Sep 14 08:22:26” level=error msg=“Could not send notification”
time=“Sep 14 08:22:26” level=error msg=“NOAUTH Authentication required.”
time=“Sep 14 08:22:28” level=error msg=“Could not send notification”
time=“Sep 14 08:22:28” level=error msg=“NOAUTH Authentication required.”
time=“Sep 14 08:22:29” level=error msg=“Multi command failed: NOAUTH Authentication required.”
time=“Sep 14 08:22:29” level=error msg=“NOAUTH Authentication required.”
time=“Sep 14 08:22:29” level=warning msg=Reconnecting
time=“Sep 14 08:22:29” level=info msg=“Creating new Redis connection pool”

I have check the mongo driver for go ,on its website mgo package - gopkg.in/mgo.v2 - Go Packages
We can see some specification about the connection url format and I pasted it below:

==============================================
The seed servers must be provided in the following format:

[mongodb://][user:pass@]host1[:port1][,host2[:port2],…][/database][?options]
For example, it may be as simple as:

localhost
Or more involved like:

mongodb://myuser:mypass@localhost:40001,otherhost:40001/mydb

===============================================
my mongo info is:
host: 168.1.13.93
port: 27017
mongousername:tong
passord:apigw
database name: tong_apigw

so my connetion url is :mongodb://tong:[email protected]:27017/tong_apigw

According to mgo package - gopkg.in/mgo.v2 - Go Packages the connection’s format is right
and I check my mongo connection by java program ,it works.
But When tyk connect this mongo it failed ,Is that someting wrong with mongo server version and mongo’s go driver mgo.v2 version?

I use mongo 4.0 in dev without issues, can you try with a lower version and see if that makes a difference?

Have you checked your Redis settings in the dashboard configuration? I see an “auth required” error.

there are info level log :level=info msg=“Creating new Redis connection pool”,so redis configuration is ok.
thanks

Thank you so so much!
I have find my issue, It’s not the things about mongo .
When I rebuild the container ,I just try docker command line , without --link param ,then it works .

Thank you for your help again.

Great, let us know if you experience any other issues.

Ok! Thank you all so much!