Tyk is not raising errors when speaking to a read only redis slave

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:21:18 +0000.
Sender:Pascal Combescot.
Date:Tuesday, 25 August 2015 16:48:26 UTC+1.

Hi,

When there is a change in the redis Cluster and Tyk is still talking to a slave, it is still answering success codes although it logs errors in storing the new created key :

When a run the following command

$ curl -X PUT http://localhost:8080/tyk/keys/key_value --header “x-tyk-authorization: TYK_TOKEN” --header “Content-Type:application/json” --data ‘{
“allowance”: 1000,
“rate”: 1000,
“per”: 1,
“expires”: 0,
“quota_max”: -1,
“access_rights”: {
“1”: {}
},
“org_id”: “”
}’

I get this response as it would be working normally :
{“key”:“key_value”,“status”:“ok”,“action”:“modified”}

Here is what I get in the tyk.log :
time=“2015-08-24T12:02:58+02:00” level=warning msg=“Tracked quota reset for key: key_value”
time=“2015-08-24T12:02:58+02:00” level=info msg=“New key added or updated.” key=“key_value”
time=“2015-08-24T12:02:58+02:00” level=error msg=“Error trying to set value:”
time=“2015-08-24T12:02:58+02:00” level=error msg=“READONLY You can’t write against a read only slave.”

Is it working as expected ?

thanks in advance

Pascal Combescot

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 25 August 2015 16:49:52 UTC+1.

Hi Pascal,

No, that should have propagated an error :frowning:

Can you raise a GH ticket?

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/f66d5413-0c05-4c67-ab81-7c0865e9c80c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Martin Buhr.
Date:Wednesday, 26 August 2015 08:41:12 UTC+1.

Raised issue #90 Tyk should error when the Redis storage handler can't read from Slave · Issue #90 · TykTechnologies/tyk · GitHub

Imported Google Group message.
Sender:Pascal Combescot.
Date:Wednesday, 26 August 2015 08:44:18 UTC+1.

I guess this is just bad luck :slight_smile:

Imported Google Group message.
Sender:Martin Buhr.
Date:Wednesday, 26 August 2015 08:45:58 UTC+1.

Hi,

Yeah I marked mine as a dupe :wink:

Went into an issue-raising frenzy from the feedback we’ve gathered recently…

thanks for adding the ticket, will leave your as the original…

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/2290f007-93b2-4a80-b67f-494eb049fd3f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.