Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoveToxic: HTTP 503: Unexpected response code, expected 204 #500

Open
sergey-kurenkov opened this issue Apr 21, 2023 · 5 comments
Open
Labels

Comments

@sergey-kurenkov
Copy link

Sometimes (not always) I receive this error.

This is an example from my log:

...
gengw_mdt Added upstream reset_peer toxic 'reset_peer_upstream' on proxy 'gengw_mdt'
gengw_mdt Added upstream timeout toxic 'timeout_upstream' on proxy 'gengw_mdt'
gengw_mdt Removed toxic 'timeout_upstream' on proxy 'gengw_mdt'
gengw_mdt Removed toxic 'reset_peer_upstream' on proxy 'gengw_mdt'
gengw_mdt: going to sleep for 394 seconds
gengw_mdt: adding reset_peer toxicity
gengw_mdt Added downstream reset_peer toxic 'reset_peer_downstream' on proxy 'gengw_mdt'
gengw_mdt Removed toxic 'reset_peer_downstream' on proxy 'gengw_mdt'
gengw_mdt: going to sleep for 459 seconds
gengw_mdt: adding bandwidth_50kb toxicity for 246 seconds
gengw_mdt Added downstream bandwidth toxic 'bandwidth_downstream' on proxy 'gengw_mdt'
Failed to remove toxic: failed to remove toxic 'bandwidth_downstream' from proxy 'gengw_mdt': RemoveToxic: HTTP 503: Unexpected response code, expected 204
gengw_mdt
gengw_mdt: going to sleep for 512 seconds
gengw_mdt: adding reset_peer toxicity
Failed to add toxic: failed to retrieve proxy with name `gengw_mdt`: Proxy: HTTP 503: Unexpected response code, expected 200
gengw_mdt
Failed to remove toxic: failed to retrieve proxy with name `gengw_mdt`: Proxy: HTTP 503: Unexpected response code, expected 200
gengw_mdt
gengw_mdt: going to sleep for 338 seconds
gengw_mdt: adding bandwidth_50kb toxicity for 170 seconds
Failed to add toxic: failed to retrieve proxy with name `gengw_mdt`: Proxy: HTTP 503: Unexpected response code, expected 200
gengw_mdt
Failed to remove toxic: failed to retrieve proxy with name `gengw_mdt`: Proxy: HTTP 503: Unexpected response code, expected 200
gengw_mdt
@sergey-kurenkov
Copy link
Author

sergey-kurenkov commented Apr 21, 2023

/tp # ./toxiproxy-cli --version
toxiproxy-cli version 2.5.0
/tp # ./toxiproxy --version
toxiproxy-server version 2.5.0
/tp # 

@sergey-kurenkov sergey-kurenkov changed the title RemoveToxic: HTTP 503: Unexpected response RemoveToxic: HTTP 503: Unexpected response code, expected 204 Apr 21, 2023
@sergey-kurenkov
Copy link
Author

This is a config file:

[
  {
    "name": "gengw_svc",
    "listen": "0.0.0.0:19102",
    "upstream" : "localhost:9102",
    "enabled": true
  },
  {
    "name": "gengw_mdt",
    "listen": "0.0.0.0:19103",
    "upstream" : "localhost:9103",
    "enabled": true
  }
]

@miry
Copy link
Contributor

miry commented Apr 24, 2023

@sergey-kurenkov It is not clear how toxiproxy-server is deployed from your example. I see those only client logs. Would like to provide a example how I could reproduce the problem on local machine?

@miry
Copy link
Contributor

miry commented Apr 24, 2023

hm, actually it could be related to https://github.com/Shopify/toxiproxy/pull/422/files
It means there is a resource locked, that prevent to remove resource.

Context:

In 2.4 it was a report when using of Java client the toxiproxy was stuck to remove specific proxy. It was some sort race condition, when mutating the proxy and traffic is going on.
It was introduced few PRs: return api response as fast as possible 503 and force drop connection after some time.

@miry miry added the bug label Apr 24, 2023
@miry
Copy link
Contributor

miry commented Apr 24, 2023

cc: @dianadevasia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants