IbcAlpha / IBC

Automation of Interactive Brokers TWS. You can download the latest release here: https://github.com/ibcalpha/ibc/releases/latest
GNU General Public License v3.0
1.03k stars 181 forks source link

Live market data pauses after the nightly server reset #143

Closed man910 closed 2 years ago

man910 commented 3 years ago

I don't know if this is related to IB Gateway 9.81c or whether the controller is causing this issue or not. It seems like after the nightly server reset, IBC will successfully log back in but I no longer receive market data. I'm not sure how long after the reset when this happens since I've only noticed it hours later. However, as soon as I restart IBC, the data streams in immediately. I never had this issue with IB Gateway itself. The only major problem I've had with IB Gateway is that it just doesn't reliably reconnect after the nightly reset like IBC does.

rlktradewright commented 3 years ago

IBC has nothing whatever to do with receiving market data.

If your application remains connected to the API over the rest period, but the market data stops streaming, then you probably have to re-request all the market data. At some point your application will have received the error 1100, followed some time later by 1101 or 1102. 1101 means you have to re-subscribe to your market data streams, 1102 means no data has been lost.

It's been like this for very many years, so I'm puzzled because you seem to be saying there's something different happening now.

So please can you be a bit clearer about what seems to be happening, and why you think IBC might have anything to do with it.

man910 commented 3 years ago

Yeah, I realize that IBC is simply invoking IBG, but I never had this issue with IBG.  I was just wondering if there was some sort of interference that may have cause it caused.  My app does re-request and I have never had any issues prior to using IBC.  And, in fact, it automatically reconnects and re-requests if I simply shut down IBC and restart it (without restarting my own app).  Anyway, I will pay more attention to things to see if it's IBG or IBC. Thanks! On Friday, October 1, 2021, 02:27:49 PM EDT, Richard L King @.***> wrote:

IBC has nothing whatever to do with receiving market data.

If your application remains connected to the API over the rest period, but the market data stops streaming, then you probably have to re-request all the market data. At some point your application will have received the error 1100, followed some time later by 1101 or 1102. 1101 means you have to re-subscribe to your market data streams, 1102 means no data has been lost.

It's been like this for very many years, so I'm puzzled because you seem to be saying there's something different happening now.

So please can you be a bit clearer about what seems to be happening, and why you think IBC might have anything to do with it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

rlktradewright commented 3 years ago

Well, why don't you attach your IBC logfile (the whole of it) so that I can see if there's anything that looks suspicious. At the moment I have absolutely no information to go on.

man910 commented 3 years ago

Here are the logs.  I don't think there is much to go on.  I see that around 00:25 the server reset and IBC was able to log back in at 00:27.  Later on around 02:20, I noticed that the prices weren't being streamed and clicked a few things on the status bar to make sure everything was green, which it was (including my own app).  Then I restarted things shortly thereafter. Anyway, now that I've seen this occur a few times, I will pay more attention to it and will troubleshoot.

On Friday, October 1, 2021, 03:09:15 PM EDT, Richard L King ***@***.***> wrote:  

Well, why don't you attach your IBC logfile (the whole of it) so that I can see if there's anything that looks suspicious. At the moment I have absolutely no information to go on.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

================================================================================

This log file is located at:

C:\IBC\Logs\IBC-3.9.0_GATEWAY-981_THURSDAY.txt

================================================================================

Starting IBC version 3.9.0 on Thu 09/30/2021 at 18:29:55.98

Operating system: Microsoft Windows 10 Home 64-bit 10.0.19043

Arguments:

TWS version = 981 Entry point = ibcalpha.ibc.IbcGateway /TwsPath = C:\Jts /TwsSettingsPath = /IbcPath = C:\IBC /Config = C:\Users\Mark\Documents\IBC\config.ini /Mode = /JavaPath = /User = /PW = /FIXUser = /FIXPW =

=================================

Generating the classpath Classpath=C:\Jts\ibgateway\981\jars\jts4launch-981.jar;C:\Jts\ibgateway\981\jars\jxbrowser-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-swing-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-win64-7.10.jar;C:\Jts\ibgateway\981\jars\locales.jar;C:\Jts\ibgateway\981\jars\log4j-api-2.12.0.jar;C:\Jts\ibgateway\981\jars\log4j-core-2.12.0.jar;C:\Jts\ibgateway\981\jars\total-2020.jar;C:\Jts\ibgateway\981\jars\twslaunch-981.jar;C:\Jts\ibgateway\981\jars\twslaunch-install4j-1.10.jar;C:\IBC\IBC.jar

Generating the JAVA VM options Java VM Options= -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dinstaller.uuid=2730f7ba-4b7a-4d3a-bd2a-9a935f6f576b -DvmOptionsPath=C:\Jts\ibgateway\981\ibgateway.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768m

Determining the location of java.exe Location of java.exe=c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin

Starting IBC with this command: "c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin\java.exe" -cp "C:\Jts\ibgateway\981\jars\jts4launch-981.jar;C:\Jts\ibgateway\981\jars\jxbrowser-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-swing-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-win64-7.10.jar;C:\Jts\ibgateway\981\jars\locales.jar;C:\Jts\ibgateway\981\jars\log4j-api-2.12.0.jar;C:\Jts\ibgateway\981\jars\log4j-core-2.12.0.jar;C:\Jts\ibgateway\981\jars\total-2020.jar;C:\Jts\ibgateway\981\jars\twslaunch-981.jar;C:\Jts\ibgateway\981\jars\twslaunch-install4j-1.10.jar;C:\IBC\IBC.jar" -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dinstaller.uuid=2730f7ba-4b7a-4d3a-bd2a-9a935f6f576b -DvmOptionsPath=C:\Jts\ibgateway\981\ibgateway.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768m ibcalpha.ibc.IbcGateway "C:\Users\Mark\Documents\IBC\config.ini"

