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)




"Previously I was using *******. IQFeed is WAY more economical, and for my charting needs is just as good, if not better." - Comment from Public Forum Post
"Thanks for all of your help. Great customer service deserves to be recognized which one the reasons I've been a customer of DTN for over 10 years!" - Comment from Stuart
"Thanks for the great product and support. During this week of high volume trading, my QuoteTracker + IQ Feed setup never missed a beat. Also, thanks for your swiftness in responding to data issues. I was on ******* for a few years before I made the switch over early this year, and wish I had done it a long time ago." - Comment from Ken
"Just a thank you for the very helpful and prompt assistance and services. You provided me with noticeably superior service in my setup compared to a couple of other options I had looked at." - Comment from John
"I used to have *******, but they are way more money for the same thing. I have had no probs with data from DTN since switching over." - Comment from Public Forum Post
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"You are either overstaffed or people just don't have problems with your feed because customer support always answers the phone quickly." - Comment from Jay via Email
"If you are serious about your trading I would not rely on IB data for serious daytrading. Took me a while to justify the cost of IQ Feed and in the end, it's just a 2 point stop on ES. Better safe than sorry" - Comment from Public Forum
"I will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"And by the way, have to say this. I love the IQFeed software. It's rock solid and it has a really nice API." - Comment from Thomas via RT Chat
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: Thu May 16, 2024 5:08 PM CFBB v1.2.0 10 ms.
© AderSoftware 2002-2003