[QFJ-997] Http proxy doesnt reconnect upon lost fix session Created: 04/Dec/20 Updated: 26/Jan/22 |
|
Status: | Open |
Project: | QuickFIX/J |
Component/s: | Build |
Affects Version/s: | 2.1.1 |
Fix Version/s: | None |
Type: | Bug | Priority: | Default |
Reporter: | Krys | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 0 |
Labels: | http, initiator, proxy, reconnection |
Description |
Fix engine (initiator) doesnt reconnect upon the acceptor's restart when http proxy is being used. It keeps displaying "Pending connection not established after 270734 ms.", which is a consequence of not reconnecting at all. Is there any workaround for http proxy to trigger reconnection? We have configured ReconnectInterval, ProxyType=http, ProxyVersion=1.1. If we change proxy type to socks we are seeing the reconnect attempt due to /org/apache/mina/proxy/ProxyConnector.java:181, but would be nice to have the same functionality for http proxy. I also cant see any obvious way to set reconnectionNeeded variable that would potentially trigger the reconnection which i have tested by resetting it myself with a debugger. |
Comments |
Comment by Christoph John [ 05/Dec/20 ] |
I am not aware of any special handling which could stop reconnecting from working only for http proxy... Could it be that the http connection is still considered "active" on the proxy? Could you please check that with "netstat" or some other tool which lists open sockets. |
Comment by Krys [ 07/Dec/20 ] |
Unlike http proxy, i am observing socks proxy reconnecting, probably due to this: if (proxyIoSession.getRequest() instanceof SocksProxyRequest || proxyIoSession.isReconnectionNeeded()) { return conFuture; }Unless i need to configure http proxy with something else to get it reconnected. "QFJ Message Processor" #35 daemon prio=5 os_prio=0 tid=0x000000002b144800 nid=0xb090 waiting on condition [0x000000002fb8e000]
"QFJ Timer" #34 daemon prio=5 os_prio=0 tid=0x000000002b144000 nid=0xa3a8 in Object.wait() [0x000000002f77f000]
QFJ Timer doesnt stop on breakpoints in IoSessionInitiator.ConnectTask#connect(), SocketChannelImpl#connect() or Net#connect() anymore. Let me know if anything else would be useful to check. |
Comment by Christoph John [ 14/Dec/20 ] |
Where is that code from? If that is from MINA then it could also be a MINA bug. |
Comment by Krys [ 14/Dec/20 ] |
That is right. it comes from MINA core: org.apache.mina.proxy.ProxyConnector#connect0:181 |
Comment by Christoph John [ 15/Dec/20 ] |
So if I understood you right you could trigger the reconnection by setting isReconnectionNeeded to true in the debugger? If yes, then it should be a MINA bug, shouldn't it? |
Comment by Krys [ 16/Dec/20 ] |
Correct, when i set the re-connection needed with a debugger it does the job. In this case, we close this JIRA, right? |
Comment by Christoph John [ 16/Dec/20 ] |
It would be good if you could open a MINA issue and link to this issue. Let me know if I should open the issue against MINA. Thanks so far |
Comment by Krys [ 14/Jan/21 ] |
I would appreciate if you would open the issue with them. |
Comment by Christoph John [ 26/Jan/22 ] |