IBC Settings: AcceptIncomingConnectionAction=manual AcceptNonBrokerageAccountWarning=yes AllowBlindTrading=no BindAddress= ClosedownAt= CommandPrompt= ControlFrom= DismissNSEComplianceNotice=yes DismissPasswordExpiryWarning=no ExistingSessionDetectedAction=manual ExitAfterSecondFactorAuthenticationTimeout=no FIX=no FIXLoginId= FIXPassword= IbAutoClosedown=yes IbDir= IbLoginId= IbPassword= LogStructureScope=known LogStructureWhen=never LoginDialogDisplayTimeout=60 MinimizeMainWindow=yes OverrideTwsApiPort= ReadOnlyApi= ReadOnlyLogin=no SaveTwsSettingsAt= SecondFactorAuthenticationExitInterval= StoreSettingsOnServer=yes SuppressInfoMessages=yes TradingMode=paper End IBC Settings

2021-09-30 18:29:56:564 IBC: Version: 3.9.0 System Properties

swing.boldMetal = false java.runtime.name = Java(TM) SE Runtime Environment sun.boot.library.path = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin java.vm.version = 25.152-b16 sun.awt.nopixfmt = true vmOptionsPath = C:\Jts\ibgateway\981\ibgateway.vmoptions java.vm.vendor = Oracle Corporation java.vendor.url = http://java.oracle.com/ path.separator = ; java.vm.name = Java HotSpot(TM) 64-Bit Server VM file.encoding.pkg = sun.io user.country = US user.script = sun.java.launcher = SUN_STANDARD sun.os.patch.level = java.vm.specification.name = Java Virtual Machine Specification user.dir = C:\Jts java.runtime.version = 1.8.0_152-b16 java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment java.endorsed.dirs = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\endorsed os.arch = amd64 java.io.tmpdir = C:\Users\Mark\AppData\Local\Temp\ line.separator =

java.vm.specification.vendor = Oracle Corporation user.variant = os.name = Windows 10 sun.java2d.noddraw = true sun.jnu.encoding = Cp1252 java.library.path = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Git\cmd;C:\Python\Python38\Scripts\;C:\Python\Python38\;C:\Users\Mark\AppData\Local\Microsoft\WindowsApps;C:\Users\Mark\AppData\Local\Programs\Fiddler;. java.specification.name = Java Platform API Specification java.class.version = 52.0 sun.management.compiler = HotSpot 64-Bit Tiered Compilers os.version = 10.0 user.home = C:\Users\Mark user.timezone = America/New_York installer.uuid = 2730f7ba-4b7a-4d3a-bd2a-9a935f6f576b java.awt.printerjob = sun.awt.windows.WPrinterJob file.encoding = Cp1252 java.specification.version = 1.8 java.class.path = C:\Jts\ibgateway\981\jars\jts4launch-981.jar;C:\Jts\ibgateway\981\jars\jxbrowser-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-swing-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-win64-7.10.jar;C:\Jts\ibgateway\981\jars\locales.jar;C:\Jts\ibgateway\981\jars\log4j-api-2.12.0.jar;C:\Jts\ibgateway\981\jars\log4j-core-2.12.0.jar;C:\Jts\ibgateway\981\jars\total-2020.jar;C:\Jts\ibgateway\981\jars\twslaunch-981.jar;C:\Jts\ibgateway\981\jars\twslaunch-install4j-1.10.jar;C:\IBC\IBC.jar user.name = man910 java.vm.specification.version = 1.8 sun.java.command = ibcalpha.ibc.IbcGateway C:\Users\Mark\Documents\IBC\config.ini java.home = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64 sun.arch.data.model = 64 user.language = en java.specification.vendor = Oracle Corporation awt.toolkit = sun.awt.windows.WToolkit java.vm.info = mixed mode java.version = 1.8.0_152 java.ext.dirs = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\ext;C:\WINDOWS\Sun\Java\lib\ext sun.boot.class.path = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\resources.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\rt.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\sunrsasign.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\jsse.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\jce.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\charsets.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\jfr.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\classes java.vendor = Oracle Corporation file.separator = \ java.vendor.url.bug = http://bugreport.sun.com/bugreport/ sun.io.unicode.encoding = UnicodeLittle sun.cpu.endian = little sun.desktop = windows sun.locale.formatasdefault = true sun.cpu.isalist = amd64

