Imported Google Group message.
Sender:Martin Buhr
.
Date:Thursday, 23 October 2014 13:47:52 UTC+1.
Looking at the output from tyk, it all seems to be working OK, the message about the analytics store is usually the last thing you see, so Tyk is running ok.
You can see if Tyk is behaving by trying to create an API key using the API, assuming you still have the default Tyk authentication key in your conf, this should create a key:
curl -H “x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7” -i -d ’
{
“allowance”: 999,
“rate”: 1000,
“per”: 60,
“expires”: 0,
“quota_max”: -1,
“quota_renews”: 1406121006,
“quota_remaining”: 0,
“quota_renewal_rate”: 60,
“org_id”: “0”
}’ http://localhost:8080/tyk/keys/create ; echo
You should see something like:
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 23 Oct 2014 12:24:00 GMT
Content-Length: 75
{“key”:“0b43859b080dd49316d3a4d9672fc1260”,“status”:“ok”,“action”:“create”}
Tyk should output:
INFO[0979] Generated new key - success. key=0b43859b080dd49316d3a4d9672fc1260
If all that appears in your console then Tyk is properly configured and is creating keys in Redis.
This might be a stupid question, but have you updated the tyk_analyitcs.conf file? It should have all the same redis details as the tyk.conf file, it looks like this:
{
“listen_port”: 3000,
“tyk_api_config”: {
“Host”: “http://localhost”,
“Port”: “5000”,
“Secret”: “352d20ee67be67f6340b4c0605b044b7”
},
“mongo_url”: “mongodb://localhost/tyk_analytics”,
“page_size”: 10,
“admin_secret”: “12345”,
“redis_port”: 6379,
“redis_host”: “localhost”,
“redis_password”: “test”,
“force_api_defaults”: true,
“notify_on_change”: true,
“license_owner”: “Your Name”
}
They are separate because the dashboard assumes it may be running on a different host, or may be using a different redis server for it’s purposes. You should be able to log in even without Redis though, redis in the dashboard is only used for session storage and some pub/sub stuff. It might be that Tyk-dashboard can’t see your MongoDB, you just need to make sure the settings in tyk_analytics.conf are the same as in your tyk.conf.
Let me know how that goes…
Cheers,
M.