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
Add a toxic to simulate "connection reset" #238
Comments
You should get that when the proxy is in a Yeah... I'm not sure it's possible to trigger one of those through the usual socket API which means it's hard to write a toxic to do this. It's an OS thing no? I'm a little flaky on my understanding of this. |
I'm also interested by this usecase.
client class connects, then sleeps two seconds before attempting to read the stream from the now defunct server socket Then, I dont know if it's easy to translate this sample/behaviour onto custom toxiproxy toxic. |
I do not understand it deeply enough to know how to simulate it but there must be a way to do something at the other end (toxiproxy) here to simulate "connection reset by peer" . @boly38 What you describe is I think the other case, when the connection is not reset by the peer but within the JVM itself due to trying to read from a closed socket or something like that. |
Alrighty. I was wrong. We can simulate a connection reset by peer from an application. Here's a Go script I wrote that triggers a connection reset by peer using Running the experiment looks like this:
This sounds like something we could for sure support in Toxiproxy. |
I don't have time to work on this. I may have time to suggest a way to implement it. Until then, my only thoughts are that we'd need to figure out how to trigger a
|
A problem I experience regularly (in Java) is the
java.net.SocketException: Connection reset [by peer]
. It would be awesome to have a toxic that can cause it. Thanks!Some background: https://docs.oracle.com/javase/8/docs/technotes/guides/net/articles/connection_release.html
The text was updated successfully, but these errors were encountered: