waytrade / ib-gateway-docker

Docker image with IB Gateway and IBC
MIT License
57 stars 33 forks source link

Unable to connect to IB gateway #4

Closed marvin-garcia closed 2 years ago

marvin-garcia commented 2 years ago

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

Starting IBC version on 2021-12-10 at 01:26:45

Operating system: Linux ibgw 5.4.0-1062-azure #65~18.04.1-Ubuntu SMP Tue Oct 12 11:26:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Arguments:

TWS version = 1010 Entry point = ibcalpha.ibc.IbcGateway --tws-path = /root/Jts --tws-settings-path = --ibc-path = /root/ibc --ibc-ini = /root/ibc/config.ini --mode = live --java-path = --user = --pw = --fix-user = --fix-pw =

================================= Generating the classpath Classpath=/root/Jts/ibgateway/1010/jars/jts4launch-1010.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-linux64-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-swing-7.17.jar:/root/Jts/ibgateway/1010/jars/locales.jar:/root/Jts/ibgateway/1010/jars/log4j-api-2.12.0.jar:/root/Jts/ibgateway/1010/jars/log4j-core-2.12.0.jar:/root/Jts/ibgateway/1010/jars/total-2020.jar:/root/Jts/ibgateway/1010/jars/twslaunch-1010.jar:/root/Jts/ibgateway/1010/jars/twslaunch-install4j-1.10.jar:/root/ibc/IBC.jar

Generating the JAVA VM options Java VM Options=-Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70

Determining the location of java executable Location of java executable=/usr/local/i4j_jres/1.8.0_152-tzdata2019c/bin

Starting Gateway with this command: "/usr/local/i4j_jres/1.8.0_152-tzdata2019c/bin/java" -cp "/root/Jts/ibgateway/1010/jars/jts4launch-1010.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-linux64-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-swing-7.17.jar:/root/Jts/ibgateway/1010/jars/locales.jar:/root/Jts/ibgateway/1010/jars/log4j-api-2.12.0.jar:/root/Jts/ibgateway/1010/jars/log4j-core-2.12.0.jar:/root/Jts/ibgateway/1010/jars/total-2020.jar:/root/Jts/ibgateway/1010/jars/twslaunch-1010.jar:/root/Jts/ibgateway/1010/jars/twslaunch-install4j-1.10.jar:/root/ibc/IBC.jar" -Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 ibcalpha.ibc.IbcGateway "/root/ibc/config.ini" live

PORT=5900 IBC Settings: AcceptBidAskLastSizeDisplayUpdateNotification=accept AcceptIncomingConnectionAction=reject AcceptNonBrokerageAccountWarning=yes AllowBlindTrading=no BindAddress= ClosedownAt= CommandPrompt= ControlFrom= DismissNSEComplianceNotice=yes DismissPasswordExpiryWarning=no ExistingSessionDetectedAction=primary ExitAfterSecondFactorAuthenticationTimeout=no FIX=no FIXLoginId= FIXPassword= IbAutoClosedown=yes IbDir=/root/Jts IbLoginId= IbPassword= LogStructureScope=known LogStructureWhen=never LoginDialogDisplayTimeout=60 MinimizeMainWindow=no OverrideTwsApiPort=4000 ReadOnlyApi= ReadOnlyLogin=no SaveTwsSettingsAt= SecondFactorAuthenticationExitInterval= SendMarketDataInLotsForUSstocks=no StoreSettingsOnServer= SuppressInfoMessages=yes TradingMode= End IBC Settings

2021-12-10 01:26:45:530 IBC: Version: 3.10.0 System Properties

java.runtime.name = Java(TM) SE Runtime Environment sun.boot.library.path = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/amd64 java.vm.version = 25.152-b16 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 sun.java.launcher = SUN_STANDARD sun.os.patch.level = unknown java.vm.specification.name = Java Virtual Machine Specification user.dir = /root/Jts java.runtime.version = 1.8.0_152-b16 java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment java.endorsed.dirs = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/endorsed os.arch = amd64 java.io.tmpdir = /tmp line.separator =

java.vm.specification.vendor = Oracle Corporation os.name = Linux sun.jnu.encoding = ANSI_X3.4-1968 java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib java.specification.name = Java Platform API Specification java.class.version = 52.0 sun.management.compiler = HotSpot 64-Bit Tiered Compilers os.version = 5.4.0-1062-azure user.home = /root user.timezone = GMT java.awt.printerjob = sun.print.PSPrinterJob file.encoding = ANSI_X3.4-1968 java.specification.version = 1.8 java.class.path = /root/Jts/ibgateway/1010/jars/jts4launch-1010.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-linux64-7.17.jar:/root/Jts/ibgateway/1010/jars/jxbrowser-swing-7.17.jar:/root/Jts/ibgateway/1010/jars/locales.jar:/root/Jts/ibgateway/1010/jars/log4j-api-2.12.0.jar:/root/Jts/ibgateway/1010/jars/log4j-core-2.12.0.jar:/root/Jts/ibgateway/1010/jars/total-2020.jar:/root/Jts/ibgateway/1010/jars/twslaunch-1010.jar:/root/Jts/ibgateway/1010/jars/twslaunch-install4j-1.10.jar:/root/ibc/IBC.jar user.name = root java.vm.specification.version = 1.8 sun.java.command = ibcalpha.ibc.IbcGateway /root/ibc/config.ini live java.home = /usr/local/i4j_jres/1.8.0_152-tzdata2019c sun.arch.data.model = 64 user.language = en java.specification.vendor = Oracle Corporation awt.toolkit = sun.awt.X11.XToolkit java.vm.info = mixed mode java.version = 1.8.0_152 java.ext.dirs = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/ext:/usr/java/packages/lib/ext sun.boot.class.path = /usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/resources.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/rt.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/sunrsasign.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/jsse.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/jce.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/charsets.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/lib/jfr.jar:/usr/local/i4j_jres/1.8.0_152-tzdata2019c/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.cpu.isalist =