2021-09-30 18:29:56:567 IBC: Using default settings provider: ini file is C:\Users\Mark\Documents\IBC\config.ini 2021-09-30 18:29:56:567 IBC: Using default login manager: getting username and password from args but not found. Will get from settings 2021-09-30 18:29:56:567 IBC: Using default main window manager: constructor parameter isGateway=true 2021-09-30 18:29:56:567 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings 2021-09-30 18:29:56:568 IBC: Using default config dialog manager 2021-09-30 18:29:56:577 IBC: CommandServer is not started because the port is not configured 2021-09-30 18:29:56:684 IBC: TWS Settings directory is: C:\Jts 2021-09-30 18:29:56:691 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines 2021-09-30 18:29:56:691 IBC: Found setting: [Logon]/s3store=true 2021-09-30 18:29:56:691 IBC: Found setting: [Logon]/Locale=en 2021-09-30 18:29:56:691 IBC: Found setting: [Logon]/displayedproxymsg=1 2021-09-30 18:29:56:691 IBC: Found setting: [Logon]/UseSSL=true 2021-09-30 18:29:56:691 IBC: Found setting: [IBGateway]/ApiOnly=true 2021-09-30 18:29:56:691 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines 2021-09-30 18:29:56:691 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds 2021-09-30 18:30:00:440 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Activated 2021-09-30 18:30:00:442 IBC: Trading mode from settings: tradingMode=paper 2021-09-30 18:30:00:442 IBC: Setting Trading mode = paper 2021-09-30 18:30:00:587 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Focused 2021-09-30 18:30:00:588 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Opened 2021-09-30 18:30:00:629 IBC: Click button: Paper Log In 2021-09-30 18:30:01:377 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Lost focus 2021-09-30 18:30:01:378 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Deactivated 2021-09-30 18:30:01:378 IBC: Detected frame entitled: Loading...; event=Activated 2021-09-30 18:30:01:380 IBC: Detected frame entitled: Loading...; event=Focused 2021-09-30 18:30:01:381 IBC: Detected frame entitled: Loading...; event=Opened 2021-09-30 18:30:01:381 IBC: Found Gateway main window 2021-09-30 18:30:01:381 IBC: Minimizing main window 2021-09-30 18:30:01:401 IBC: Detected frame entitled: Loading...; event=Iconified 2021-09-30 18:30:01:401 IBC: Detected frame entitled: Loading...; event=State changed 2021-09-30 18:30:01:486 IBC: Detected frame entitled: Loading...; event=Lost focus 2021-09-30 18:30:01:486 IBC: Detected frame entitled: Loading...; event=Deactivated 2021-09-30 18:30:01:487 IBC: Detected frame entitled: Authenticating...; event=Activated 2021-09-30 18:30:01:488 IBC: Detected frame entitled: Authenticating...; event=Focused 2021-09-30 18:30:01:491 IBC: Detected frame entitled: Authenticating...; event=Opened LogModuleConfigurator-Init: Log4j Ver2.x found on classpath LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x 2021-09-30 18:30:05:161 IBC: Detected frame entitled: Initializing environment...; event=Lost focus 2021-09-30 18:30:05:161 IBC: Detected frame entitled: Initializing environment...; event=Deactivated 2021-09-30 18:30:05:551 IBC: Detected frame entitled: Starting application...; event=Closed 2021-09-30 18:30:05:551 IBC: Login has completed remove Client 13 remove Client 13 remove Client 10 2021-09-30 18:46:06:737 IBC: Detected frame entitled: IB Gateway; event=Deiconified 2021-09-30 18:46:06:741 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-09-30 18:46:06:757 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-09-30 18:46:06:757 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-09-30 18:46:07:378 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-09-30 18:46:07:379 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-09-30 18:46:07:498 IBC: Detected frame entitled: IB Gateway; event=Iconified 2021-09-30 18:46:07:499 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 00:25:22:499 IBC: Detected frame entitled: Login; event=Activated 2021-10-01 00:25:22:516 IBC: Detected frame entitled: Login; event=Focused 2021-10-01 00:25:22:516 IBC: Detected frame entitled: Login; event=Opened 2021-10-01 00:27:53:167 IBC: Detected frame entitled: Attempt 8: Authenticating...; event=Lost focus 2021-10-01 00:27:53:167 IBC: Detected frame entitled: Attempt 8: Authenticating...; event=Deactivated 2021-10-01 00:27:53:167 IBC: Detected dialog entitled: Re-login is required; event=Activated 2021-10-01 00:27:53:168 IBC: Detected dialog entitled: Re-login is required; event=Focused 2021-10-01 00:27:53:168 IBC: Detected dialog entitled: Re-login is required; event=Opened 2021-10-01 00:27:53:168 IBC: Re-login to session 2021-10-01 00:27:53:168 IBC: Click button: Re-login 2021-10-01 00:27:53:266 IBC: Detected dialog entitled: Re-login is required; event=Lost focus 2021-10-01 00:27:53:266 IBC: Detected dialog entitled: Re-login is required; event=Deactivated 2021-10-01 00:27:53:266 IBC: Detected frame entitled: Attempt 8: Authenticating...; event=Activated 2021-10-01 00:27:53:267 IBC: Detected frame entitled: Attempt 8: Authenticating...; event=Focused 2021-10-01 00:27:53:267 IBC: Detected dialog entitled: Re-login is required; event=Closed 2021-10-01 00:27:53:574 IBC: Detected frame entitled: Initializing environment...; event=Lost focus 2021-10-01 00:27:53:574 IBC: Detected frame entitled: Initializing environment...; event=Deactivated 2021-10-01 00:27:53:575 IBC: Detected frame entitled: Initializing environment...; event=Closed 2021-10-01 02:20:46:940 IBC: Detected frame entitled: IB Gateway; event=Deiconified 2021-10-01 02:20:47:183 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 02:20:47:942 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:20:47:991 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:20:47:991 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:20:47:991 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:20:47:995 IBC: Detected frame entitled: IB Gateway; event=Iconified 2021-10-01 02:20:47:995 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 02:20:59:105 IBC: Detected frame entitled: IB Gateway; event=Deiconified 2021-10-01 02:20:59:142 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 02:20:59:434 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:20:59:446 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:21:09:942 IBC: Detected window: type=javax.swing.Popup$HeavyWeightWindow; event=Opened 2021-10-01 02:21:13:865 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:21:13:870 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:21:23:302 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:21:23:317 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:21:24:282 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:21:24:289 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:21:31:190 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:21:31:191 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:21:37:194 IBC: Detected frame entitled: IB Gateway; event=Closing 2021-10-01 02:21:40:117 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:21:40:117 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:21:40:165 IBC: Detected dialog entitled: Shutdown progress; event=Activated 2021-10-01 02:21:40:465 IBC: Detected dialog entitled: Shutdown progress; event=Focused 2021-10-01 02:21:40:466 IBC: Detected dialog entitled: Shutdown progress; event=Opened 2021-10-01 02:21:42:776 IBC: Detected dialog entitled: Shutdown progress; event=Lost focus 2021-10-01 02:21:42:777 IBC: Detected dialog entitled: Shutdown progress; event=Deactivated 2021-10-01 02:21:45,180 JTS-ShutdownTask-Shutdown_IA-316 ERROR Attempted to append to non-started appender d 2021-10-01 02:21:45,192 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d 2021-10-01 02:21:45,196 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d 2021-10-01 02:21:45,502 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d 2021-10-01 02:21:48,939 pool-3-thread-1 ERROR Attempted to append to non-started appender f

