Bad replay response when using tengine as Proxy
When I replaying test traffic to production using middleware, the middleware received such replay response: 3 08d6d6e1812c3fd08f6312f928a0287ff14fa3c3 266404715 HTTP/1.1 524 Accepted Date: Mon, 30 Nov 2015 16:57:13 CST Content-Length: 0 Content-Type: text/plain; charset=utf-8
The http status is 524??? and no content.
The correct replay response should be like this: 3 95a93027b930236f797aa94ed4e5c002211bf95f 23985174 HTTP/1.1 200 OK Server: nginx/1.5.6 Date: Mon, 30 Nov 2015 08:57:54 GM Content-Type: application/json;charset=utf-8 Connection: close
{"id":6071895148555575786,"fullname":"aaa","username":null,"email":null,"enterpriseUser":false,"defaultAvatar":true}
Replaying test traffic to test environment is OK.
Could someone help me, how to resolve this problem? Thanks.
[DEBUG][PID 27103][1448935292301568533][0.304927ms] [EMITTER] input: 1 5977f98b244305a98f9ac30c7afa5f2422560c18 1448934603007412831
POST /oauth2/token?grant_type=password HTTP/1.0
Host: 127.0.0.1:8800
Connection: close
Content-Length: 42
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Cache-Control: no-cache
Origin: chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
Authorization: Basic UTRtOEl2NVFaYmoyYWhhaFl6Mk1wOVJEQ3VXMVdaMEc6ckx1Uno2bDZxWTNOdVhtYk53eHdzUmZMMnh1dWxhVkU=
Content- 804 from: Modifying traffic using './middleware.jar' command
[DEBUG][PID 27103][1448935292301825305][0.256772ms] [HTTPClient] Connecting: https://account.glodon.com:443
[DEBUG][PID 27103][1448935292461554131][159.728826ms] [HTTPClient] Response read error EOF &{0xc20a564000 true {0 0}
Do you use smth like cloudflare as proxy server? 524 is custom status invented by CloudFlare saying that timeout occurred https://support.cloudflare.com/hc/en-us/articles/200171926-Error-524-A-timeout-occurred
We used nginx as proxy.
I have set timeout to 30s : ./gor --input-file "account.gor|100%" --output-http "https://account.glodon.com" --middleware "./middleware.jar" --verbose=true --debug=true --output-http-timeout 30s
Still it has this problem.
I have tried curl at the replay server. The response is OK.
This error only occured when replaying to another network environment.
This issue is solved. The proxy we used is Tengine (another version of nginx, http://tengine.taobao.org/), not nginx. When changed to nginx, It is OK.
I don't know why it not work with tengine……
Interesting, i will try tengine when will have some time.