[QFJ-62] Session Initiator Fails with "Connection failed: Failed to get the session." Created: 05/Sep/06 Updated: 22/Sep/06 Resolved: 22/Sep/06 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Networking |
Affects Version/s: | 1.0.0 Final, 1.0.1, 1.0.2, 1.0.3 |
Fix Version/s: | None |
Type: | Other | Priority: | Default |
Reporter: | kevin samuel | Assignee: | Steve Bate |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
Win 2k3 Server, Dell 2650 Dual 2.4Ghz 2GB Ram, BEA jrockit-R26.3.0-jdk1.5.0_06 |
Attachments: | JFIX.cfg |
Description |
I tried posting this to the Mailing list, but was rejected: I've been trying to port a pojo application from QuickFix-JNI to QuickFixJ 1.0.x, however, my (initiator) session never connects, instead failing with "Connection failed: Failed to get the session." I haven't seen anything about this in the mail-archives, the closest thing being the issue of having to delete the quickfix fixmsg log files to avoid an EOFException, which I had already encountered. – as far as I can tell "Failed to get session." is a MINA IOException message, wrapped in "ConnectionFailed: " when caught by IoSessionInitiator.connect(), however I am not familiar enough with MINA for that to help me much – I would have guessed that the connection was never even being attempted, but an ethereal capture reveals the connection is at least initiated, showing TEST1 -> TEST2 : SYN I tried using both the SocketInitiator and ThreadedSocketInitiator classes, to no effect below is the code being called, along with the log output (which includes the session settings), any help would be greatly appreciated. thanks, kevin ( [email protected] ) Log.info(" FixProxy instantiated."); SessionSettings settings = new SessionSettings(new FileInputStream(instance.fixCfgFile)); Log.info("SETTINGS: [DEFAULT]"); SessionID sid = new SessionID("FIX.4.0","TEST1","TEST2"); instance.start(); try { initiator = new SocketInitiator(instance,storeFactory,settings, logFactory,messageFactory); }catch(Exception e) {e.printStackTrace();return;} Log.info(" SocketInitiator instantiated."); catch(Exception e2) {e2.printStackTrace();return;} Log.info(" SocketInitiator started."); finally { Log.dbg("LEAVE startupFix"); }} 2006/08/29 19:34:05 | Init session: FIX.4.0:TEST1->TEST2 |
Comments |
Comment by Steve Bate [ 06/Sep/06 ] |
The message does mean that MINA can't establish the socket session (versus the QF session). For example, if I start Banzai without an acceptor running I'll see this message. I can try the example code sometime but it won't be for a few days at least. I really don't have any other theories. Do you have any firewalls running on either test box? |
Comment by Steve Bate [ 06/Sep/06 ] |
I'd expect them to behave the same. It seems like a long shot but maybe there are some low level differences in the way the sockets are configured. This is just a guess. I haven't seen any related issues being discussed on the MINA mailing list. If you gather any more information that might help diagnose the problem, please let me know. |
Comment by Steve Bate [ 07/Sep/06 ] |
Hi Kevin, I used the order executor and Banzai to try your configuration file. I made the following modifications... Order Executor:
Banzai:
When I run the apps, Banza is able to connect to the executor and it creates the file logs properly. Order Executor: <20060907-13:38:16, FIX.4.0:TEST2->TEST1, event> (Session FIX.4.0:TEST2->TEST1 schedule is daily, 00:00:00 UTC - 00:00:00 UTC) Banzai: <20060907-13:38:21, FIX.4.0:TEST1->TEST2, event> (Session FIX.4.0:TEST1->TEST2 schedule is daily, 00:01:00 UTC - 23:59:00 UTC) So, I don't know. It appears the configuration file is fine. I'm running out of theories about why you are seeing different behavior on your system. I haven't had anyone else report this specific kind of problem. If you have any other ideas, I'll give you whatever support I can to resolve the problem. |