================================================================================

This log file is located at:

C:\IBC\Logs\IBC-3.9.0_GATEWAY-981_FRIDAY.txt

================================================================================

Starting IBC version 3.9.0 on Fri 10/01/2021 at 2:21:53.70

Operating system: Microsoft Windows 10 Home 64-bit 10.0.19043

Arguments:

TWS version = 981 Entry point = ibcalpha.ibc.IbcGateway /TwsPath = C:\Jts /TwsSettingsPath = /IbcPath = C:\IBC /Config = C:\Users\Mark\Documents\IBC\config.ini /Mode = /JavaPath = /User = /PW = /FIXUser = /FIXPW =

=================================

Generating the classpath Classpath=C:\Jts\ibgateway\981\jars\jts4launch-981.jar;C:\Jts\ibgateway\981\jars\jxbrowser-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-swing-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-win64-7.10.jar;C:\Jts\ibgateway\981\jars\locales.jar;C:\Jts\ibgateway\981\jars\log4j-api-2.12.0.jar;C:\Jts\ibgateway\981\jars\log4j-core-2.12.0.jar;C:\Jts\ibgateway\981\jars\total-2020.jar;C:\Jts\ibgateway\981\jars\twslaunch-981.jar;C:\Jts\ibgateway\981\jars\twslaunch-install4j-1.10.jar;C:\IBC\IBC.jar

Generating the JAVA VM options Java VM Options= -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dinstaller.uuid=2730f7ba-4b7a-4d3a-bd2a-9a935f6f576b -DvmOptionsPath=C:\Jts\ibgateway\981\ibgateway.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768m

Determining the location of java.exe Location of java.exe=c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin

Starting IBC with this command: "c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin\java.exe" -cp "C:\Jts\ibgateway\981\jars\jts4launch-981.jar;C:\Jts\ibgateway\981\jars\jxbrowser-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-swing-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-win64-7.10.jar;C:\Jts\ibgateway\981\jars\locales.jar;C:\Jts\ibgateway\981\jars\log4j-api-2.12.0.jar;C:\Jts\ibgateway\981\jars\log4j-core-2.12.0.jar;C:\Jts\ibgateway\981\jars\total-2020.jar;C:\Jts\ibgateway\981\jars\twslaunch-981.jar;C:\Jts\ibgateway\981\jars\twslaunch-install4j-1.10.jar;C:\IBC\IBC.jar" -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dinstaller.uuid=2730f7ba-4b7a-4d3a-bd2a-9a935f6f576b -DvmOptionsPath=C:\Jts\ibgateway\981\ibgateway.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768m ibcalpha.ibc.IbcGateway "C:\Users\Mark\Documents\IBC\config.ini"

IBC Settings: AcceptIncomingConnectionAction=manual AcceptNonBrokerageAccountWarning=yes AllowBlindTrading=no BindAddress= ClosedownAt= CommandPrompt= ControlFrom= DismissNSEComplianceNotice=yes DismissPasswordExpiryWarning=no ExistingSessionDetectedAction=manual ExitAfterSecondFactorAuthenticationTimeout=no FIX=no FIXLoginId= FIXPassword= IbAutoClosedown=yes IbDir= IbLoginId= IbPassword= LogStructureScope=known LogStructureWhen=never LoginDialogDisplayTimeout=60 MinimizeMainWindow=yes OverrideTwsApiPort= ReadOnlyApi= ReadOnlyLogin=no SaveTwsSettingsAt= SecondFactorAuthenticationExitInterval= StoreSettingsOnServer=yes SuppressInfoMessages=yes TradingMode=paper End IBC Settings

2021-10-01 02:21:54:193 IBC: Version: 3.9.0 System Properties

swing.boldMetal = false java.runtime.name = Java(TM) SE Runtime Environment sun.boot.library.path = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin java.vm.version = 25.152-b16 sun.awt.nopixfmt = true vmOptionsPath = C:\Jts\ibgateway\981\ibgateway.vmoptions java.vm.vendor = Oracle Corporation java.vendor.url = http://java.oracle.com/ path.separator = ; java.vm.name = Java HotSpot(TM) 64-Bit Server VM file.encoding.pkg = sun.io user.country = US user.script = sun.java.launcher = SUN_STANDARD sun.os.patch.level = java.vm.specification.name = Java Virtual Machine Specification user.dir = C:\Jts java.runtime.version = 1.8.0_152-b16 java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment java.endorsed.dirs = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\endorsed os.arch = amd64 java.io.tmpdir = C:\Users\Mark\AppData\Local\Temp\ line.separator =

java.vm.specification.vendor = Oracle Corporation user.variant = os.name = Windows 10 sun.java2d.noddraw = true sun.jnu.encoding = Cp1252 java.library.path = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Git\cmd;C:\Python\Python38\Scripts\;C:\Python\Python38\;C:\Users\Mark\AppData\Local\Microsoft\WindowsApps;C:\Users\Mark\AppData\Local\Programs\Fiddler;. java.specification.name = Java Platform API Specification java.class.version = 52.0 sun.management.compiler = HotSpot 64-Bit Tiered Compilers os.version = 10.0 user.home = C:\Users\Mark user.timezone = America/New_York installer.uuid = 2730f7ba-4b7a-4d3a-bd2a-9a935f6f576b java.awt.printerjob = sun.awt.windows.WPrinterJob file.encoding = Cp1252 java.specification.version = 1.8 java.class.path = C:\Jts\ibgateway\981\jars\jts4launch-981.jar;C:\Jts\ibgateway\981\jars\jxbrowser-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-swing-7.10.jar;C:\Jts\ibgateway\981\jars\jxbrowser-win64-7.10.jar;C:\Jts\ibgateway\981\jars\locales.jar;C:\Jts\ibgateway\981\jars\log4j-api-2.12.0.jar;C:\Jts\ibgateway\981\jars\log4j-core-2.12.0.jar;C:\Jts\ibgateway\981\jars\total-2020.jar;C:\Jts\ibgateway\981\jars\twslaunch-981.jar;C:\Jts\ibgateway\981\jars\twslaunch-install4j-1.10.jar;C:\IBC\IBC.jar user.name = man910 java.vm.specification.version = 1.8 sun.java.command = ibcalpha.ibc.IbcGateway C:\Users\Mark\Documents\IBC\config.ini java.home = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64 sun.arch.data.model = 64 user.language = en java.specification.vendor = Oracle Corporation awt.toolkit = sun.awt.windows.WToolkit java.vm.info = mixed mode java.version = 1.8.0_152 java.ext.dirs = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\ext;C:\WINDOWS\Sun\Java\lib\ext sun.boot.class.path = c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\resources.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\rt.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\sunrsasign.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\jsse.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\jce.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\charsets.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\lib\jfr.jar;c:\users\mark.i4j_jres\1.8.0_152-tzdata2019c_64\classes java.vendor = Oracle Corporation file.separator = \ java.vendor.url.bug = http://bugreport.sun.com/bugreport/ sun.io.unicode.encoding = UnicodeLittle sun.cpu.endian = little sun.desktop = windows sun.locale.formatasdefault = true sun.cpu.isalist = amd64

2021-10-01 02:21:54:196 IBC: Using default settings provider: ini file is C:\Users\Mark\Documents\IBC\config.ini 2021-10-01 02:21:54:196 IBC: Using default login manager: getting username and password from args but not found. Will get from settings 2021-10-01 02:21:54:196 IBC: Using default main window manager: constructor parameter isGateway=true 2021-10-01 02:21:54:196 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings 2021-10-01 02:21:54:197 IBC: Using default config dialog manager 2021-10-01 02:21:54:202 IBC: CommandServer is not started because the port is not configured 2021-10-01 02:21:54:306 IBC: TWS Settings directory is: C:\Jts 2021-10-01 02:21:54:311 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines 2021-10-01 02:21:54:311 IBC: Found setting: [Logon]/s3store=true 2021-10-01 02:21:54:311 IBC: Found setting: [Logon]/Locale=en 2021-10-01 02:21:54:312 IBC: Found setting: [Logon]/displayedproxymsg=1 2021-10-01 02:21:54:312 IBC: Found setting: [Logon]/UseSSL=true 2021-10-01 02:21:54:312 IBC: Found setting: [IBGateway]/ApiOnly=true 2021-10-01 02:21:54:312 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines 2021-10-01 02:21:54:312 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds 2021-10-01 02:21:57:849 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Activated 2021-10-01 02:21:57:851 IBC: Trading mode from settings: tradingMode=paper 2021-10-01 02:21:57:851 IBC: Setting Trading mode = paper 2021-10-01 02:21:57:996 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Focused 2021-10-01 02:21:57:998 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Opened 2021-10-01 02:21:58:037 IBC: Click button: Paper Log In 2021-10-01 02:21:58:767 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Lost focus 2021-10-01 02:21:58:767 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Deactivated 2021-10-01 02:21:58:771 IBC: Detected frame entitled: Loading...; event=Activated 2021-10-01 02:21:58:772 IBC: Detected frame entitled: Loading...; event=Focused 2021-10-01 02:21:58:773 IBC: Detected frame entitled: Loading...; event=Opened 2021-10-01 02:21:58:773 IBC: Found Gateway main window 2021-10-01 02:21:58:773 IBC: Minimizing main window 2021-10-01 02:21:58:800 IBC: Detected frame entitled: Loading...; event=Iconified 2021-10-01 02:21:58:801 IBC: Detected frame entitled: Loading...; event=State changed 2021-10-01 02:21:58:802 IBC: Detected frame entitled: Loading...; event=Lost focus 2021-10-01 02:21:58:802 IBC: Detected frame entitled: Loading...; event=Deactivated 2021-10-01 02:21:58:877 IBC: Detected frame entitled: Authenticating...; event=Activated 2021-10-01 02:21:58:879 IBC: Detected frame entitled: Authenticating...; event=Focused 2021-10-01 02:21:58:881 IBC: Detected frame entitled: Authenticating...; event=Opened LogModuleConfigurator-Init: Log4j Ver2.x found on classpath LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x 2021-10-01 02:22:01:959 IBC: Detected frame entitled: Initializing environment...; event=Lost focus 2021-10-01 02:22:02:308 IBC: Detected frame entitled: Starting application...; event=Closed 2021-10-01 02:22:02:308 IBC: Login has completed remove Client 11 remove Client 11 remove Client 15 2021-10-01 02:23:23:092 IBC: Detected frame entitled: IB Gateway; event=Deiconified 2021-10-01 02:23:23:093 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 02:23:23:100 IBC: Detected frame entitled: Starting application...; event=Deactivated 2021-10-01 02:23:23:100 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:23:23:101 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:23:28:065 IBC: Detected window: type=javax.swing.Popup$HeavyWeightWindow; event=Opened 2021-10-01 02:23:29:798 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:23:29:798 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:23:29:798 IBC: Detected dialog entitled: IB Trader Workstation (Simulated Trading); event=Activated 2021-10-01 02:23:29:799 IBC: Detected dialog entitled: IB Trader Workstation (Simulated Trading); event=Focused 2021-10-01 02:23:29:800 IBC: Detected dialog entitled: IB Trader Workstation (Simulated Trading); event=Opened 2021-10-01 02:23:44:303 IBC: Detected dialog entitled: IB Trader Workstation (Simulated Trading); event=Lost focus 2021-10-01 02:23:44:303 IBC: Detected dialog entitled: IB Trader Workstation (Simulated Trading); event=Deactivated 2021-10-01 02:23:44:304 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:23:44:304 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:23:44:304 IBC: Detected dialog entitled: IB Trader Workstation (Simulated Trading); event=Closed 2021-10-01 02:23:46:802 IBC: Detected frame entitled: IB Gateway; event=Iconified 2021-10-01 02:23:46:802 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 02:23:46:804 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:23:46:804 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:26:28:636 IBC: Detected frame entitled: IB Gateway; event=Deiconified 2021-10-01 02:26:28:636 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 02:26:28:643 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:26:28:643 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:26:35:736 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:26:35:736 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:26:35:737 IBC: Detected frame entitled: Certificate (cdc1.ibllc.com); event=Activated 2021-10-01 02:26:35:737 IBC: Detected frame entitled: Certificate (cdc1.ibllc.com); event=Focused 2021-10-01 02:26:35:738 IBC: Detected frame entitled: Certificate (cdc1.ibllc.com); event=Opened 2021-10-01 02:26:39:537 IBC: Detected frame entitled: Certificate (cdc1.ibllc.com); event=Closing 2021-10-01 02:26:39:557 IBC: Detected frame entitled: Certificate (cdc1.ibllc.com); event=Lost focus 2021-10-01 02:26:39:557 IBC: Detected frame entitled: Certificate (cdc1.ibllc.com); event=Deactivated 2021-10-01 02:26:39:558 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:26:39:559 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:26:46:978 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:26:46:978 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 02:26:46:978 IBC: Detected dialog entitled: Trader Workstation Configuration (Simulated Trading); event=Activated 2021-10-01 02:26:46:980 IBC: Detected dialog entitled: Trader Workstation Configuration (Simulated Trading); event=Focused 2021-10-01 02:26:46:980 IBC: Detected dialog entitled: Trader Workstation Configuration (Simulated Trading); event=Opened 2021-10-01 02:27:30:439 IBC: Detected window: type=javax.swing.Popup$HeavyWeightWindow; event=Opened 2021-10-01 02:27:30:889 IBC: Detected dialog entitled: Trader Workstation Configuration (Simulated Trading); event=Closing 2021-10-01 02:27:31:015 IBC: Detected dialog entitled: Trader Workstation Configuration (Simulated Trading); event=Lost focus 2021-10-01 02:27:31:015 IBC: Detected dialog entitled: Trader Workstation Configuration (Simulated Trading); event=Deactivated 2021-10-01 02:27:31:015 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 02:27:31:016 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 02:27:31:016 IBC: Detected window: type=javax.swing.Popup$HeavyWeightWindow; event=Closed 2021-10-01 02:27:31:016 IBC: Detected dialog entitled: Trader Workstation Configuration (Simulated Trading); event=Closed 2021-10-01 02:27:32:786 IBC: Detected frame entitled: IB Gateway; event=Iconified 2021-10-01 02:27:32:786 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 02:27:32:803 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 02:27:32:805 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 13:33:12:284 IBC: Detected frame entitled: IB Gateway; event=Deiconified 2021-10-01 13:33:12:351 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 13:33:12:506 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 13:33:12:521 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 13:33:16:653 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 13:33:16:697 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2021-10-01 13:33:16:838 IBC: Detected frame entitled: IB Gateway; event=Iconified 2021-10-01 13:33:16:839 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 14:42:45:072 IBC: Detected frame entitled: IB Gateway; event=Deiconified 2021-10-01 14:42:45:073 IBC: Detected frame entitled: IB Gateway; event=State changed 2021-10-01 14:42:45:099 IBC: Detected frame entitled: IB Gateway; event=Activated 2021-10-01 14:42:45:100 IBC: Detected frame entitled: IB Gateway; event=Focused 2021-10-01 14:42:46:417 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2021-10-01 14:42:46:417 IBC: Detected frame entitled: IB Gateway; event=Deactivated

rlktradewright commented 3 years ago

[For future reference, please ATTACH (NOT quote) this sort of file: it's easier to examine it and find things with a text editor than in a browser page, and it means people don't have to scroll all the way past it when following the thread.

Actually I suppose the trouble is that you replied via email rather than the GitHub page, and that probably inlined the file. Replying via GitHub is always preferable.]

This logfile is interesting: I usually run TWS rather than Gateway, and my IBC logfiles are not quite the same as yours for Gateway around the reset period.

So I've changed my paper trading setup to run gateway instead, and I'll see whether I observe anything similar to you.

Here's a useful tip that might help anyway. Given that you have to shut down TWS/Gateway once a day (using the autologoff mechanism), the most sensible time to do that is just after the reset period has ended. Here in the UK, the European reset period ends at 05:45, so I normally set my TWS autologff time to 05:42, and restart using Task Scheduler at 05:45. The reconnection during the reset nearly always happens around 05:27, so if the market data is not restored it's only for a short period at an uninteresting time of day.

But for the purposes of my little experiment, I've set it to shutdown at 07:25 and restart at 07:30 because I have a data collection program that is always running during this period so I'll be able to see easily if the market data is not flowing between the reconnection and the shutdown.

I'll let you know what happens on Monday.

man910 commented 3 years ago

Sorry about that. I was replying directly from my email and I guess either GitHub or Yahoo! embedded my attachments instead of attaching them.

I think I figured out the problem though. Looking at the my logs of what messages IBG was sending during the reset, I notice something odd. Here is a partial log of when I wasn't using IBC and when I didn't have any problems with IBG automatically re-logging back in when it lost the connection to its server.

[ERROR] 2021-08-02 00:21:13.520 [TWSEventProcessor-2] Trader - error-3: -1 | 1100 | Connectivity between IB and Trader Workstation has been lost.
...more of the same messages...
[ERROR] 2021-08-02 00:23:27.922 [TWSEventProcessor-2] Trader - error-3: -1 | 1100 | Connectivity between IB and Trader Workstation has been lost.
[ERROR] 2021-08-02 00:24:26.897 [TWSEventProcessor-2] Trader - error-3: -1 | 1102 | Connectivity between IB and Trader Workstation has been restored - data maintained. The following farms are connected: cashfarm; secdefil. The following farms are not connected: cashhmds.
[INFO ] 2021-08-02 00:24:26.897 [TWSEventProcessor-2] EventReport - [IB API] 1102: Connectivity between IB and Trader Workstation has been restored - data maintained. The following farms are connected: cashfarm; secdefil. The following farms are not connected: cashhmds.
[ERROR] 2021-08-02 01:39:29.308 [TWSEventProcessor-2] Trader - error-3: -1 | 2106 | HMDS data farm connection is OK:cashhmds
[INFO ] 2021-08-02 01:39:29.308 [TWSEventProcessor-2] EventReport - [IB API] 2106: HMDS data farm connection is OK:cashhmds
[ERROR] 2021-08-02 01:47:29.351 [TWSEventProcessor-2] Trader - error-3: -1 | 2107 | HMDS data farm connection is inactive but should be available upon demand.cashhmds
[INFO ] 2021-08-02 01:47:29.351 [TWSEventProcessor-2] EventReport - [IB API] 2107: HMDS data farm connection is inactive but should be available upon demand.cashhmds

Here's the partial log for the same event last night with IBC handling a successful re-login.

[ERROR] 2021-10-01 00:19:28.492 [TWSEventProcessor-2] Trader - error-3: -1 | 2103 | Market data farm connection is broken:usfarm
[INFO ] 2021-10-01 00:19:28.492 [TWSEventProcessor-2] EventReport - [IB API] 2103: Market data farm connection is broken:usfarm
[ERROR] 2021-10-01 00:19:29.191 [TWSEventProcessor-2] Trader - error-3: -1 | 2104 | Market data farm connection is OK:usfarm
[INFO ] 2021-10-01 00:19:29.192 [TWSEventProcessor-2] EventReport - [IB API] 2104: Market data farm connection is OK:usfarm
[ERROR] 2021-10-01 00:25:22.357 [TWSEventProcessor-2] Trader - error-3: -1 | 1100 | Connectivity between IB and Trader Workstation has been lost.
...more of the same messages...
[ERROR] 2021-10-01 00:27:26.360 [TWSEventProcessor-2] Trader - error-3: -1 | 1100 | Connectivity between IB and Trader Workstation has been lost.
[ERROR] 2021-10-01 00:27:53.616 [TWSEventProcessor-2] Trader - error-3: -1 | 2103 | Market data farm connection is broken:usfarm
[INFO ] 2021-10-01 00:27:53.616 [TWSEventProcessor-2] EventReport - [IB API] 2103: Market data farm connection is broken:usfarm
[ERROR] 2021-10-01 00:27:53.617 [TWSEventProcessor-2] Trader - error-3: -1 | 2103 | Market data farm connection is broken:cashfarm
[INFO ] 2021-10-01 00:27:53.617 [TWSEventProcessor-2] EventReport - [IB API] 2103: Market data farm connection is broken:cashfarm
[ERROR] 2021-10-01 00:27:53.624 [TWSEventProcessor-2] Trader - error-3: -1 | 2157 | Sec-def data farm connection is broken:secdefil
[INFO ] 2021-10-01 00:27:53.624 [TWSEventProcessor-2] EventReport - [IB API] 2157: Sec-def data farm connection is broken:secdefil
[ERROR] 2021-10-01 00:27:53.625 [TWSEventProcessor-2] Trader - error-3: -1 | 2105 | HMDS data farm connection is broken:ushmds
[INFO ] 2021-10-01 00:27:53.625 [TWSEventProcessor-2] EventReport - [IB API] 2105: HMDS data farm connection is broken:ushmds
[ERROR] 2021-10-01 00:27:53.797 [TWSEventProcessor-2] Trader - error-3: -1 | 2158 | Sec-def data farm connection is OK:secdefil
[INFO ] 2021-10-01 00:27:53.797 [TWSEventProcessor-2] EventReport - [IB API] 2158: Sec-def data farm connection is OK:secdefil
[ERROR] 2021-10-01 00:27:53.829 [TWSEventProcessor-2] Trader - error-3: -1 | 2104 | Market data farm connection is OK:cashfarm
[INFO ] 2021-10-01 00:27:53.829 [TWSEventProcessor-2] EventReport - [IB API] 2104: Market data farm connection is OK:cashfarm
[ERROR] 2021-10-01 00:27:54.060 [TWSEventProcessor-2] Trader - error-3: -1 | 2104 | Market data farm connection is OK:usfarm
[INFO ] 2021-10-01 00:27:54.060 [TWSEventProcessor-2] EventReport - [IB API] 2104: Market data farm connection is OK:usfarm
[ERROR] 2021-10-01 00:27:58.488 [TWSEventProcessor-2] Trader - error-3: -1 | 2106 | HMDS data farm connection is OK:ushmds
[INFO ] 2021-10-01 00:27:58.488 [TWSEventProcessor-2] EventReport - [IB API] 2106: HMDS data farm connection is OK:ushmds
[ERROR] 2021-10-01 00:27:58.635 [TWSEventProcessor-2] Trader - error-3: -1 | 1102 | Connectivity between IB and Trader Workstation has been restored - data maintained. All data farms are connected: cashfarm; usfarm; ushmds; secdefil.
[INFO ] 2021-10-01 00:27:58.635 [TWSEventProcessor-2] EventReport - [IB API] 1102: Connectivity between IB and Trader Workstation has been restored - data maintained. All data farms are connected: cashfarm; usfarm; ushmds; secdefil.
[ERROR] 2021-10-01 00:27:59.595 [TWSEventProcessor-2] Trader - error-3: 13 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.596 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 13)
[ERROR] 2021-10-01 00:27:59.596 [TWSEventProcessor-2] Trader - error-3: 12 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.596 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 12)
[ERROR] 2021-10-01 00:27:59.596 [TWSEventProcessor-2] Trader - error-3: 4 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.596 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 4)
[ERROR] 2021-10-01 00:27:59.596 [TWSEventProcessor-2] Trader - error-3: 6 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.596 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 6)
[ERROR] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] Trader - error-3: 14 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 14)
[ERROR] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] Trader - error-3: 3 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 3)
[ERROR] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] Trader - error-3: 2 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 2)
[ERROR] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] Trader - error-3: 11 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 11)
[ERROR] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] Trader - error-3: 5 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 5)
[ERROR] 2021-10-01 00:27:59.597 [TWSEventProcessor-2] Trader - error-3: 1 | 10197 | No market data during competing live session
[INFO ] 2021-10-01 00:27:59.598 [TWSEventProcessor-2] EventReport - [IB API] 10197: No market data during competing live session (for id 1)
[ERROR] 2021-10-01 00:28:05.715 [TWSEventProcessor-2] Trader - error-3: -1 | 2108 | Market data farm connection is inactive but should be available upon demand.cashfarm
[INFO ] 2021-10-01 00:28:05.715 [TWSEventProcessor-2] EventReport - [IB API] 2108: Market data farm connection is inactive but should be available upon demand.cashfarm
[ERROR] 2021-10-01 00:28:05.715 [TWSEventProcessor-2] Trader - error-3: -1 | 2108 | Market data farm connection is inactive but should be available upon demand.cashfarm
[ERROR] 2021-10-01 00:33:58.500 [TWSEventProcessor-2] Trader - error-3: -1 | 2107 | HMDS data farm connection is inactive but should be available upon demand.ushmds
[INFO ] 2021-10-01 00:33:58.500 [TWSEventProcessor-2] EventReport - [IB API] 2107: HMDS data farm connection is inactive but should be available upon demand.ushmds

