Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IbAutoClosedown=no doesn't work properly with TWS 972 on macos #52

Closed
lorenzo522 opened this issue Jun 1, 2019 · 3 comments
Closed

Comments

@lorenzo522
Copy link

lorenzo522 commented Jun 1, 2019

Hi
first of all thank you for your great work and sorry for my poor english.

I have an issue running ibc with multiple TWS. They are all offline version and with version number 972.
For every instance I created a config file and twsstartUSERNAME.sh for every user. I then created a script that lunchs every file named twsstart* from a directory, and everything works fine.
This is an example of config.ini

IbLoginId=USER
IbPassword=PASSWORD
FIXLoginId=
FIXPassword=
TradingMode=live
IbDir=
StoreSettingsOnServer=yes
MinimizeMainWindow=no
ExistingSessionDetectedAction=manual
AcceptIncomingConnectionAction=accept
ShowAllTrades=no
OverrideTwsApiPort=
ReadOnlyLogin=no
AcceptNonBrokerageAccountWarning=yes
IbAutoClosedown=no

The first time IBC is able to change the logoff timer (as you can see below) but, strangely, the second time, it gets an error and it doesn't work.
am I doing something wrong or there is an error in the program?

thank you

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

Starting IBC version 3.7.5 on 2019-05-30 at 09:43:35

Operating system: Darwin Giacomos-MacBook-Pro.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

Arguments:

TWS version = 972
Entry point = ibcalpha.ibc.IbcTws
--tws-path = /Users/giacomo/Applications
--tws-settings-path = /Users/giacomo/Jts
--ibc-path = /opt/ibc
--ibc-ini = /Users/giacomo/ibc/USER037/config.ini
--mode = 
--java-path = 
--user = ***
--pw = ***

=================================
Generating the classpath
Classpath=/Users/giacomo/Applications/Trader Workstation 972/jars/jts4launch-972.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/locales.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/log4j-api-2.5.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/log4j-core-2.5.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/total-2018.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/twslaunch-972.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/twslaunch-install4j-1.8.jar:/opt/ibc/IBC.jar

Generating the JAVA VM options
Java VM Options=-Xmx768m

Determining the location of java executable
Location of java executable=/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/bin

Starting TWS with this command:
"/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/bin/java" -cp "/Users/giacomo/Applications/Trader Workstation 972/jars/jts4launch-972.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/locales.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/log4j-api-2.5.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/log4j-core-2.5.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/total-2018.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/twslaunch-972.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/twslaunch-install4j-1.8.jar:/opt/ibc/IBC.jar" -Xmx768m ibcalpha.ibc.IbcTws "/Users/giacomo/ibc/USER037/config.ini" *** *** 

System Properties
------------------------------------------------------------
java.runtime.name = Java(TM) SE Runtime Environment
sun.boot.library.path = /Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib
java.vm.version = 25.152-b16
gopherProxySet = false
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 = IT
sun.java.launcher = SUN_STANDARD
sun.os.patch.level = unknown
java.vm.specification.name = Java Virtual Machine Specification
user.dir = /Users/giacomo/Applications
java.runtime.version = 1.8.0_152-b16
java.awt.graphicsenv = sun.awt.CGraphicsEnvironment
java.endorsed.dirs = /Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/endorsed
os.arch = x86_64
java.io.tmpdir = /var/folders/2x/208kv3kd2sxd67dn1pwgjtzr0000gn/T/
line.separator = 

