Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"Can I get another account from you? I am tired of ******* going down so often" - Comment from George
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"I've been using Neoticker RT with IQFeed for two months, and I'm very happy with both of the products (I've had IQFeed for two years with very few complaints). The service from both companies is exceptional." - Comment from Public Forum
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"Everything is working amazing now. I'm already impressed with the true-tick feed of IQFeed and it's ability to support my 480 symbol layout." - Comment from Tyler via Email
"I like you guys better than *******...much more stable and a whole lot fewer issues." - Comment from Philip
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
"If someone needs the best quality data and backfill beyond what their broker provides at a rate that is the best in the industry, I highly recommend IQFeed." - Comment from Josh via Public Forum
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
"You have an excellent product !!!!!!" - Comment from Arely
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »Trouble reconnecting
Author Topic: Trouble reconnecting (8 messages, Page 1 of 1)

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.
 

 

Time: Fri April 26, 2024 7:34 PM CFBB v1.2.0 12 ms.
© AderSoftware 2002-2003