2021-12-10 01:26:45:540 IBC: Using default settings provider: ini file is /root/ibc/config.ini 2021-12-10 01:26:45:541 IBC: Using default login manager: getting username and password from args 2021-12-10 01:26:45:541 IBC: Using default main window manager: constructor parameter isGateway=true 2021-12-10 01:26:45:541 IBC: Using default trading mode manager: constructor parameter args: tradingMode=live 2021-12-10 01:26:45:543 IBC: Using default config dialog manager 2021-12-10 01:26:45:558 IBC: CommandServer is not started because the port is not configured 2021-12-10 01:26:45:681 IBC: TWS Settings directory is: /root/Jts 2021-12-10 01:26:45:690 IBC: Ensuring /root/Jts/jts.ini contains required minimal lines 2021-12-10 01:26:45:690 IBC: Found setting: [Logon]/s3store=true 2021-12-10 01:26:45:690 IBC: Found setting: [Logon]/Locale=en 2021-12-10 01:26:45:691 IBC: Found setting: [Logon]/displayedproxymsg=1 2021-12-10 01:26:45:691 IBC: Found setting: [Logon]/UseSSL=true 2021-12-10 01:26:45:691 IBC: Found setting: [IBGateway]/ApiOnly=true 2021-12-10 01:26:45:691 IBC: Confirmed /root/Jts/jts.ini contains required minimal lines 2021-12-10 01:26:45:691 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds 2021-12-10 01:26:47:710 IBC: Getting config dialog 2021-12-10 01:26:47:711 IBC: Creating config dialog future 2021-12-10 01:26:47:719 IBC: Getting main window 2021-12-10 01:26:47:724 IBC: Creating main window future 2021-12-10 01:26:47:725 IBC: Getting config dialog 2021-12-10 01:26:47:725 IBC: Waiting for config dialog future to complete 2021-12-10 01:26:49:300 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Opened 2021-12-10 01:26:49:428 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Activated 2021-12-10 01:26:49:432 IBC: Setting Trading mode = live 2021-12-10 01:26:49:547 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Focused 2021-12-10 01:26:49:603 IBC: Click button: Log In 2021-12-10 01:26:52:106 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Lost focus 2021-12-10 01:26:52:107 IBC: Detected frame entitled: Interactive Brokers Gateway; event=Deactivated 2021-12-10 01:26:52:116 IBC: Detected frame entitled: Loading...; event=Activated 2021-12-10 01:26:52:127 IBC: Detected frame entitled: Loading...; event=Focused 2021-12-10 01:26:52:132 IBC: Detected frame entitled: Loading...; event=Opened 2021-12-10 01:26:52:132 IBC: Found Gateway main window 2021-12-10 01:26:52:136 IBC: Got main window from future 2021-12-10 01:26:52:484 IBC: Detected frame entitled: Loading...; event=Lost focus 2021-12-10 01:26:52:485 IBC: Detected frame entitled: Loading...; event=Deactivated 2021-12-10 01:26:52:485 IBC: Detected frame entitled: Authenticating...; event=Activated 2021-12-10 01:26:52:495 IBC: Detected frame entitled: Authenticating...; event=Focused 2021-12-10 01:26:52:496 IBC: Detected frame entitled: Authenticating...; event=Opened 2021-12-10 01:26:53:059 IBC: Detected dialog entitled: no title ; event=Opened 2021-12-10 01:26:53:072 IBC: Detected frame entitled: Requesting startup parameters...; event=Lost focus 2021-12-10 01:26:53:073 IBC: Detected frame entitled: Requesting startup parameters...; event=Deactivated 2021-12-10 01:26:53:074 IBC: Detected dialog entitled: no title ; event=Activated 2021-12-10 01:26:53:075 IBC: Detected dialog entitled: no title ; event=Focused

Forking :::4000 onto 0.0.0.0:4001


- Python commands:

from ib-insync import * ib = IB() ib.connect('", 4001)


- Pod logs:

2021/12/10 01:28:35 socat[165] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused

marvin-garcia commented 2 years ago

Issue went away using IBC 3.12.0-beta.2

mfrener commented 2 years ago

Also did the update alreaedy on my contaienr, just waiting for non-bet of IBC to update this repo.

goodboy commented 2 years ago

I dunno why y'all close this issue, but it ain't solved like at all.

Further why is there no work around recipe for how to do what @marvin-garcia did?