nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Jan 11, 2005 07:49 PM
Msg. 1 of 8
My feed hiccupped today. The connection manager stayed alive but other than time stamps data (quotes) stopped flowing.
From another thread I see that sending "S,DISCONNECT\n" can be used to sumilate a disconnect, and it says sending "S,CONNECT\n" should reconnect. Disconnect is no problem and connection manager shows this status. When I send the connect instruction, connection manager reflects this by incrementing "Reconnections", but it fails. I bumped log level to 2. Here's a section of IQLog.txt:
2005-01-11 17:33:59: +Socket::Disconnect Deleting the symbollist 2005-01-11 17:33:59: +Socket::StartFeed Starting data feed 2005-01-11 17:33:59: +Socket::Connect Connecting to other IP address login.interquote.com:60020 2005-01-11 17:33:59: +Socket::Connect Connection initialized, waiting for FD_CONNECT message 2005-01-11 17:33:59: +Socket::FD_Connect Getting configurations 2005-01-11 17:33:59: +Socket::DecompressIPs Getting dynamic ip addresses 2005-01-11 17:33:59: +IQConnect::MainProc Connecting to IQ Connect 2005-01-11 17:33:59: +Socket::Connect Connecting to preset IP address 66.112.156.212:60000 2005-01-11 17:33:59: +Socket::Connect Connection initialized, waiting for FD_CONNECT message 2005-01-11 17:33:59: +Socket::FD_Connect Changing state to receive cookie 2005-01-11 17:33:59: +Socket::ParseLogin IQ Connect cookie ok 2005-01-11 17:33:59: +Socket::ParseLogin Sending login '******' 2005-01-11 17:34:00: +Socket::ParseLogin Sending password '****' 2005-01-11 17:34:00: +Socket::ParseLogin Done with authentication 2005-01-11 17:34:00: +Socket::Disconnect Setting client 368's pointers to NULL 2005-01-11 17:34:00: +Socket::ProcessReadyLine Processing ready line 2005-01-11 17:34:00: +Socket::StartFeed Starting data feed 2005-01-11 17:34:00: +Socket::Connect Connecting to preset IP address 66.112.156.222:60002 2005-01-11 17:34:00: +Socket::Connect Connection initialized, waiting for FD_CONNECT message 2005-01-11 17:34:00: +Socket::Connect Connecting to preset IP address 66.112.156.222:60002 2005-01-11 17:34:00: +Socket::Connect Connection initialized, waiting for FD_CONNECT message 2005-01-11 17:34:00: +IQConnect::MainProc Finished reconnecting 2005-01-11 17:34:00: +Socket::FD_Connect Getting configurations 2005-01-11 17:34:00: +Socket::FD_Connect Getting configurations 2005-01-11 17:35:01: +Socket::StartFeed Starting data feed 2005-01-11 17:35:01: +Socket::Connect Connecting to preset IP address 66.112.156.222:60002 2005-01-11 17:35:01: +Socket::Connect Connection initialized, waiting for FD_CONNECT message 2005-01-11 17:35:01: +Socket::FD_Connect Getting configurations 2005-01-11 17:35:02: +Socket::StartFeed Starting data feed 2005-01-11 17:35:02: +Socket::Connect Connecting to preset IP address 66.112.156.222:60002 2005-01-11 17:35:02: +Socket::Connect Connection initialized, waiting for FD_CONNECT message 2005-01-11 17:35:02: +Socket::FD_Connect Getting configurations
I tried sending the connect instruction when HandleMessage received "S,SERVER DISCONNECTED" (which happens twice), and then again if I still don't see any messages for 60 seconds after that. Neither seems to work. Edited by DTN_Glenn_B on Jan 14, 2005 at 03:27 PM
|
nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Jan 14, 2005 07:43 AM
Msg. 2 of 8
Is there anyone from IQFeed monitoring this forum? I would really appreciate some guidance on how to elegantly deal with these disconnect/reconnect events within my program. BTW, I'm a paid up developer. >Date: Fri, 26 Mar 2004 14:20:50 -0600 >From: >Subject: Your IQ Developer Account is Now Active >Thank you for registering as an IQFeed Developer. Your application has >been approved and >full access to the IQFeed developer area is now enabled. Please visit > http://www.iqfeed.net/dev to download the API, view documentation, and >receive developer >support for the IQFeed service. > Edited by DTN_Steve_S on Sep 19, 2011 at 09:21 AM
|
DTN_Glenn_B
-Interested User-
Posts: 14
Joined: Nov 24, 2004
|
Posted: Jan 14, 2005 09:27 AM
Msg. 3 of 8
Sorry for the delay in a response. It's easy to miss new questions in a forum.
What indications are you getting that the reconnect fails? After sending the CONNECT message are you receving back a "S,SERVER CONNECTED" message? After this, you need to set everything again (ie. watch list, news options, etc...). I don't see anything in your log indicating that the connect isn't working.
Glenn Benes
Glenn Benes DTN Market Access, LLC.
|
nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Jan 14, 2005 09:42 AM
Msg. 4 of 8
Connection manager shows "Reconnections" incrementing, but I never see an "S,SERVER CONNECTED", nor does the status change to "Connected"
|
nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Jan 14, 2005 09:48 AM
Msg. 5 of 8
I can email you the full log file if that helps.
|
nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Jan 14, 2005 10:14 AM
Msg. 6 of 8
Taking a closer look at the log file, I notice when I send the S,SERVER CONNECT it logs:
2005-01-11 17:38:25: +Socket::Connect Connecting to preset IP address 66.112.156.222:60002
I'm guessing 60002 is a port number. Normal connection shows:
2005-01-11 17:39:42: +Socket::Connect Connecting to other IP address login.interquote.com:60020 2005-01-11 17:39:42: +Socket::Connect Connecting to preset IP address 66.112.156.211:60000 2005-01-11 17:39:43: +Socket::Connect Connecting to preset IP address 66.112.156.222:60002
Now I wonder if (and how to) I should change the port to 60000
|
DTN_Glenn_B
-Interested User-
Posts: 14
Joined: Nov 24, 2004
|
Posted: Jan 14, 2005 12:46 PM
Msg. 7 of 8
You can send your log file to
The IP addresses/ports in the log pertain to IQConnect and the external servers. You cannot connect to them directly.
Like I said, according to the log snippit you posted, there isn't anything indicating a problem. For the next log please have it include the following sequence with the log level at 2. RegisterClientApp and connect socket. Set a watch for MSFT. Send the disconnect. Reconnect. Finally, set a watch for MSFT again.
I will compare this to how it behaves for our apps.
Glenn Benes
Glenn Benes DTN Market Access, LLC. Edited by DTN_Steve_S on Sep 19, 2011 at 10:58 AM
|
nsolot
-DTN Guru-
Posts: 273
Joined: Sep 4, 2004
|
Posted: Jan 15, 2005 11:25 AM
Msg. 8 of 8
Thanks Glenn for pointing me in the right direction. I solved the problem. Here's what I found to be the issue.
When I send "S,SERVER DISCONNECT" , I get back 2 "S,SERVER DISCONNECTED" messages approx one second apart. My original code would send "S,SERVER CONNECT" each time I received the disconnected message.
Setting log level to 4, I could see that IQ CM was attempting to reconnect, but the second time I sent the connect request it appears to mess things up.
I modified my code to ignore the second "S,SERVER DISCONNECTED" message and it works fine.
|
|
|
|