Tyk Redis is either down or not configured

Hi,

I am using tyk-pro demo master in docker compose (GitHub - TykTechnologies/tyk-pro-docker-demo: Tyk Pro demo using docker and docker compose, supercedes tyk_quickstart).

However, when I used the command to start the containers, I saw a log message from Tyk gateway saying that:

Redis health check failed" error="storage: Redis is either down or was not configured

The /hello gives this message:

{“status”:“fail”,“version”:“v4.0.0”,“description”:“Tyk GW”,“details”:{“redis”:{“status”:“fail”,“output”:“storage: Redis is either down or was not configured”,“componentType”:“datastore”,“time”:“2022-07-14T08:41:59Z”}}}

And even I created a simple API in the dashboard, I also cannot reach that API. I got 404 not found message when I tried to curl that API.

What is the reason for this error (redis not configure)? Is there any setting that I have to do?

Thanks.

Regards,

Maan Tarng

If the gateway log level is a warning then you can ignore it as suggested on this thread

However, it appears the gateway log level is an error as seen from the result of your shared gateway health status.

{“status”:“fail”,“version”:“v4.0.0”,“description”:“Tyk GW”,“details”:{“redis”:{“status”:“fail”,“output”:“storage: Redis is either down or was not configured”,“componentType”:“datastore”,“time”:“2022-07-14T08:41:59Z”}}}

This simply means that there is an issue with your Redis and it’s either down/not started. Or it has not been configured with the gateway. To resolve, kindly check the gateway storage configuration. Here is a sample of what it should look like

{
...
"storage": {
		"database": 0,
		"enable_cluster": false,
		"host": "tyk-open-source-redis",
		"hosts": null,
		"optimisation_max_active": 5000,
		"optimisation_max_idle": 3000,
		"password": "",
		"port": 6000,
		"type": "redis",
		"username": ""
	}
}

Another issue that maybe occurring is Redis cluster misconfiguration.

Hi @Olu

Is it a required to set “enable_cluster” to false in my case?

Are you using Redis clusters? If yes, then setting enable_cluster: true and following our guide on configuring Redis clsuter would help resolve the issue.

If not, then I would advise to set it to false.

@Olu Noted. Thanks for your help and suggestion.