Tyk Dashboard not using the same redis

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:19:07 +0000.
Sender:S. Alexander Zaman.
Date:Thursday, 30 July 2015 17:18:45 UTC+1.

Hi Martin,

We’re trying to get tyk set up on a backup server and noticed some very bizarre behavior. We are using the docker setup of tyk and have been successful in getting all the dockers running. However, the tyk_dashboard seems to not be connecting to the same redis database (which we copied over from another dump file). For example,

  • The user that we use ‘j…@test.com’ does not log in. I had to use tyk_analytics to create a new user
  • the new user created by tyk_analytics is not in the redis database when I checked it afterwards
  • The dashboard does not have the api that I had created before migrating the redis dump file.

I checked inside the mongo and it seems like everything is linking up the dashboard and redis just fine.

Do you have any idea of what could be preventing the dashboard from linking up with redis?

Best,
Alex

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 30 July 2015 17:32:06 UTC+1.

Hi Alex,

All users that log into the dashboard are stored in MongoDB not Redis, all that gets stored in redis would be some session data, is the backup dashboard instance looking at the correct MongoDB instance? You will need to backup the Mongo DB and move it to your backup.

Redis stores all the key and analytics data, not API information - that is stored in memory by Tyk Gateway and pulled from MongoDB when it starts up (if using database backed mode, otherwise it pulls them from disk).

Hope that helps :slight_smile:

Cheers,
Martin

Imported Google Group message.
Sender:S. Alexander Zaman.
Date:Thursday, 30 July 2015 17:45:51 UTC+1.

Thanks for your quick response! I checked the mongo and there were a whole bunch of [email protected] users that I removed and things worked great.

Another weird thing that’s come up though is that I checked the mongo under tyk_apis and it had an entry for my ‘restricted’ api.

However, when checking the dashboard this did not show up. I created a new api that basically duplicated restricted and checked mongo and that showed up on mongo. Any idea why the former did not show up?

Once again thanks for your quick and useful response,
Best,
Alex

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 30 July 2015 18:06:22 UTC+1.

Hi Alex,

It may have been that when you created the new test users they belonged to a different organisation, and when you deleted the duplicates you removed the one that was linked to the same org as the API. Then when the login worked the API wasn’t shown because it was part of a different organisation than the user that logged in.

The command line user creation doesn’t check for existing users, that’s something we should probably address, it would have prevented the issue I think :slight_smile:

Cheers,
Martin