我正在尝试在SalesForce中使用Streaming API,它基本上是使用Comet / Long Polling技术实现的。在客户端,我们使用Java与jetty-http,bayeux-api,cometd-java-client
如果我们运行没有代理的应用程序,一切都很完美。 但如果客户端正在使用网络代理
一个。它能够进行用户身份验证
B中。长轮询握手是成功的
℃。 meta / connect最初有402错误(参考下面的日志)但最终成功
d。 永远不会收到服务器端的任何回复
任何想到这里发生了什么,以及为什么代理导致了这一点,即使上面A,B,C中的所有HTTP连接请求都成功了?
[12:23:50.504-HttpClient-21][CHANNEL:META_CONNECT]: {"id":"5","error":"402::Unknown client","successful":false,"advice":{"interval":500,"reconnect":"handshake"},"channel":"/meta/connect","clientId":"jj1ajqshe3lkkpp1rsiy5g30ppey"}
[12:23:50.504-HttpClient-21][CHANNEL:META_CONNECT] Error : 402::Unknown client
[12:23:51.760-HttpClient-23][CHANNEL:META_HANDSHAKE]: {"id":"6","minimumVersion":"1.0","supportedConnectionTypes":["long-polling"],"successful":true,"channel":"/meta/handshake","clientId":"ingkpdlgu6uy43m06ei30spqpl","version":"1.0"}
[12:23:53.170-HttpClient-19][CHANNEL:META_CONNECT]: {"id":"7","error":"402::Unknown client","successful":false,"advice":{"interval":500,"reconnect":"handshake"},"channel":"/meta/connect","clientId":"ingkpdlgu6uy43m06ei30spqpl"}
[12:23:53.170-HttpClient-19][CHANNEL:META_CONNECT] Error : 402::Unknown client
[12:23:54.408-HttpClient-22][CHANNEL:META_HANDSHAKE]: {"id":"8","minimumVersion":"1.0","supportedConnectionTypes":["long-polling"],"successful":true,"channel":"/meta/handshake","clientId":"fr1r22f6au89xpm1lbucrp26fs27","version":"1.0"}
[12:24:00.757-HttpClient-19][CHANNEL:META_CONNECT]: {"id":"9","successful":true,"advice":{"interval":0,"reconnect":"retry","timeout":110000},"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
[12:24:07.051-HttpClient-19][CHANNEL:META_CONNECT]: {"id":"10","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
[12:24:13.348-HttpClient-22][CHANNEL:META_CONNECT]: {"id":"11","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
[12:24:19.643-HttpClient-18][CHANNEL:META_CONNECT]: {"id":"12","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
[12:24:25.935-HttpClient-18][CHANNEL:META_CONNECT]: {"id":"13","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
[12:24:33.429-HttpClient-24][CHANNEL:META_CONNECT]: {"id":"14","successful":true,"channel":"/meta/connect","clientId":"fr1r22f6au89xpm1lbucrp26fs27"}
答案 0 :(得分:0)
可能是代理正在缓冲响应的情况。它发生在例如使用nginx和 proxy_buffering
指令。