Problems with Tyk in a Docker container

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:09:45 +0000.
Sender:Emmanuel Nyberg.
Date:Wednesday, 15 April 2015 15:18:04 UTC+1.

Hi,

I am attempting to build a simple self-contained Docker container for Tyk, with Mongo, Redis and tyk, tyk-analytics and tyk-host-manager in the same container. I have the gateway up and functional with the httpbin test app, and I can turn use_db_app_configs on and define an app through the dashboard, but I can’t get the statistics to register - the dashboard graph doesn’t move.

It looks like this has to do with Redis authentication somehow as I get these kinds of errors in my log:

time=“2015-04-15T13:59:33Z” level=debug msg=“Getting key: orgkey.552e6e8ab01e910039000001”
time=“2015-04-15T13:59:33Z” level=debug msg=“Getting: orgkey.552e6e8ab01e910039000001”
time=“2015-04-15T13:59:33Z” level=debug msg=“Error trying to get value:redigo: nil returned”
time=“2015-04-15T13:59:33Z” level=debug msg=“Key does not exist”

I have attempted to start Redis with requirepassword and defined the password in all my configs, and I have tried with no password.

Do you have any idea on what I have done wrong?

I start everything through runit, and have staggered the start times so Mongo and Redis comes up before the Tyk components.

I have attached my conf files.

Thanks for your great work!

/Emmanuel Nyberg

Imported Google Group message.
Sender:Martin Buhr.
Date:Wednesday, 15 April 2015 15:35:56 UTC+1.

Hi Emmanuel,

Looking at your tyk.conf, you need to fill in the following fields as follows:

“mongo_collection”: “tyk_analytics”,
“mongo_db_name”: “tyk_analytics”

Rather confusingly, the collection name must be set to “tyk_analytics” for dashboard to find the data, and for the gateway to write the data to the correct place.

Otherwise it looks ok. Those errors you are seeing are debug messages, you can ignore the key not found errors, they are returned by Redis (e.g. if you go to the dashboard and aren’t logged in).

Let me know how you get on :slight_smile:

thanks,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Emmanuel Nyberg.
Date:Wednesday, 15 April 2015 15:35:56 UTC+1.

Hi Emmanuel,

Looking at your tyk.conf, you need to fill in the following fields as follows:

“mongo_collection”: “tyk_analytics”,
“mongo_db_name”: “tyk_analytics”

Rather confusingly, the collection name must be set to “tyk_analytics” for dashboard to find the data, and for the gateway to write the data to the correct place.

Otherwise it looks ok. Those errors you are seeing are debug messages, you can ignore the key not found errors, they are returned by Redis (e.g. if you go to the dashboard and aren’t logged in).

Let me know how you get on :slight_smile:

thanks,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Wednesday, 15 April 2015 15:50:02 UTC+1.

Hi,

Thanks a lot, it’s working fine now!

  • show quoted text -