Keyboard Shortcuts
Likes
Search
Can IBC help with constant errorCode: 1100 : Connectivity between IB and Trader Workstation has been lost.
gmpotter
Hi everyone, I am (based in Hong Kong) and about to go live with my own algo and run on TWS. However I keep getting? errorCode: 1100 : Connectivity between IB and Trader Workstation has been lost. ?during 12:30 - 13:30 HKT (GMT+8), I understand there is a daily reset of IB servers at midnight US time, but I have already chosen region as APAC during TWS gateway launch option. 2023-05-30 13:17:16.677 [UW] INFO ?[JTS-Login-604] - Starting launcher login thread 2023-05-30 13:17:16.677 [UW] INFO ?[JTS-Login-604] - LauncherLoginThread.runLoginWithUI()[hotBackupStrategy=ON,loginAttempt=5,socketDelay=30000]. 2023-05-30 13:17:16.677 [UW] INFO ?[JTS-Login-604] - SPLASH Attempt 5: connecting to server 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - SPLASH Attempt 5: connecting to server 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - ### startLogin startTime=1685423836677 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - ### loginAttempt loginAttempt=5 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - AsyncDisconnectNotifiers: 1 and then? 2023-05-30 13:16:57.974 [UW] INFO ?[JTS-GstatMessageMgr-555] - Received response [errorCode=204,contentLen=-1].
and unfortunately couldn't find wt error code ?= 204 means. Apology if similar question(s) have been asked before, please free feel to redirect me |
¿ªÔÆÌåÓýThe short answer is no. ? Error 1100 is something your API client program is told for information purposes ¨C it¡¯s not an error as such. IBC has nothing at all to do with the API connection (apart from being able to set the API port number at startup). TWS/Gateway will automatically reconnect to the IB servers eventually, and then you get an 1101 or 1102 ¡®error¡¯ notified to the API. During this sequence, nothing happens that IBC could possibly influence. ? Looking through the TWS/Gateway log files and trying to understand how they manage connections to the IB hosts is a quick way to insanity! I recommend you don¡¯t even try. It¡¯s phenomenally and bizarrely complex, and I¡¯ve never understood why it needs to be so. ? Richard (I¡¯m the IBC developer) ? ? From: [email protected] <[email protected]> On Behalf Of gmpotter via groups.io
Sent: Tuesday, May 30, 2023 5:55 PM To: [email protected] Subject: [TWS API] Can IBC help with constant errorCode: 1100 : Connectivity between IB and Trader Workstation has been lost. ? Hi everyone, I am (based in Hong Kong) and about to go live with my own algo and run on TWS. However I keep getting? errorCode: 1100 : Connectivity between IB and Trader Workstation has been lost. ?during 12:30 - 13:30 HKT (GMT+8), I understand there is a daily reset of IB servers at midnight US time, but I have already chosen region as APAC during TWS gateway launch option. 2023-05-30 13:17:16.677 [UW] INFO ?[JTS-Login-604] - Starting launcher login thread 2023-05-30 13:17:16.677 [UW] INFO ?[JTS-Login-604] - LauncherLoginThread.runLoginWithUI()[hotBackupStrategy=ON,loginAttempt=5,socketDelay=30000]. 2023-05-30 13:17:16.677 [UW] INFO ?[JTS-Login-604] - SPLASH Attempt 5: connecting to server 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - SPLASH Attempt 5: connecting to server 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - ### startLogin startTime=1685423836677 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - ### loginAttempt loginAttempt=5 2023-05-30 13:17:16.678 [UW] INFO ?[JTS-Login-604] - AsyncDisconnectNotifiers: 1 and then? ? 2023-05-30 13:16:57.974 [UW] INFO ?[JTS-GstatMessageMgr-555] - Received response [errorCode=204,contentLen=-1].
|
I agree with Richard that TWS/IBGW error logs are extremely complex and so full of internal details that most users will not be able to extract any relevant information or root causes for their issues. You obviously select the Asia region while logging in, but that selection is only advisory to TWS/IBGW and you may actually be connected to . In fact, (at least our) TWS/IBGW is connected to one primary and two backup entry points in different regions. In TWS you can check what node(s) you are actually connected to via the green "DATA" button in the top right of the window. The node mentioned in the error message "Disconnecting cdc1.ibllc.com:4001 (SSL)" is actually the Chicago entry point (cdc1). You might be subject to the US reset periods if IBKR has selected cdc1 as the entry point for your account. If you predominantly trade equities on Asian exchanges and a mid-day reset interferes with your trades, open a ticket with IBKR and have them assign your account permanently to the hdc1 Asia entry point. ´³¨¹°ù²µ±ð²Ô On Tue, May 30, 2023 at 12:33 PM, Richard L King wrote:
|
gmpotter
I see thx Richard! Even that I still tried to use IBC tdy and surprising did not receive such 1100 error, is there any kind of auto polling / heartbeat being implemented in IBC with TWS gateway, so that the gateway and IB server keeps in sync?
Hving said that i do hv some heart beat request like reqCurrentTime every minute and reqPosition every 5 mins as well but even with these two requests still hv error 1100 |
[gmpotter, I¡¯m writing this in response to your Direct Message to me this morning. Please don¡¯t do this again. If you don¡¯t get a response to a post, it may be because you¡¯ve asked something that no-one feels they can help with, or because you¡¯ve already been given enough information. If you still have a query, then post again with more details of what you need. Just don¡¯t pester people!... ? Here¡¯s what you wrote: ? I was hving Error1100 disconnection from TWS API and IB server, but after I tried to use IBC, the issue disappear. (My original post: /g/twsapi/message/51212) ? Wondering if there is any kind of auto polling / heartbeat being implemented in IBC to TWS gateway, so that the gateway and IB server keeps in sync ? For me, I also did some heart beat request like reqCurrentTime every minute and reqPosition every 5 mins as well but even with these two requests still hv error 1100. So just curious how IBC fixed this issue and work like a charm. ? ] ? You seem to be misunderstanding something. ? When your API client program is connected to the API, there are two TCP/IP connections involved: one from your program to TWS/Gateway, and one (or more) from TWS/Gateway to IB¡¯s servers (there is one connection to the account server, and other connections for market data, historical data, news, and son on, depending on what TWS and your program are doing). ? The 1100 error message is sent to the API client by TWS/Gateway when the connection to the account server is lost (but your program is still connected to the API). As always with networking, there are many reasons why these connections can be lost, but it occurs most commonly during the nightly reset. When the condition that caused the loss is corrected, TWS/Gateway automatically re-establishes the connection(s) and send an 1101 or 1102 message to the API client (depending on whether market data has been lost). Note that this process is completely automatic: your API program doesn¡¯t have to do anything, and nothing it does can affect it in any way. So there is no possibility of your client program, or any program (including IBC), doing anything that will shorten the time between 1100 and 1101/1102. ? And I¡¯ve already told you that IBC has no involvement in any of this. It doesn¡¯t know whether the client program has an API connection, in fact it doesn¡¯t know whether there is an API client program at all. So no, there is NOT ¡®any kind of auto polling / heartbeat being implemented in IBC to TWS gateway, so that the gateway and IB server keeps in sync¡¯, whatever that is supposed to mean. ? So if your 1100 messages are no longer occurring, it cannot be because you have installed IBC. It just means that the condition that was causing the loss of connection has somehow been resolved. ? Richard |
Myself and several other members have had a similar issue, and I am in UTC+10. I assume it's just how IBKR has decided to handle us in the Asian timezones and unfortunately best practise just seems to be to get your own code to handle it.
Have a look and see if it helps you figure something out, if you do, please let the rest of us in that thread know! /g/twsapi/topic/92059871 |
The Historical Data Farms are not exact copies of each other. Depending on what instrument you want historical data from, will Gateway connect to ushdms, hkhmds or euhdms. It will initiate the connection when needed, and will switch off that connection when you are no longer using it. This is nothing you need to worry about, IB's software handles all that.
|
JG already pointed out that hkhmds is a Market Data farm. The exact farms TWS/IBGW is connected to at any point in time depends on the active market data subscriptions for your currently connected clients. TWS and IBGW have slightly different behavior but both would connect to and disconnect from several different data farms as needed. Data farm connections do not generate errors 1100, 1101, or 1102, though, and their codes are at and above 2100 as you can see in the chapter of the TWS API Guide. You only get errors 1100, 1101, or 1102 in case the "Primary" (main) connection with IBKR is unavailable for some reason (network, ISP, IBKR maintenance window, IBKR account resets, ...). Those are servers cdc1.ibllc.com, ndc1.ibllc.com, hdc1.ibllc.com (for the Asia gateway), ... . If you are no longer experiencing 11xx errors, either the network issues have been eliminated (if there had been some) or IBKR has connected you to hdc1 and you are on the Asia gateway maintenance and reset times now. The screen grab below if from TWS. ´³¨¹°ù²µ±ð²Ô On Tue, Jun 6, 2023 at 11:40 AM, gmpotter wrote:
|
¿ªÔÆÌåÓýOops, thanks ´³¨¹°ù²µ±ð²Ô, I¡¯ve just realised I said something untrue in my post of 2 June (/g/twsapi/message/51247). ? I said ¡®The 1100 error message is sent to the API client by TWS/Gateway when the connection(s) to the market data servers are lost (but your program is still connected to the API).¡¯ ? As you correctly point out, it¡¯s actually loss of the Primary connection (to what I called the account server) that causes 1100. ? Apologies if that caused any confusion. ? Richard |
I had not even realized that since the point you were making (as in IBC cannot help with IBKR maintenance windows or network issues between TWS/IBGW and IBKR) is valid for all servers. Those that relate to market data, historical data, security definitions, and those used for accounts, orders, and trades. ´³¨¹°ù²µ±ð²Ô
|