Thread: [Quickfix-developers] Unable to login to my broker
Brought to you by:
orenmnero
|
From: abaraff <ab...@ra...> - 2007-10-11 12:37:21
|
I=E2=80=99m in the process of building my first FIX application, but I=E2=
=80=99m running in
to some trouble getting connectivity to my broker=E2=80=99s system. I=E2=
=80=99ve
implemented a pretty basic SocketInitiator C# application that looks like
this:
public class Program
{
protected static QuickFix.SocketInitiator _initiator;
protected static QuickFix.Application _application;
protected static QuickFix.FileLogFactory _logFactory;
protected static QuickFix.MessageFactory _messageFactory;
protected static QuickFix.SessionSettings _settings;
protected static QuickFix.FileStoreFactory _storeFactory;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
_settings =3D new QuickFix.SessionSettings("sessionsettings.txt=
");
_application =3D new QuickFixApp();
_storeFactory =3D new QuickFix.FileStoreFactory(_settings);
_logFactory =3D new QuickFix.FileLogFactory(_settings);
_messageFactory =3D new QuickFix.DefaultMessageFactory();
_initiator =3D new QuickFix.SocketInitiator(_application,
_storeFactory, _settings, _logFactory, _messageFactory );
_initiator.start();
for (int i =3D 0; i < 20; i++)
{
System.Threading.Thread.Sleep(1000);
=20
System.Diagnostics.Debug.WriteLine(_initiator.isLoggedOn().ToString());
}
_initiator.stop();=20
}
class QuickFixApp : QuickFix.Application
{
public void fromAdmin(Message p1, SessionID p2)
{
System.Diagnostics.Debug.WriteLine("fromAdmin\tMessage\t" +
p1.ToString());
System.Diagnostics.Debug.WriteLine("fromAdmin\tSession\t" +
p2.ToString());
}
public void fromApp(Message p1, SessionID p2)
{
System.Diagnostics.Debug.WriteLine("fromApp\t" + p1.ToString())=
;
System.Diagnostics.Debug.WriteLine("fromApp\tSession\t" +
p2.ToString());
}
public void onCreate(SessionID p1)
{
System.Diagnostics.Debug.WriteLine("onCreate\t" +
p1.ToString());
}
public void onLogon(SessionID p1)
{
System.Diagnostics.Debug.WriteLine("onLogon\t" + p1.ToString())=
;
}
public void onLogout(SessionID p1)
{
System.Diagnostics.Debug.WriteLine("onLogout\t" +
p1.ToString());
}
public void toAdmin(Message p1, SessionID p2)
{
System.Diagnostics.Debug.WriteLine("toAdmin\tMessage\t" +
p1.ToString());
System.Diagnostics.Debug.WriteLine("toAdmin\tSession\t" +
p2.ToString());
}
public void toApp(Message p1, SessionID p2)
{
System.Diagnostics.Debug.WriteLine("toApp\t" + p1.ToString());
System.Diagnostics.Debug.WriteLine("toApp\tSession\t" +
p2.ToString());
}
}
When I run it I get an onCreate event that prints out my
BeginString:SenderCompID->TargetCompID. Then I never get another event, no=
r
does isLoggedOn() return true at any point. My event log file has three
lines:
20071010-22:32:28 : Created session
20071010-22:32:28 : Connecting to <Remote Machine's IP> on port <Remote
Machine's Port>
20071010-22:40:53 : Created session
That's it. Is my app ever getting a connection to the remote computer? At
what point is this stuff breaking down? I'd like to be able to tell the
guys at the brokerage exactly where I'm stuck but it's tough with so little
experience.
Thanks,
Anthony=20
--=20
View this message in context: http://www.nabble.com/Unable-to-login-to-my-b=
roker-tf4606959.html#a13154906
Sent from the QuickFIX - Dev mailing list archive at Nabble.com.
|
|
From: Oren M. <or...@qu...> - 2007-10-11 14:53:48
|
It's sounds like they may not be responding to your connection, but =20 not actively refusing it. Do you ever get disconnected? Can you =20 have them monitor the port to see what is happening on their end? --oren On Oct 11, 2007, at 7:37 AM, abaraff wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/=20 > html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > I=92m in the process of building my first FIX application, but I=92m =20= > running in > to some trouble getting connectivity to my broker=92s system. I=92ve > implemented a pretty basic SocketInitiator C# application that =20 > looks like > this: > > public class Program > { > protected static QuickFix.SocketInitiator _initiator; > protected static QuickFix.Application _application; > protected static QuickFix.FileLogFactory _logFactory; > protected static QuickFix.MessageFactory _messageFactory; > protected static QuickFix.SessionSettings _settings; > protected static QuickFix.FileStoreFactory _storeFactory; > /// <summary> > /// The main entry point for the application. > /// </summary> > [STAThread] > static void Main() > { > _settings =3D new QuickFix.SessionSettings=20 > ("sessionsettings.txt"); > _application =3D new QuickFixApp(); > _storeFactory =3D new = QuickFix.FileStoreFactory(_settings); > _logFactory =3D new QuickFix.FileLogFactory(_settings); > _messageFactory =3D new QuickFix.DefaultMessageFactory(); > _initiator =3D new QuickFix.SocketInitiator(_application, > _storeFactory, _settings, _logFactory, _messageFactory ); > _initiator.start(); > for (int i =3D 0; i < 20; i++) > { > System.Threading.Thread.Sleep(1000); > > System.Diagnostics.Debug.WriteLine(_initiator.isLoggedOn().ToString=20 > ()); > } > _initiator.stop(); > } > > class QuickFixApp : QuickFix.Application > { > public void fromAdmin(Message p1, SessionID p2) > { > System.Diagnostics.Debug.WriteLine("fromAdmin\tMessage=20 > \t" + > p1.ToString()); > System.Diagnostics.Debug.WriteLine("fromAdmin\tSession=20 > \t" + > p2.ToString()); > } > > public void fromApp(Message p1, SessionID p2) > { > System.Diagnostics.Debug.WriteLine("fromApp\t" + =20 > p1.ToString()); > System.Diagnostics.Debug.WriteLine("fromApp\tSession\t" + > p2.ToString()); > } > > public void onCreate(SessionID p1) > { > System.Diagnostics.Debug.WriteLine("onCreate\t" + > p1.ToString()); > } > > public void onLogon(SessionID p1) > { > System.Diagnostics.Debug.WriteLine("onLogon\t" + =20 > p1.ToString()); > } > > public void onLogout(SessionID p1) > { > System.Diagnostics.Debug.WriteLine("onLogout\t" + > p1.ToString()); > } > > public void toAdmin(Message p1, SessionID p2) > { > System.Diagnostics.Debug.WriteLine("toAdmin\tMessage\t" + > p1.ToString()); > System.Diagnostics.Debug.WriteLine("toAdmin\tSession\t" + > p2.ToString()); > } > > public void toApp(Message p1, SessionID p2) > { > System.Diagnostics.Debug.WriteLine("toApp\t" + =20 > p1.ToString()); > System.Diagnostics.Debug.WriteLine("toApp\tSession\t" + > p2.ToString()); > } > } > > When I run it I get an onCreate event that prints out my > BeginString:SenderCompID->TargetCompID. Then I never get another =20 > event, nor > does isLoggedOn() return true at any point. My event log file has =20 > three > lines: > > 20071010-22:32:28 : Created session > 20071010-22:32:28 : Connecting to <Remote Machine's IP> on port =20 > <Remote > Machine's Port> > 20071010-22:40:53 : Created session > > That's it. Is my app ever getting a connection to the remote =20 > computer? At > what point is this stuff breaking down? I'd like to be able to =20 > tell the > guys at the brokerage exactly where I'm stuck but it's tough with =20 > so little > experience. > > Thanks, > > Anthony > --=20 > View this message in context: http://www.nabble.com/Unable-to-login-=20= > to-my-broker-tf4606959.html#a13154906 > Sent from the QuickFIX - Dev mailing list archive at Nabble.com. > > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a =20 > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
|
From: Federico P. <fed...@gm...> - 2007-10-11 16:44:18
|
> 20071010-22:32:28 : Created session
> 20071010-22:32:28 : Connecting to <Remote Machine's IP> on port <Remote
> Machine's Port>
> 20071010-22:40:53 : Created session
>
> That's it. Is my app ever getting a connection to the remote computer? At
> what point is this stuff breaking down? I'd like to be able to tell the
> guys at the brokerage exactly where I'm stuck but it's tough with so little
> experience.
>
Check also the start time in your configuration file and note that it is in UTC.
Federico
|
|
From: Oren M. <or...@qu...> - 2007-10-11 16:48:39
|
I would imagine his start time is within a good range, otherwise QuickFIX wouldn't even attempt connection. --oren On Oct 11, 2007, at 11:44 AM, Federico Paolinelli wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ > html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > >> 20071010-22:32:28 : Created session >> 20071010-22:32:28 : Connecting to <Remote Machine's IP> on port >> <Remote >> Machine's Port> >> 20071010-22:40:53 : Created session >> >> That's it. Is my app ever getting a connection to the remote >> computer? At >> what point is this stuff breaking down? I'd like to be able to >> tell the >> guys at the brokerage exactly where I'm stuck but it's tough with >> so little >> experience. >> > > Check also the start time in your configuration file and note that > it is in UTC. > > Federico > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
|
From: Anthony B. <ab...@ra...> - 2007-10-11 18:19:26
|
So now I see my toAdmin get called:
toAdmin Message 8=<BeginString> =75 5=5 4=1 9=<SenderCompID>
2=20071011-17:57:15.570 6=<TargetCompID> 0=123
toAdmin Session <BeginString>:<SenderCompID>-><TargetCompID>
Then I get my onCreate called:
onCreate <BeginString>:<SenderCompID>-><TargetCompID>
After that nothing happens.
Also, I got some feedback from the broker:
We took a look at the logs today and see 2 issues that you are having in
your connection.
1. When your system connects to our FIX server we see the connection up but
your system then sends another connection request directly afterward and our
server rejects because it sees you already connected, along with that reject
we drop your connection.
2. When you do connect successfully we receive a sequence number of one and
we are expecting a higher number (ie. 5) but your system does not increment
sequence numbers therefore we reject the connection.
This was one of their logs:
2007/10/11 11:15:53:296: CommServer: Connection from : Socket[
209.131.123.229/<SocketConnectHost>,
port=3852,localport=<SocketConnectPort>] accepted and identified as:
RADIXFUND
2007/10/11 11:15:53:296: FIXPump: Received data on connection {RADIXFUND}
[8=<BeginString> 9=87 35=A 34=4 49=<SenderCompID>
52=20071011-16:14:45.83556=<TargetCompID> 98=0 108=20 10=164
]
2007/10/11 11:15:53:312: FIXConnectionData: Sending data on connection
{RADIXFUND} [8=<BeginString> 9=0083 35=A 34=5 49=<TargetCompID>
56=<SenderCompID> 52=20071011-16:15:53 98=0 108=20 10=05
1 ]
2007/10/11 11:15:53:312: FIXFormatter: FIX session established on
connection: RADIXFUND
2007/10/11 11:15:53:390: FIXFormatter: SENDING RESEND REQUEST - seq# begin:
2 end: 3 current: 2 to: RADIXFUND
2007/10/11 11:15:53:390: FIXConnectionData: Sending data on connection
{RADIXFUND} [8= <BeginString> 9=0080 35=2 34=6 49=<TargetCompID>
56=<SenderCompID> 52=20071011-16:15:53 7=2 16=3 10=137 ]
2007/10/11 11:15:53:406: FIXConnectionData: Socket disconnected by peer
2007/10/11 11:15:53:406: FIXConnectionData: FIX session terminated on
connection: RADIXFUND
On 10/11/07, Oren Miller <or...@qu... > wrote:
>
> I would imagine his start time is within a good range, otherwise
> QuickFIX wouldn't even attempt connection.
>
> --oren
>
> On Oct 11, 2007, at 11:44 AM, Federico Paolinelli wrote:
>
> > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/
> > html/index.html
> > QuickFIX Support: http://www.quickfixengine.org/services.html
> >
> >> 20071010-22:32:28 : Created session
> >> 20071010-22:32:28 : Connecting to <Remote Machine's IP> on port
> >> <Remote
> >> Machine's Port>
> >> 20071010-22:40:53 : Created session
> >>
> >> That's it. Is my app ever getting a connection to the remote
> >> computer? At
> >> what point is this stuff breaking down? I'd like to be able to
> >> tell the
> >> guys at the brokerage exactly where I'm stuck but it's tough with
> >> so little
> >> experience.
> >>
> >
> > Check also the start time in your configuration file and note that
> > it is in UTC.
> >
> > Federico
> >
> > ----------------------------------------------------------------------
> > ---
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a
> > browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Quickfix-developers mailing list
> > Qui...@li...
> > https://lists.sourceforge.net/lists/listinfo/quickfix-developers
> >
>
>
|
|
From: Anthony B. <ab...@ra...> - 2007-10-11 21:07:11
|
Looks like the problem may have been caused by a leading space between the SocketConnectHost= and the IP address. Is that possible? On 10/11/07, Oren Miller <or...@qu...> wrote: > > I would imagine his start time is within a good range, otherwise > QuickFIX wouldn't even attempt connection. > > --oren > > On Oct 11, 2007, at 11:44 AM, Federico Paolinelli wrote: > > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ > > html/index.html > > QuickFIX Support: http://www.quickfixengine.org/services.html > > > >> 20071010-22:32:28 : Created session > >> 20071010-22:32:28 : Connecting to <Remote Machine's IP> on port > >> <Remote > >> Machine's Port> > >> 20071010-22:40:53 : Created session > >> > >> That's it. Is my app ever getting a connection to the remote > >> computer? At > >> what point is this stuff breaking down? I'd like to be able to > >> tell the > >> guys at the brokerage exactly where I'm stuck but it's tough with > >> so little > >> experience. > >> > > > > Check also the start time in your configuration file and note that > > it is in UTC. > > > > Federico > > > > ---------------------------------------------------------------------- > > --- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Quickfix-developers mailing list > > Qui...@li... > > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > > |