开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: IBC Version 3.16.0

 

Working quite slowly through my upgrade todo list, I am luckily at the point where I am trying to enable the recent restart function in Linux (via python). This python code should work but and pointers as to where I can locate the correct command server address and port would be appreciated, or do I need to explicitly configure these myself?

import telnetlib

with telnetlib.Telnet(IBC_SERVER_ADDRESS, IBC_SERVER_PORT) as tn:
? ? ? ? ? ??tn.write(RESTART_COMMAND.encode())

?


IBC version 3.16.2

 

开云体育

I’ve released version 3.16.2 of IBC, which you can get here:

?

?

This release provides two enhancements:

?

  • IBC now detects situations where more than one potentially valid autorestart file exists when starting or restarting.

?

This situation can arise if multiple instances of IBC are configured with the same TWS_SETTINGS_PATH and the same auto-restart time (for example live and paper trading instances). The safest approach is to ensure that different auto-restart times are configured, separated by at least one minute (but 5 minutes would be safer still). It's also worth considering using different TWS_SETTINGS_PATH settings, so that this issue doesn't arise.

?

When IBC detects this situation, it deletes all the autorestart files and then proceeds with a normal start of TWS/Gateway. This means that the login form is displayed and handled in the usual way by IBC, including full Second Factor Authentication for live accounts.

?

IBC writes details of the detected autorestart files to its logfile as an aid to diagnosing the problem.

?

  • The SessionManager method previously with signature static void Initialise(boolean isGateway) has been renamed and made public. Its new signature is public static void initialise(boolean isGateway).

?

This is necessary for programs that run IBC in-process rather than starting it via the scripts.

?

DO I NEED TO UPGRADE TO THIS RELEASE?

?

For a new IBC installation, you should download the relevant zip file and proceed as detailed in the User Guide (included in the zip file, or at https://github.com/IbcAlpha/IBC/blob/master/userguide.md).

?

Otherwise proceed as in the 'How to Upgrade' description below. Note that:

?

  • If the circumstances described above regarding the autorestart files do not apply to you, you do not need to deploy the updated script file.

?

  • If you do not load IBC within your own program, you do not need to deploy the updated IBC.jar file.

?

HOW TO UPGRADE

?

Either extract the relevant changed files from the zip file, or download them directly from the provided URL. Overwrite the existing version with the new one. You can do this while TWS/Gateway are running, but you must then shut TWS/Gateway down and start it afresh for the updates to take effect: note that using File | Restart or the RESTART command will not work correctly.

?

The only changed files are:

?

IBC.jar (URL https://github.com/IbcAlpha/IBC/blob/master/resources/IBC.jar)

version (URL https://github.com/IbcAlpha/IBC/blob/master/resources/version)

?

StartIBC.bat (Windows only, scripts subfolder, URL https://github.com/IbcAlpha/IBC/blob/master/resources/scripts/StartIBC.bat)

?

ibcstart.sh (Linux/macOS only, scripts subfolder, URL https://github.com/IbcAlpha/IBC/blob/master/resources/scripts/ibcstart.sh)

?

?

Richard

?


Re: Why isnt my IBC auto logging in?

 

Thanks for the super in-depth explanation, read through it all.

actually it works now that I’ve deleted it, thank you!


Re: Why isnt my IBC auto logging in?

 

开云体育

TLDR: it’s worth reading and understanding what follows, but the short statement as to what you should do is:

?

Delete the C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo folder

?

?

As Mattias says, IBC thinks this is a restart situation because the file C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo\autorestart exists.

?

The cause of the problem is that this file should not exist at all. The autorestart file is created by TWS/Gateway just before it does its auto-restart, and it creates it in the folder that holds the TWS/Gateway settings for the current user (this is the folder with the peculiar long name, such as eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo: there is a separate folder for each TWS/Gateway user) . As soon as restart is completed, TWS/Gateway deletes the autorestart file, so this file should only exist for brief periods.

?

With your current settings as shown in the logfile, this folder should be held in C:\Jts, so for the short time that the autorestart file normally exists it should be in C:\Jts\<peculiarlongname>. But IBC is finding it in C:\Jts\1021\<peculiarlongname> (IBC has no way of knowing where it should look for the autorestart file, so it just finds all such files in the TWS/Gateway settings and uses the first one it finds – if things are set up healthily there should only be one, if any).

?

So I suspect that at some point you had set TWS_SETTINGS_PATH to C:\Jts\1021 in your StartTWS.bat (or IbDir=C:\Jts\1021 in config.ini), and the autorestart file is left over from that.

?

And what’s happening is that IBC is telling TWS to use the autorestart file, so TWS is looking in C:\Jts\<peculiarlongname> and not finding it, so it just displays the usual login dialog with the username and password not filled in. But IBC thinks it’s a valid auto-restart situation, and it knows that it doesn’t need to intervene during auto-restart login, so it just sits that and ignores the login dialog.

?

I suggest you delete the C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo folder completely. This should cure the problem (as should just deleting the autorestart file, but there is no reason for this folder to exist now).

?

I’ll think about whether I can improve IBC’s detection of the autorestart file. For example it could ignore any autorestart file in a folder that’s not an immediate subfolder of the TWS settings folder. I could also perhaps consider always filling in the username and password in the login dialog if these fields are visible and writeable, though that may not be either feasible or desirable.

?

I hope this clarifies things!

?


Re: Why isnt my IBC auto logging in?

 

Hi,

sticking my nose in here. If you check out the following lines in the logfile it sure looks like a restart issue:

Finding autorestart file
autorestart file found at C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo\autorestart
AUTORESTART_OPTION is -Drestart=eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo

Delete "C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo\autorestart" and give it a new try.


Re: Why isnt my IBC auto logging in?

 

Hi,

Here you go.

Log file, and also the login screen that it's stuck at.
Userpass/Trading Mode is in the?C:\Users\admin\Documents\IBC\config.ini file


Re: Why isnt my IBC auto logging in?

 

开云体育

Ok, but the log file you quoted yesterday was definitely a restart situation, and not what you’re talking about here.

?

So send me the correct logfile.

?

?

From: [email protected] <[email protected]> On Behalf Of alvinneo.w@...
Sent: 09 March 2023 03:13
To: [email protected]
Subject: Re: [ibc] Why isnt my IBC auto logging in?

?

Hey thanks for your reply!

It's not an auto restart issue. Referring to when I just log in. Starting the batch file, it opens TWS automatically but it never fills up the user/pass, regardless how long I wait.

Just to be sure too, I checked that folder and saw no 'autorestart' file.?


Re: Why isnt my IBC auto logging in?

 

Hey thanks for your reply!

It's not an auto restart issue. Referring to when I just log in. Starting the batch file, it opens TWS automatically but it never fills up the user/pass, regardless how long I wait.

Just to be sure too, I checked that folder and saw no 'autorestart' file.?


Re: Why isnt my IBC auto logging in?

 

开云体育

[In future, please don’t quote logfiles in your posts. Just attach the logfile to it, the WHOLE logfile. Quoting it just makes life more difficult for me, and uses more of my time to help solve your problem. Thanks.]

?

When TWS auto-restarts, it doesn’t need the username and password, because the relevant information is stored encrypted in the ‘autorestart’ file.

?

It looks like what’s happened here is that it has tried to auto-restart, but you’ve noticed that the username and password aren’t filled in, so you’ve killed the program. Next time you run it, the ‘autorestart’ file still exists (because you didn’t allow the auto-restart to succeed), so it tries to auto-restart again, and you’ve killed it again.

?

Just be patient: auto-restart takes a while to happen. It takes even longer with a live account.

?

I suggest you delete the autorestart, to get everything back to its initial state. The file is here:

?

C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo\autorestart

?

Now run IBC again, and just leave it alone to do its thing.

?

Richard

?

?


Re: IBC Version 3.16.0

 

开云体育

No change at IB.

?

IBC now deals correctly with auto-restart, so you don’t need to manually re-authenticate or do 2FA or anything during the week.

?

Richard

?

?

From: [email protected] <[email protected]> On Behalf Of Henry147
Sent: 08 March 2023 07:48
To: [email protected]
Subject: Re: [ibc] IBC Version 3.16.0

?

Was there a recent change that IB now actually supports running the tws for one week without manual auth. every day ?
I remembered discussions end of last year that IB would drop this feature for security reasons.
Or is it just IBC that can handle this mode correctly now ?


Re: IBC Version 3.16.0

Henry147
 

开云体育

Was there a recent change that IB now actually supports running the tws for one week without manual auth. every day ?
I remembered discussions end of last year that IB would drop this feature for security reasons.
Or is it just IBC that can handle this mode correctly now ?

Am 23.01.2023 um 17:34 schrieb Jonathan S:

The restart command works (on Ubuntu) for me and skips the 2FA!
This is great for the occasionally needed mid-week restart.

Thanks again, Richard.





On Fri, Jan 20, 2023 at 3:31 PM Mark Murari <markm00001@...> wrote:
Awesome Richard! Can’t wait to try it.


On 20 Jan 2023, at 18:58, Richard L King <rlking@...> wrote:

?

I’ve just released version 3.16.0 of IBC to GitHub. You can download it here:

?

?

This release provides additional support for Auto-restart in TWS and Gateway, for all current TWS/Gateway versions (ie 1012 onwards). Auto-restart is not supported when used with earlier TWS/Gateway versions.

?

IMPORTANT If you are currently using an IBC version earlier than 3.15.2, you are strongly advised to upgrade to this version.

?

The main enhancement is the provision of a RESTART command that can be sent to IBC's command server. This causes TWS/Gateway to auto-restart without the user having to re-authenticate. Note however that this command cannot be used to bypass the need to do full second-factor authentication on Sundays. A new Windows script, Restart.bat is provided. This script, and the revised Stop.bat script, both use a new user-customisable SendCommand.bat script to identify the IBC instance to be stopped or restarted.

?

Note that for Gateway, and for TWS versions before 1018, using the RESTART command will alter the configured AutoRestart time to the time that the command was carried out. To prevent subsequent auto-restarts at that time, ensure that the AutoRestartTime or AutoLogoffTime setting in config.ini is set as desired.

?

Additionally, the following changes have been made:

?

  • the description of running IBC under Task Scheduler on Windows has been corrected

?

  • the ReadOnlyLogin setting in config.ini now works properly in cases where the user has only a security code card but not IBKR mobile (fix Issue #190)

?

  • the StartTWS.bat script on Windows has been improved to allow the colours used for the banner window to be specified (as was previously enabled for the GatewayStart.bat script). This could be used for example to easily distinguish between the banner windows for live and paper trading instances

?

  • various code improvements have been made - see the commit history on GitHub

?

  • a number of clarifications have been made to the comments in the start scripts and in config.ini

?

HOW TO UPGRADE

?

The safest way to upgrade is to first to rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files. On Linux, remember to set execute permission on the scripts.

?

All platforms:

?

config.ini

?

Windows only:

?

StartTWS.bat

StartGateway.bat

SendCommand.bat? (new file in this release, needs customisation as per the old Stop.bat)

?

Linux & macOS

?

gatewaystart.sh (or gatewaystartmacos.sh)

twsstart.sh (or twsstartmacos.sh)

?

Richard

?


Why isnt my IBC auto logging in?

 

I've got my IBC set up and working well in a separate VPS.

When I try to use another VPS to load up a paper account (which I know can run simultaneously to a live one, just without market data), the user/pass doesn't fill in itself. config file is in admin folder.?

Definitely missing something. Appreciate your help.

Logs here below:

?

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

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

?

This log file is located at:

?

? ? C:\IBC\Logs\IBC-3.16.0_TWS-1021_TUESDAY.txt

?

?

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

?

Starting IBC version 3.16.0 on Tue 03/07/2023 at 22:29:33.49

?

Operating system:? Microsoft Windows Server 2019 Standard? 64-bit? ? ? ? ? 10.0.17763??

?

Arguments:

?

TWS version = 1021

Program = TWS

Entry point = ibcalpha.ibc.IbcTws

/TwsPath = C:\Jts

/TwsSettingsPath =?

/IbcPath = C:\IBC

/Config = C:\Users\admin\Documents\IBC\config.ini

/Mode =?

/JavaPath =?

/User =

/PW =

/FIXUser =

/FIXPW =

?

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

?

Generating the classpath

Classpath=C:\Jts\1021\jars\jackson-core-2.12.3.jar;C:\Jts\1021\jars\jts4launch-1021.jar;C:\Jts\1021\jars\jxbrowser-7.26.jar;C:\Jts\1021\jars\jxbrowser-swing-7.26.jar;C:\Jts\1021\jars\jxbrowser-win64-7.26.jar;C:\Jts\1021\jars\locales.jar;C:\Jts\1021\jars\log4j-api-2.17.1.jar;C:\Jts\1021\jars\log4j-core-2.17.1.jar;C:\Jts\1021\jars\total-2020.jar;C:\Jts\1021\jars\twslaunch-1021.jar;C:\Jts\1021\jars\twslaunch-install4j-1.12.jar;C:\Jts\1021\.install4j\i4jruntime.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=2529f03f-6ec2-42fa-99cc-3d27d82562d1 -DvmOptionsPath=C:\Jts\1021\tws.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768m -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -Dexe4j.isInstall4j=true -Dinstall4jType=standalone -DjtsConfigDir=C:\Jts

?

Finding autorestart file

autorestart file found at C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo\autorestart

AUTORESTART_OPTION is -Drestart=eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo

?

Determining the location of java.exe?

Location of java.exe=C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\bin

?

Renaming TWS or Gateway .exe file to prevent restart without IBC

.

?

Starting IBC with this command:

"C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\bin\java.exe" -cp? "C:\Jts\1021\jars\jackson-core-2.12.3.jar;C:\Jts\1021\jars\jts4launch-1021.jar;C:\Jts\1021\jars\jxbrowser-7.26.jar;C:\Jts\1021\jars\jxbrowser-swing-7.26.jar;C:\Jts\1021\jars\jxbrowser-win64-7.26.jar;C:\Jts\1021\jars\locales.jar;C:\Jts\1021\jars\log4j-api-2.17.1.jar;C:\Jts\1021\jars\log4j-core-2.17.1.jar;C:\Jts\1021\jars\total-2020.jar;C:\Jts\1021\jars\twslaunch-1021.jar;C:\Jts\1021\jars\twslaunch-install4j-1.12.jar;C:\Jts\1021\.install4j\i4jruntime.jar;C:\IBC\IBC.jar"? -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dinstaller.uuid=2529f03f-6ec2-42fa-99cc-3d27d82562d1 -DvmOptionsPath=C:\Jts\1021\tws.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768m -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -Dexe4j.isInstall4j=true -Dinstall4jType=standalone -DjtsConfigDir=C:\Jts -Drestart=eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo ibcalpha.ibc.IbcTws "C:\Users\admin\Documents\IBC\config.ini"??

?

IBC Settings:

? ? AcceptBidAskLastSizeDisplayUpdateNotification=

? ? AcceptIncomingConnectionAction=reject

? ? AcceptNonBrokerageAccountWarning=no

? ? AllowBlindTrading=no

? ? AutoLogoffTime=

? ? AutoRestartTime=

? ? BindAddress=

? ? ClosedownAt=

? ? CommandPrompt=

? ? CommandServerPort=0

? ? ConfirmCryptoCurrencyOrders=manual

? ? ControlFrom=

? ? DismissNSEComplianceNotice=yes

? ? DismissPasswordExpiryWarning=no

? ? ExistingSessionDetectedAction=manual

? ? ExitAfterSecondFactorAuthenticationTimeout=no

? ? FIX=no

? ? FIXLoginId=***

? ? FIXPassword=***

? ? IbDir=

? ? IbLoginId=***

? ? IbPassword=***

? ? LogStructureScope=known

? ? LogStructureWhen=never

? ? LoginDialogDisplayTimeout=60

? ? MinimizeMainWindow=no

? ? OverrideTwsApiPort=

? ? ReadOnlyApi=

? ? ReadOnlyLogin=no

? ? ReloginAfterSecondFactorAuthenticationTimeout=yes

? ? SaveTwsSettingsAt=

? ? SecondFactorAuthenticationExitInterval=100000

? ? SecondFactorAuthenticationTimeout=180

? ? SecondFactorDevice=

? ? SendMarketDataInLotsForUSstocks=

? ? StoreSettingsOnServer=

? ? SuppressInfoMessages=yes

? ? TradingMode=paper

End IBC Settings

?

2023-03-07 22:29:34:011 IBC: Version: 3.16.0

System Properties

------------------------------------------------------------

jtsConfigDir = C:\Jts

swing.boldMetal = false

java.runtime.name = Java(TM) SE Runtime Environment

sun.boot.library.path = C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\bin

java.vm.version = 25.202-b08

sun.awt.nopixfmt = true

vmOptionsPath = C:\Jts\1021\tws.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_202-b08

java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment

java.endorsed.dirs = C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\endorsed

os.arch = amd64

java.io.tmpdir = C:\Users\admin\AppData\Local\Temp\3\

line.separator =?

?

java.vm.specification.vendor = Oracle Corporation

user.variant =?

os.name = Windows Server 2016

sun.java2d.noddraw = true

sun.jnu.encoding = Cp1252

java.library.path = C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\DTN\IQFeed;.

java.specification.name = Java Platform API Specification

java.class.version = 52.0

sun.management.compiler = HotSpot 64-Bit Tiered Compilers

exe4j.isInstall4j = true

os.version = 10.0

user.home = C:\Users\admin

user.timezone = America/Los_Angeles

installer.uuid = 2529f03f-6ec2-42fa-99cc-3d27d82562d1

java.awt.printerjob = sun.awt.windows.WPrinterJob

file.encoding = Cp1252

java.specification.version = 1.8

java.class.path = C:\Jts\1021\jars\jackson-core-2.12.3.jar;C:\Jts\1021\jars\jts4launch-1021.jar;C:\Jts\1021\jars\jxbrowser-7.26.jar;C:\Jts\1021\jars\jxbrowser-swing-7.26.jar;C:\Jts\1021\jars\jxbrowser-win64-7.26.jar;C:\Jts\1021\jars\locales.jar;C:\Jts\1021\jars\log4j-api-2.17.1.jar;C:\Jts\1021\jars\log4j-core-2.17.1.jar;C:\Jts\1021\jars\total-2020.jar;C:\Jts\1021\jars\twslaunch-1021.jar;C:\Jts\1021\jars\twslaunch-install4j-1.12.jar;C:\Jts\1021\.install4j\i4jruntime.jar;C:\IBC\IBC.jar

user.name = admin

channel = latest

java.vm.specification.version = 1.8

sun.java.command = ibcalpha.ibc.IbcTws C:\Users\admin\Documents\IBC\config.ini

java.home = C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_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_202

java.ext.dirs = C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\ext;C:\Windows\Sun\Java\lib\ext

sun.boot.class.path = C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\resources.jar;C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\rt.jar;C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\sunrsasign.jar;C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\jsse.jar;C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\jce.jar;C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\charsets.jar;C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\lib\jfr.jar;C:\Users\admin\AppData\Roaming\i4j_jres\Oda-jK0QgTEmVssfllLP\1.8.0_202_64\classes

java.vendor = Oracle Corporation

file.separator = \

twslaunch.autoupdate.serviceImpl = com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService

java.vendor.url.bug = http://bugreport.sun.com/bugreport/

install4jType = standalone

restart = eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo

sun.io.unicode.encoding = UnicodeLittle

sun.cpu.endian = little

sun.desktop = windows

sun.locale.formatasdefault = true

sun.cpu.isalist = amd64

------------------------------------------------------------

2023-03-07 22:29:34:011 IBC: Using default settings provider: ini file is C:\Users\admin\Documents\IBC\config.ini

2023-03-07 22:29:34:011 IBC: Using default login manager: getting username and password from args but not found. Will get from settings

2023-03-07 22:29:34:026 IBC: Using default main window manager

2023-03-07 22:29:34:026 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings

2023-03-07 22:29:34:026 IBC: Using default config dialog manager

2023-03-07 22:29:34:026 IBC: CommandServer is not started because the port is not configured

2023-03-07 22:29:34:120 IBC: TWS Settings directory is: C:\Jts

2023-03-07 22:29:34:120 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines

2023-03-07 22:29:34:120 IBC: Found setting: [Logon]/s3store=true

2023-03-07 22:29:34:120 IBC: Found setting: [Logon]/Locale=en

2023-03-07 22:29:34:120 IBC: Found setting: [Logon]/displayedproxymsg=1

2023-03-07 22:29:34:120 IBC: Found setting: [Logon]/UseSSL=true

2023-03-07 22:29:34:120 IBC: Found setting: [IBGateway]/ApiOnly=true

2023-03-07 22:29:34:120 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines

2023-03-07 22:29:34:120 IBC: Starting TWS

2023-03-07 22:29:34:120 IBC: Re-starting session

2023-03-07 22:29:36:550 IBC: Detected frame entitled: Login; event=Activated

2023-03-07 22:29:36:558 IBC: Detected frame entitled: Login; event=Focused

2023-03-07 22:29:36:558 IBC: Detected frame entitled: Login; event=Opened

2023-03-07 22:29:36:558 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT

2023-03-07 22:29:39:528 IBC: Detected frame entitled: Login; event=Closing

Program has exited

Error level is 0

Check for 2FA dialog timed out

Check for login dialog display timeout

Check for restart

call :GetAutoRestartOption

Finding autorestart file

autorestart file found at C:\Jts\1021\eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo\autorestart

AUTORESTART_OPTION is -Drestart=eaofclieeefbgmdpbdlnlhmkkmpicenmpaafhpoo

IBC will autorestart shortly

^C


Re: IBC Version 3.16.0

 

Apologies Richard regarding the log files, a bad habit of mine from before I joined this forum!

I ended up completely reinstalling Gateway and that has resolved the issue... probably should have tried that first. I realized this when I spun up the same scenario on my VPS and it worked perfectly.

I did first try Step 2 and 3 but there were no autorestart files in any of the long-named folders, thanks again Richard


Re: IBC Version 3.16.0

 

开云体育

Dan

?

Can I please ask you, and anyone else reading this, NOT to include extracts of log files in your posts. Instead, attach the WHOLE logfile(s) so that I can see everything in them. You might think that some of the information in the log files is irrelevant, but believe me everything is there for a reason and can be very helpful to me when diagnosing problems.

?

So, with the information you’ve supplied, it’s not easy to see what’s going on.

?

For a start, it looks like the Gateway in your attempt 1 actually thinks it’s restarting, but because I don’t have the whole logfile I can’t verify what it has done. So perhaps you haven’t told me the full story of what’s happening here?

?

All I can suggest is that you do the following:

?

  1. Make sure there are no Gateway (or TWS) instances running.
  2. Delete the file C:\Jts\amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj\autorestart if it exists.
  3. If there are any other similarly long-named folders under C:\Jts that contain an autorestart file, delete those files as well.

?

Now run StartGateway.bat, and then try the Restart.bat file. If there is still a problem, then let me know and make sure to attach the complete logfiles.

?

One more thing, are you perhaps running both live and paper-trading accounts at the same time with the same version of Gateway? If so, this may cause a problem. The problem arises when one of the Gateways is shut down normally (ie no restart): when the other one reaches its restart time, it does reload but not under IBC control, so the login dialog will be displayed without the username and password filled in.

?

I’m investigating this, and the simple workaround is to run the live account with the Stable version and the paper account with the LATEST version. I had somehow convinced myself that this wasn’t going to be a problem, but I think I was wrong…

?

?

?

From: [email protected] <[email protected]> On Behalf Of Dan
Sent: 03 March 2023 07:05
To: [email protected]
Subject: Re: [ibc] IBC Version 3.16.0

?

Hi Richard

Thanks again for your great work!

Just wanted to get your thoughts on some unexpected (?) behaviour on my end (Windows 10) Thanks!:


Attempt 1:
1. Run StartGateway.bat on my PC
2. Wait for Gateway to finish Start
3. Run Restart.bat (Repeated Attempt 1 by sending the RESTART command to the CommandServer for same result)
4. Gateway successfully restarts but there is a 2nd Gateway window at the login page.
5. Run Stop.bat
Result is IBC and the 2nd Gateway window at the login page are closed by Stop.bat but the logged in Gateway window remains

Attempt 2:
Same steps as above, but wait 5 minutes after running StartGateway.bat
Result is there are two Gateway windows attempting to login, one successfully logs in and the other says user already logged in.

Attempt 1 Logs:
2023-03-03 17:40:04:604 IBC: Using default login manager: getting username and password from args but not found. Will get from settings
2023-03-03 17:40:04:604 IBC: Using default main window manager
2023-03-03 17:40:04:604 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings
2023-03-03 17:40:04:605 IBC: Using default config dialog manager
2023-03-03 17:40:04:607 IBC: CommandServer is starting with port 7462
2023-03-03 17:40:04:634 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462
2023-03-03 17:40:04:634 IBC: CommandServer started and is ready to accept commands
2023-03-03 17:40:04:645 IBC: TWS Settings directory is: C:\Jts
2023-03-03 17:40:04:648 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:40:04:648 IBC: Found setting: [Logon]/s3store=true
2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/Locale=en
2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/displayedproxymsg=1
2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/UseSSL=true
2023-03-03 17:40:04:649 IBC: Found setting: [IBGateway]/ApiOnly=true
2023-03-03 17:40:04:649 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:40:04:649 IBC: Starting Gateway
2023-03-03 17:40:04:649 IBC: Re-starting session
2023-03-03 17:40:06:447 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:40:06:451 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:40:06:452 IBC: Detected frame entitled: IB Gateway; event=Opened
2023-03-03 17:40:06:452 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
2023-03-03 17:40:12:541 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:40:12:542 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:41:01:382 IBC: CommandServer: ControlFrom setting =
2023-03-03 17:41:01:382 IBC: CommandServer accepted connection from: /127.0.0.1
2023-03-03 17:41:01:551 IBC: CommandServer received command: RESTART
2023-03-03 17:41:01:551 IBC: Getting main window
2023-03-03 17:41:01:552 IBC: Creating main window future
2023-03-03 17:41:05:431 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:41:05:433 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:41:08:073 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:41:08:074 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:41:12:520 IBC: CommandServer: ControlFrom setting =
2023-03-03 17:41:12:520 IBC: CommandServer accepted connection from: /127.0.0.1
2023-03-03 17:41:12:671 IBC: CommandServer received command: STOP
2023-03-03 17:41:12:672 IBC: Closing command channel
2023-03-03 17:41:12:672 IBC: CommandServer closing
2023-03-03 17:41:12:673 IBC: Login has not completed: exiting immediately
2023-03-03 17:41:12:673 IBC: CommandServer is shutdown

Attempt 2:
2023-03-03 17:44:01:930 IBC: Using default login manager: getting username and password from args but not found. Will get from settings
2023-03-03 17:44:01:930 IBC: Using default main window manager
2023-03-03 17:44:01:931 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings
2023-03-03 17:44:01:931 IBC: Using default config dialog manager
2023-03-03 17:44:01:933 IBC: CommandServer is starting with port 7462
2023-03-03 17:44:01:959 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462
2023-03-03 17:44:01:959 IBC: CommandServer started and is ready to accept commands
2023-03-03 17:44:01:968 IBC: TWS Settings directory is: C:\Jts
2023-03-03 17:44:01:970 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/s3store=true
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/Locale=en
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/displayedproxymsg=1
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/UseSSL=true
2023-03-03 17:44:01:970 IBC: Found setting: [IBGateway]/ApiOnly=true
2023-03-03 17:44:01:970 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:44:01:970 IBC: Starting Gateway
2023-03-03 17:44:01:970 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds
2023-03-03 17:44:03:722 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:44:03:729 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:44:03:730 IBC: Detected frame entitled: IB Gateway; event=Opened
2023-03-03 17:44:03:730 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
2023-03-03 17:44:03:730 IBC: Trading mode from settings: tradingMode=live
2023-03-03 17:44:03:730 IBC: Setting Trading mode = live
2023-03-03 17:44:03:816 IBC: Login attempt: 1
2023-03-03 17:44:03:826 IBC: Click button: Log In
2023-03-03 17:44:04:642 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:44:04:643 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:44:04:643 IBC: Detected frame entitled: Loading...; event=Activated
2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Focused
2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Opened
2023-03-03 17:44:04:647 IBC: Found Gateway main window
2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Lost focus
2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Deactivated
2023-03-03 17:44:05:205 IBC: Detected frame entitled: Authenticating...; event=Activated
2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Focused
2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Opened
2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Lost focus
2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Deactivated
2023-03-03 17:44:05:945 IBC: Detected dialog entitled: Second Factor Authentication; event=Activated
2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Focused
2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Opened
2023-03-03 17:44:05:947 IBC: Second Factor Authentication initiated
2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Lost focus
2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Deactivated
2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Activated
2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Focused
2023-03-03 17:44:11:752 IBC: Detected dialog entitled: Second Factor Authentication; event=Closed
2023-03-03 17:44:11:752 IBC: Duration since login: 7 seconds
2023-03-03 17:44:11:752 IBC: If login has not completed, IBC will exit in 40 seconds
LogModuleConfigurator-Init: Log4j Ver2.x found on classpath
LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x
2023-03-03 17:44:13:925 IBC: Detected frame entitled: Starting application...; event=Lost focus
2023-03-03 17:44:13:926 IBC: Detected frame entitled: Starting application...; event=Focused
2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Lost focus
2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Deactivated
2023-03-03 17:44:13:927 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:44:13:928 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:44:13:928 IBC: Detected frame entitled: Starting application...; event=Closed
2023-03-03 17:44:13:928 IBC: Login has completed
2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:48:52:617 IBC: CommandServer: ControlFrom setting =
2023-03-03 17:48:52:618 IBC: CommandServer accepted connection from: /127.0.0.1
2023-03-03 17:48:52:784 IBC: CommandServer received command: RESTART
2023-03-03 17:48:52:785 IBC: Getting main window
2023-03-03 17:48:52:785 IBC: Main window already found
2023-03-03 17:48:52:788 IBC: Setting auto-restart time to 05:49 PM
2023-03-03 17:48:52:789 IBC: Closing command channel
2023-03-03 17:48:52:789 IBC: Getting config dialog
2023-03-03 17:48:52:789 IBC: Creating config dialog future
2023-03-03 17:48:52:789 IBC: Getting main window
2023-03-03 17:48:52:789 IBC: Main window already found
2023-03-03 17:48:52:789 IBC: Getting main window
2023-03-03 17:48:52:789 IBC: Main window already found
2023-03-03 17:48:52:789 IBC: Invoking config dialog menu
2023-03-03 17:48:53:054 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Activated
2023-03-03 17:48:53:056 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Focused
2023-03-03 17:48:53:057 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Opened
2023-03-03 17:48:53:057 IBC: Got config dialog from future
2023-03-03 17:48:53:062 IBC: Setting Auto restart time
2023-03-03 17:48:53:086 IBC: Auto restart time changed from 05:40 PM to 05:49 PM
2023-03-03 17:48:53:095 IBC: Click button: OK
2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Closed
2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Lost focus
2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Deactivated
2023-03-03 17:48:53:172 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:48:53:173 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:49:00:205 IBC: Detected dialog entitled: Restart in progress; event=Activated
2023-03-03 17:49:00:206 IBC: Detected dialog entitled: Restart in progress; event=Focused
2023-03-03 17:49:00:207 IBC: Detected dialog entitled: Restart in progress; event=Opened
2023-03-03 17:49:00,523 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:00,524 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:01,622 pool-3-thread-1 ERROR Attempted to append to non-started appender f
Program has exited
Error level is 0
Check for 2FA dialog timed out
Check for login dialog display timeout
Check for restart
call :GetAutoRestartOption
Finding autorestart file
autorestart file found at C:\Jts\amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj\autorestart
AUTORESTART_OPTION is -Drestart=amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj
IBC will autorestart shortly


Re: IBC Version 3.16.0

 

Hi Richard

Thanks again for your great work!

Just wanted to get your thoughts on some unexpected (?) behaviour on my end (Windows 10) Thanks!:


Attempt 1:
1. Run StartGateway.bat on my PC
2. Wait for Gateway to finish Start
3. Run Restart.bat (Repeated Attempt 1 by sending the RESTART command to the CommandServer for same result)
4. Gateway successfully restarts but there is a 2nd Gateway window at the login page.
5. Run Stop.bat
Result is IBC and the 2nd Gateway window at the login page are closed by Stop.bat but the logged in Gateway window remains

Attempt 2:
Same steps as above, but wait 5 minutes after running StartGateway.bat
Result is there are two Gateway windows attempting to login, one successfully logs in and the other says user already logged in.

Attempt 1 Logs:
2023-03-03 17:40:04:604 IBC: Using default login manager: getting username and password from args but not found. Will get from settings
2023-03-03 17:40:04:604 IBC: Using default main window manager
2023-03-03 17:40:04:604 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings
2023-03-03 17:40:04:605 IBC: Using default config dialog manager
2023-03-03 17:40:04:607 IBC: CommandServer is starting with port 7462
2023-03-03 17:40:04:634 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462
2023-03-03 17:40:04:634 IBC: CommandServer started and is ready to accept commands
2023-03-03 17:40:04:645 IBC: TWS Settings directory is: C:\Jts
2023-03-03 17:40:04:648 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:40:04:648 IBC: Found setting: [Logon]/s3store=true
2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/Locale=en
2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/displayedproxymsg=1
2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/UseSSL=true
2023-03-03 17:40:04:649 IBC: Found setting: [IBGateway]/ApiOnly=true
2023-03-03 17:40:04:649 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:40:04:649 IBC: Starting Gateway
2023-03-03 17:40:04:649 IBC: Re-starting session
2023-03-03 17:40:06:447 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:40:06:451 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:40:06:452 IBC: Detected frame entitled: IB Gateway; event=Opened
2023-03-03 17:40:06:452 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
2023-03-03 17:40:12:541 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:40:12:542 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:41:01:382 IBC: CommandServer: ControlFrom setting =
2023-03-03 17:41:01:382 IBC: CommandServer accepted connection from: /127.0.0.1
2023-03-03 17:41:01:551 IBC: CommandServer received command: RESTART
2023-03-03 17:41:01:551 IBC: Getting main window
2023-03-03 17:41:01:552 IBC: Creating main window future
2023-03-03 17:41:05:431 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:41:05:433 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:41:08:073 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:41:08:074 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:41:12:520 IBC: CommandServer: ControlFrom setting =
2023-03-03 17:41:12:520 IBC: CommandServer accepted connection from: /127.0.0.1
2023-03-03 17:41:12:671 IBC: CommandServer received command: STOP
2023-03-03 17:41:12:672 IBC: Closing command channel
2023-03-03 17:41:12:672 IBC: CommandServer closing
2023-03-03 17:41:12:673 IBC: Login has not completed: exiting immediately
2023-03-03 17:41:12:673 IBC: CommandServer is shutdown

Attempt 2:
2023-03-03 17:44:01:930 IBC: Using default login manager: getting username and password from args but not found. Will get from settings
2023-03-03 17:44:01:930 IBC: Using default main window manager
2023-03-03 17:44:01:931 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings
2023-03-03 17:44:01:931 IBC: Using default config dialog manager
2023-03-03 17:44:01:933 IBC: CommandServer is starting with port 7462
2023-03-03 17:44:01:959 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462
2023-03-03 17:44:01:959 IBC: CommandServer started and is ready to accept commands
2023-03-03 17:44:01:968 IBC: TWS Settings directory is: C:\Jts
2023-03-03 17:44:01:970 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/s3store=true
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/Locale=en
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/displayedproxymsg=1
2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/UseSSL=true
2023-03-03 17:44:01:970 IBC: Found setting: [IBGateway]/ApiOnly=true
2023-03-03 17:44:01:970 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines
2023-03-03 17:44:01:970 IBC: Starting Gateway
2023-03-03 17:44:01:970 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds
2023-03-03 17:44:03:722 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:44:03:729 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:44:03:730 IBC: Detected frame entitled: IB Gateway; event=Opened
2023-03-03 17:44:03:730 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
2023-03-03 17:44:03:730 IBC: Trading mode from settings: tradingMode=live
2023-03-03 17:44:03:730 IBC: Setting Trading mode = live
2023-03-03 17:44:03:816 IBC: Login attempt: 1
2023-03-03 17:44:03:826 IBC: Click button: Log In
2023-03-03 17:44:04:642 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:44:04:643 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:44:04:643 IBC: Detected frame entitled: Loading...; event=Activated
2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Focused
2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Opened
2023-03-03 17:44:04:647 IBC: Found Gateway main window
2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Lost focus
2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Deactivated
2023-03-03 17:44:05:205 IBC: Detected frame entitled: Authenticating...; event=Activated
2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Focused
2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Opened
2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Lost focus
2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Deactivated
2023-03-03 17:44:05:945 IBC: Detected dialog entitled: Second Factor Authentication; event=Activated
2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Focused
2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Opened
2023-03-03 17:44:05:947 IBC: Second Factor Authentication initiated
2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Lost focus
2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Deactivated
2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Activated
2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Focused
2023-03-03 17:44:11:752 IBC: Detected dialog entitled: Second Factor Authentication; event=Closed
2023-03-03 17:44:11:752 IBC: Duration since login: 7 seconds
2023-03-03 17:44:11:752 IBC: If login has not completed, IBC will exit in 40 seconds
LogModuleConfigurator-Init: Log4j Ver2.x found on classpath
LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x
2023-03-03 17:44:13:925 IBC: Detected frame entitled: Starting application...; event=Lost focus
2023-03-03 17:44:13:926 IBC: Detected frame entitled: Starting application...; event=Focused
2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Lost focus
2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Deactivated
2023-03-03 17:44:13:927 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:44:13:928 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:44:13:928 IBC: Detected frame entitled: Starting application...; event=Closed
2023-03-03 17:44:13:928 IBC: Login has completed
2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:48:52:617 IBC: CommandServer: ControlFrom setting =
2023-03-03 17:48:52:618 IBC: CommandServer accepted connection from: /127.0.0.1
2023-03-03 17:48:52:784 IBC: CommandServer received command: RESTART
2023-03-03 17:48:52:785 IBC: Getting main window
2023-03-03 17:48:52:785 IBC: Main window already found
2023-03-03 17:48:52:788 IBC: Setting auto-restart time to 05:49 PM
2023-03-03 17:48:52:789 IBC: Closing command channel
2023-03-03 17:48:52:789 IBC: Getting config dialog
2023-03-03 17:48:52:789 IBC: Creating config dialog future
2023-03-03 17:48:52:789 IBC: Getting main window
2023-03-03 17:48:52:789 IBC: Main window already found
2023-03-03 17:48:52:789 IBC: Getting main window
2023-03-03 17:48:52:789 IBC: Main window already found
2023-03-03 17:48:52:789 IBC: Invoking config dialog menu
2023-03-03 17:48:53:054 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Activated
2023-03-03 17:48:53:056 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Focused
2023-03-03 17:48:53:057 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Opened
2023-03-03 17:48:53:057 IBC: Got config dialog from future
2023-03-03 17:48:53:062 IBC: Setting Auto restart time
2023-03-03 17:48:53:086 IBC: Auto restart time changed from 05:40 PM to 05:49 PM
2023-03-03 17:48:53:095 IBC: Click button: OK
2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Closed
2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Lost focus
2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Deactivated
2023-03-03 17:48:53:172 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-03-03 17:48:53:173 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-03-03 17:49:00:205 IBC: Detected dialog entitled: Restart in progress; event=Activated
2023-03-03 17:49:00:206 IBC: Detected dialog entitled: Restart in progress; event=Focused
2023-03-03 17:49:00:207 IBC: Detected dialog entitled: Restart in progress; event=Opened
2023-03-03 17:49:00,523 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:00,524 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2023-03-03 17:49:01,622 pool-3-thread-1 ERROR Attempted to append to non-started appender f
Program has exited
Error level is 0
Check for 2FA dialog timed out
Check for login dialog display timeout
Check for restart
call :GetAutoRestartOption
Finding autorestart file
autorestart file found at C:\Jts\amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj\autorestart
AUTORESTART_OPTION is -Drestart=amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj
IBC will autorestart shortly


Re: IBC version 3.15.0

 

开云体育

That installer is for Gateway 10.21 , but you’ve set :

?

TWS_MAJOR_VRSN=1019

?

Also you’ve got:

?

TWS_PATH=/home/ec2-user/jts/ibgateway

?

This is incorrect: there should be no mention of ibgateway in this setting. The folder that Gateway is installed in is jts, not jts/ibgateway.

?

Actually you can install in any folder, though I don’t encourage this. To do this, when you run the installer you can change the part of the path before jts/ibgateway/1021 to any folder you like. So for example you can tell the installer to install to:

?

/mnt/efs/jts/ibgateway/1021

?

But the TWS_PATH variable must be set to:

?

TWS_PATH=/mnt/efs/jts

?

?

?

From: [email protected] <[email protected]> On Behalf Of gong@...
Sent: 20 February 2023 12:27
To: [email protected]
Subject: Re: [ibc] IBC version 3.15.0

?

i tried installing to the standard location as a test (really dont want it here). and it does not work either.

i know the error msg says it is an offline version but thats not true:? i downloaded it from?


Re: IBC version 3.15.0

 

i tried installing to the standard location as a test (really dont want it here). and it does not work either.

i know the error msg says it is an offline version but thats not true:? i downloaded it from?

https://download2.interactivebrokers.com/installers/ibgateway/stable-standalone/ibgateway-stable-standalone-linux-x64.sh


Re: IBC version 3.15.0

 

1. i prefer not to have Jts in the root, and i cannot put it in home as there is limited size in the drive associated with home rather than the one mounted. is there absolutely no way to have it in /mnt/efs/ibgateway/ something?
2. yes i understand tWS and ibgateway is the same under the hood, however, ibgateway is smaller to run and takes up less system resources when it is running.?


Re: IBC version 3.15.0

 

开云体育

Oops, sorry, I told you the wrong thing. It should be:

?

TWS_PATH=/mnt/efs/Jts/

?

But it also looks like you’ve installed Gateway into a non-standard location. These ‘missing’ files should be in

?

/mnt/efs/Jts/ibgateway/1021

?

This is where they will be if you install Gateway to the default location offered by the installer. The scripts depend on Gateway being installed to that default. There is no good reason to put it anywhere else.

?

So I suggest you uninstall Gateway and reinstall to the default.

?

By the way, you don’t need to install both TWS and Gateway: both installers put the same files on the system, apart from the desktop link (which IBC doesn’t use).? They install to different locations, but the IBC scripts know about this and will find whichever one is there. The User Guide does actually tell you this.


Re: IBC version 3.15.0

 

sorry heres the attachment. the error logs has the same missing options file.. although it is now in there as you can see:

[ec2-user@ip-172-31-35-164 chartsbacktest_D_20230202_zip]$ cd /mnt/efs/ibgateway/Jts/1021
[ec2-user@ip-172-31-35-164 1021]$ ls -l
total 48
drwxr-xr-x 2 ec2-user ec2-user? 6144 Feb 20 03:48 data
-rwxr-xr-x 1 ec2-user ec2-user 15008 Feb 15 04:25 ibgateway
lrwxrwxrwx 1 ec2-user ec2-user? ? 45 Feb 20 03:48 IB Gateway 10.21.desktop -> .install4j/install4j_je7c71-ibgateway.desktop
-rw-r--r-- 1 ec2-user ec2-user? ?895 Feb 20 03:51 ibgateway.vmoptions
drwxr-xr-x 2 ec2-user ec2-user? 6144 Feb 20 03:51 jars
-rwx------ 1 ec2-user ec2-user 14321 Feb 15 04:25 uninstall