It looks to me like when IBC reconnects, there is a new session with the old session being active. I'm not sure if this is a change on the server or is it something strange happening when IBC automatically performs the reconnect. In both cases, with or without IBC, my app does not get disconnected from the IBG socket. Hence, I don't re-subscribe to market data. At least now that I know what the culprit may be, I'll add some code for that error to break the connection and then re-establish it again. I'm thinking this is new behavior on the IB server side because I didn't have this problem before, even when using IBC.

rlktradewright commented 3 years ago

The most important point: you say 'my app does not get disconnected from the IBG socket. Hence, I don't re-subscribe to market data'. But even if you haven't been disconnected from the API, you still need to re-subscribe to market data any time you receive an 1102 error message, which may or may not occur during the reset (but can also occur at any other time).

Also I think you have a misunderstanding of what IBC actually does. You say 'when IBC reconnects...', but this doesn't mean anything. All that IBC does is handle user interface events that the user would otherwise have to handle manually.

For example, during the reset period, if TWS/Gateway displays a 'relogin' dialog, IBC simply clicks the relevant button. If TWS/Gateway doesn't display any dialogs that IBC needs to handle, it doesn't do anything other than log any user interface events it detects - for example TWS/Gateway always briefly displays some dialogs that IBC is not interested in during the reset period, so IBC logs the fact but takes no action.

Note that TWS/Gateway is completely unaware of the fact that IBC is monitoring it, so it doesn't behave differently when IBC is there than it does when IBC isn't there. The difference between your two log extracts is just because what happens during the reset period isn't the same every time: sometimes a relogin dialog is displayed, sometimes it isn't, and presumably what happens depends on all sorts of things at the IB server end that we have no knowledge of or control over.

Don't be confused by the 'No market data during competing live session' error messages: these are completely spurious if they occur during the reset, and the API application should just ignore them.

man910 commented 2 years ago

I've been running non-stop during the weekdays for over a year, and I've never had to re-subscribe to market data when I've received an 1102 error message.

I understand that IBC is just a UI automation. That's why I wasn't really blaming anything on IBC. I was just really curious to whether anyone's had this issue before since I only saw it when having the IBC scripts launch the IBG jar file. I didn't dig too deep into it, so I thought maybe there were some parameters that were being set, which I wasn't aware of.

In any event, I was waiting for the 10197 Competing live session error, and it appeared earlier today. Disconnecting and reconnecting from IBG worked, and I'm able to get streaming prices again.

Thanks for all the troubleshooting you provided. I really appreciate it.