java.vm.specification.vendor = Oracle Corporation
os.name = Mac OS X
sun.jnu.encoding = UTF-8
java.library.path = /Users/giacomo/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
java.specification.name = Java Platform API Specification
java.class.version = 52.0
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
os.version = 10.14.5
http.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
user.home = /Users/giacomo
user.timezone = Europe/Rome
java.awt.printerjob = sun.lwawt.macosx.CPrinterJob
file.encoding = UTF-8
java.specification.version = 1.8
java.class.path = /Users/giacomo/Applications/Trader Workstation 972/jars/jts4launch-972.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/locales.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/log4j-api-2.5.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/log4j-core-2.5.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/total-2018.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/twslaunch-972.jar:/Users/giacomo/Applications/Trader Workstation 972/jars/twslaunch-install4j-1.8.jar:/opt/ibc/IBC.jar
user.name = giacomo
java.vm.specification.version = 1.8
sun.java.command = ibcalpha.ibc.IbcTws /Users/giacomo/ibc/USER037/config.ini USER037 c140317
java.home = /Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre
sun.arch.data.model = 64
user.language = en
java.specification.vendor = Oracle Corporation
awt.toolkit = sun.lwawt.macosx.LWCToolkit
java.vm.info = mixed mode
java.version = 1.8.0_152
java.ext.dirs = /Users/giacomo/Library/Java/Extensions:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
sun.boot.class.path = /Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/resources.jar:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/rt.jar:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/sunrsasign.jar:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/jsse.jar:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/jce.jar:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/charsets.jar:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/lib/jfr.jar:/Users/giacomo/Applications/Trader Workstation 972/.install4j/jre.bundle/Contents/Home/jre/classes
java.vendor = Oracle Corporation
file.separator = /
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
sun.io.unicode.encoding = UnicodeBig
sun.cpu.endian = little
socksNonProxyHosts = local|*.local|169.254/16|*.169.254/16
ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
sun.cpu.isalist = 
------------------------------------------------------------
2019-05-30 09:43:35:470 IBC: Using default settings provider: ini file is /Users/giacomo/ibc/USER037/config.ini
2019-05-30 09:43:35:471 IBC: Using default login manager: getting username and password from args
2019-05-30 09:43:35:471 IBC: Using default main window manager: constructor parameter isGateway=false
2019-05-30 09:43:35:471 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings
2019-05-30 09:43:35:472 IBC: Using default config dialog manager
2019-05-30 09:43:35:475 IBC: CommandServer is not started because the port is not configured
2019-05-30 09:43:35:813 IBC: TWS Settings directory is: /Users/giacomo/Applications
2019-05-30 09:43:35:815 IBC: Ensuring /Users/giacomo/Applications/jts.ini contains required minimal lines
2019-05-30 09:43:35:815 IBC: Found section: [Logon]
2019-05-30 09:43:35:815 IBC: Can't find setting: s3store=false
2019-05-30 09:43:35:816 IBC: Found section: [Logon]
2019-05-30 09:43:35:816 IBC: Found setting: s3store=true
2019-05-30 09:43:35:816 IBC: Found section: [IBGateway]
2019-05-30 09:43:35:816 IBC: Found setting: ApiOnly=true
2019-05-30 09:43:35:816 IBC: Confirmed /Users/giacomo/Applications/jts.ini contains required minimal lines
2019-05-30 09:43:40:190 IBC: Detected frame entitled: Login; event=Activated
2019-05-30 09:43:40:214 IBC: Detected frame entitled: Login; event=Opened
2019-05-30 09:43:40:214 IBC: Trading mode from settings: tradingMode=live
2019-05-30 09:43:40:215 IBC: Setting Trading mode = live
2019-05-30 09:43:40:366 IBC: Click button: Login
2019-05-30 09:43:40:629 IBC: Button now disabled: Login
2019-05-30 09:43:41:328 IBC: Detected frame entitled: Authenticating...; event=Opened
2019-05-30 09:43:41:330 IBC: Detected frame entitled: Authenticating...; event=Activated
2019-05-30 09:43:43:803 IBC: Detected dialog entitled: Downloading settings from server; event=Closed
Jolt logger configuration is done.
LogModuleConfigurator-Init: Log4j Ver2.x found on classpath
LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x
2019-05-30 09:44:04:707 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Opened
2019-05-30 09:44:04:708 IBC: Found TWS main window
2019-05-30 09:44:05:059 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-30 09:44:05:064 IBC: Detected frame entitled: Starting application...; event=Closed
2019-05-30 11:30:17:191 IBC: Detected window: type=javax.swing.JWindow; event=Opened
2019-05-30 11:30:26:739 IBC: Detected window: type=javax.swing.JWindow; event=Closed
2019-05-30 11:30:26:757 IBC: Detected window: type=javax.swing.SwingUtilities$SharedOwnerFrame; event=Closed
2019-05-31 04:29:01:074 IBC: Detected frame entitled: UXXXXXX Exit Session Setting; event=Opened
2019-05-31 04:29:01:078 IBC: Click button: Update
2019-05-31 04:29:01:156 IBC: Click button: Close
2019-05-31 04:29:01:235 IBC: AutoLogoff time changed to 04:24AM
2019-05-31 07:04:47:420 IBC: Detected frame entitled: Connecting to server...; event=Opened
2019-05-31 07:11:22:100 IBC: Detected frame entitled: Starting application...; event=Closed
2019-05-31 11:26:31:989 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-31 12:39:40:567 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-31 12:47:38:984 IBC: Detected window: type=javax.swing.JWindow; event=Opened
2019-05-31 12:47:49:570 IBC: Detected window: type=javax.swing.JWindow; event=Closed
2019-05-31 12:47:49:603 IBC: Detected window: type=javax.swing.SwingUtilities$SharedOwnerFrame; event=Closed
2019-05-31 13:31:42:984 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-31 13:31:43:904 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-31 13:35:25:058 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-31 13:36:35:948 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-31 17:02:42:137 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-05-31 17:03:02:353 IBC: Detected frame entitled: UXXXXXX IB Trader Workstation; event=Activated
2019-06-01 04:24:34:815 IBC: Detected dialog entitled: Shutdown progress; event=Opened
2019-06-01 04:24:34:984 IBC: Detected frame entitled: UXXXXXX Exit Session Setting; event=Closed
2019-06-01 04:24:35:795 IBC: Detected dialog entitled: Uploading settings to server; event=Closed
2019-06-01 04:24:41:196 IBC: Detected dialog entitled: Uploading settings to server; event=Closed
2019-06-01 04:25:00:578 IBC: Detected dialog entitled: Uploading settings to server; event=Closed
2019-06-01 04:25:00,585 JTS-IA Stopper-16368 ERROR Attempted to append to non-started appender d
2019-06-01 04:25:00,586 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2019-06-01 04:25:00,591 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2019-06-01 04:25:00,709 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d
2019-06-01 04:25:01:356 IBC: Detected frame entitled: Loading...; event=Closed
TWS finished
@rlktradewright
Copy link
Member

This appears to be exactly the same thing as Issue #38. Although that refers to TWS 974, maybe TWS 972 now behaves the same way, at least on macOS.

By the way, the errors messages ERROR Attempted to append to non-started appender d are nothing to do with this: they are output by TWS when it's closing down.

@rlktradewright
Copy link
Member

Assuming it's the same thing as in #38, and it certainly looks and sounds the same, then as I said there IBC can do nothing about it.

So either you have to restart IBC every day, or you have to give up using IBC and use the auto relogon mechanism introduced in TWS 974 (on Windows, don't know about macOS because I don't have access to one). This is described on the very first page of the User Guide.

@lorenzo522
Copy link
Author

ok, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants