UnusualAlpha / ib-gateway-docker

Docker image with IB Gateway and IBC
MIT License
226 stars 92 forks source link

Unable to connect? #45

Closed kshv190 closed 1 year ago

kshv190 commented 1 year ago

ibtrading-ib-gateway-1 | 2022/12/06 06:47:13 socat[119] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused

kshv190 commented 1 year ago
Screenshot 2022-12-06 at 1 21 59 PM
efernandesng commented 1 year ago

Hi @kshv190, which version (tag) are you using?

kshv190 commented 1 year ago

I am using

image: ghcr.io/unusualalpha/ib-gateway:stable

efernandesng commented 1 year ago

I didn't find any connection issues. You are behind some firewall? You can try to run the TWS or ib-gateway on the same machine to check if you have the same issues.

My logs:

ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:10:772 IBC: Getting main window
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:10:773 IBC: Creating main window future
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:11:856 IBC: Detected frame entitled: IB Gateway; event=Activated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:11:861 IBC: Detected frame entitled: IB Gateway; event=Focused
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:11:862 IBC: Detected frame entitled: IB Gateway; event=Opened
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:11:863 IBC: Setting Trading mode = paper
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:11:961 IBC: Login attempt: 1
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:11:995 IBC: Click button: Paper Log In
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:14:760 IBC: Detected frame entitled: IB Gateway; event=Lost focus
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:14:760 IBC: Detected frame entitled: IB Gateway; event=Deactivated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:14:761 IBC: Detected frame entitled: Loading...; event=Activated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:14:768 IBC: Detected frame entitled: Loading...; event=Focused
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:14:768 IBC: Detected frame entitled: Loading...; event=Opened
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:14:769 IBC: Found Gateway main window
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:14:769 IBC: Got main window from future
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:15:316 IBC: Detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Opened
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:15:472 IBC: Detected frame entitled: Loading...; event=Lost focus
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:15:472 IBC: Detected frame entitled: Loading...; event=Deactivated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:15:472 IBC: Detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Activated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:15:473 IBC: Detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Focused
ib-gateway-docker-ib-gateway-1  | LogModuleConfigurator-Init: Log4j Ver2.x found on classpath
ib-gateway-docker-ib-gateway-1  | LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:24:870 IBC: Detected frame entitled: Starting application...; event=Lost focus
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:24:896 IBC: Detected frame entitled: Starting application...; event=Closed
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:24:897 IBC: Login has completed
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:24:897 IBC: Detected dialog entitled: Warning; event=Opened
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:24:897 IBC: Invoking config dialog menu
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:24:899 IBC: Click button: I understand and accept
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:010 IBC: Detected frame entitled: Starting application...; event=Deactivated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:011 IBC: Detected dialog entitled: Warning; event=Activated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:011 IBC: Detected dialog entitled: Warning; event=Focused
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:357 IBC: Detected dialog entitled: Warning; event=Lost focus
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:358 IBC: Detected dialog entitled: Warning; event=Deactivated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:358 IBC: Detected dialog entitled: Warning; event=Closed
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:385 IBC: Detected dialog entitled: DUxxxxxxxx Trader Workstation Configuration (Simulated Trading); event=Opened
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:386 IBC: Detected dialog entitled: DUxxxxxxxx Trader Workstation Configuration (Simulated Trading); event=Activated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:386 IBC: Got config dialog from future
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:429 IBC: Detected dialog entitled: DUxxxxxxxx Trader Workstation Configuration (Simulated Trading); event=Focused
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:453 IBC: Performing port configuration
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:591 IBC: TWS API socket port was set to 4002
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:591 IBC: TWS API socket port now set to 4000
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:592 IBC: Click button: OK
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:685 IBC: Detected dialog entitled: DUxxxxxxxx Trader Workstation Configuration (Simulated Trading); event=Lost focus
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:689 IBC: Detected dialog entitled: DUxxxxxxxx Trader Workstation Configuration (Simulated Trading); event=Deactivated
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:25:690 IBC: Detected dialog entitled: DUxxxxxxxx Trader Workstation Configuration (Simulated Trading); event=Closed
ib-gateway-docker-ib-gateway-1  | 2022-12-06 18:43:26:836 IBC: Detected dialog entitled: Pending Tasks; event=Closed
ib-gateway-docker-ib-gateway-1  | Forking :::4000 onto 0.0.0.0:4002
efernandesng commented 1 year ago

Closing due to inactivity. Please feel free to reopen if you need to.

Voyz commented 9 months ago

I can see this same issue happening.

Image: ghcr.io/unusualalpha/ib-gateway:stable (10.19.1j)

Click me for full output log ```raw 2023-12-22T16:37:51.401666266Z ================================================================================ 2023-12-22T16:37:51.401677666Z 2023-12-22T16:37:51.405530781Z Starting IBC version on 2023-12-22 at 16:37:51 2023-12-22T16:37:51.405561181Z 2023-12-22T16:37:51.407900390Z Operating system: Linux 611d3f379a0d 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux 2023-12-22T16:37:51.407932890Z 2023-12-22T16:37:51.407939990Z Arguments: 2023-12-22T16:37:51.407944790Z 2023-12-22T16:37:51.407949290Z TWS version = 10.19.1j 2023-12-22T16:37:51.407953890Z Program = 2023-12-22T16:37:51.407958390Z Entry point = ibcalpha.ibc.IbcGateway 2023-12-22T16:37:51.408032891Z --tws-path = /root/Jts 2023-12-22T16:37:51.408049491Z --tws-settings-path = 2023-12-22T16:37:51.408054891Z --ibc-path = /root/ibc 2023-12-22T16:37:51.408059291Z --ibc-ini = /root/ibc/config.ini 2023-12-22T16:37:51.408193391Z --mode = paper 2023-12-22T16:37:51.408206891Z --java-path = 2023-12-22T16:37:51.408217491Z --user = *** 2023-12-22T16:37:51.408237991Z --pw = *** 2023-12-22T16:37:51.408308692Z --fix-user = 2023-12-22T16:37:51.408323892Z --fix-pw = 2023-12-22T16:37:51.408332992Z 2023-12-22T16:37:51.409231895Z ================================= 2023-12-22T16:37:51.409255495Z Generating the classpath 2023-12-22T16:37:51.409791197Z Classpath=/root/Jts/ibgateway/10.19.1j/jars/jackson-core-2.12.3.jar:/root/Jts/ibgateway/10.19.1j/jars/jts4launch-1019.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-linux64-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-swing-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/locales.jar:/root/Jts/ibgateway/10.19.1j/jars/log4j-api-2.17.1.jar:/root/Jts/ibgateway/10.19.1j/jars/log4j-core-2.17.1.jar:/root/Jts/ibgateway/10.19.1j/jars/total-2020.jar:/root/Jts/ibgateway/10.19.1j/jars/twslaunch-1019.jar:/root/Jts/ibgateway/10.19.1j/jars/twslaunch-install4j-1.12.jar:/root/Jts/ibgateway/10.19.1j/.install4j/i4jruntime.jar:/root/ibc/IBC.jar 2023-12-22T16:37:51.409813297Z 2023-12-22T16:37:51.409818397Z Generating the JAVA VM options 2023-12-22T16:37:51.418214130Z Java VM Options=-Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -Dexe4j.isInstall4j=true -Dinstall4jType=standalone -DjtsConfigDir=/root/Jts 2023-12-22T16:37:51.418253030Z 2023-12-22T16:37:51.418261030Z Determining the location of java executable 2023-12-22T16:37:51.420087437Z Location of java executable=/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/bin 2023-12-22T16:37:51.420119537Z 2023-12-22T16:37:51.420126337Z Renaming IB's TWS or Gateway start script to prevent restart without IBC 2023-12-22T16:37:51.420358338Z 2023-12-22T16:37:51.420588239Z Starting Gateway with this command: 2023-12-22T16:37:51.420609039Z "/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/bin/java" -cp "/root/Jts/ibgateway/10.19.1j/jars/jackson-core-2.12.3.jar:/root/Jts/ibgateway/10.19.1j/jars/jts4launch-1019.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-linux64-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-swing-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/locales.jar:/root/Jts/ibgateway/10.19.1j/jars/log4j-api-2.17.1.jar:/root/Jts/ibgateway/10.19.1j/jars/log4j-core-2.17.1.jar:/root/Jts/ibgateway/10.19.1j/jars/total-2020.jar:/root/Jts/ibgateway/10.19.1j/jars/twslaunch-1019.jar:/root/Jts/ibgateway/10.19.1j/jars/twslaunch-install4j-1.12.jar:/root/Jts/ibgateway/10.19.1j/.install4j/i4jruntime.jar:/root/ibc/IBC.jar" -Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -Dtwslaunch.autoupdate.serviceImpl=com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService -Dchannel=latest -Dexe4j.isInstall4j=true -Dinstall4jType=standalone -DjtsConfigDir=/root/Jts ibcalpha.ibc.IbcGateway "/root/ibc/config.ini" *** *** paper 2023-12-22T16:37:51.420618739Z 2023-12-22T16:37:51.644251002Z IBC Settings: 2023-12-22T16:37:51.645112005Z AcceptBidAskLastSizeDisplayUpdateNotification=accept 2023-12-22T16:37:51.645153505Z AcceptIncomingConnectionAction=reject 2023-12-22T16:37:51.645161205Z AcceptNonBrokerageAccountWarning=yes 2023-12-22T16:37:51.645170305Z AllowBlindTrading=no 2023-12-22T16:37:51.645177105Z BindAddress= 2023-12-22T16:37:51.645281405Z ClosedownAt= 2023-12-22T16:37:51.645295606Z CommandPrompt= 2023-12-22T16:37:51.645341106Z ControlFrom= 2023-12-22T16:37:51.645569707Z DismissNSEComplianceNotice=yes 2023-12-22T16:37:51.645589907Z DismissPasswordExpiryWarning=no 2023-12-22T16:37:51.645598807Z ExistingSessionDetectedAction=primary 2023-12-22T16:37:51.645755107Z ExitAfterSecondFactorAuthenticationTimeout=no 2023-12-22T16:37:51.645792607Z FIX=no 2023-12-22T16:37:51.645851208Z FIXLoginId=*** 2023-12-22T16:37:51.645987908Z FIXPassword=*** 2023-12-22T16:37:51.646010208Z IbAutoClosedown=yes 2023-12-22T16:37:51.646112009Z IbDir=/root/Jts 2023-12-22T16:37:51.646224209Z IbLoginId=*** 2023-12-22T16:37:51.646235009Z IbPassword=*** 2023-12-22T16:37:51.646298709Z LogStructureScope=known 2023-12-22T16:37:51.646482810Z LogStructureWhen=never 2023-12-22T16:37:51.646492210Z LoginDialogDisplayTimeout=60 2023-12-22T16:37:51.646495610Z MinimizeMainWindow=no 2023-12-22T16:37:51.646498610Z OverrideTwsApiPort=4000 2023-12-22T16:37:51.646501610Z ReadOnlyApi= 2023-12-22T16:37:51.646615311Z ReadOnlyLogin=no 2023-12-22T16:37:51.646629711Z SaveTwsSettingsAt= 2023-12-22T16:37:51.646715011Z SecondFactorAuthenticationExitInterval= 2023-12-22T16:37:51.646826211Z SecondFactorDevice= 2023-12-22T16:37:51.647004712Z SendMarketDataInLotsForUSstocks= 2023-12-22T16:37:51.647017612Z StoreSettingsOnServer= 2023-12-22T16:37:51.647024412Z SuppressInfoMessages=yes 2023-12-22T16:37:51.647033212Z TradingMode= 2023-12-22T16:37:51.647212313Z End IBC Settings 2023-12-22T16:37:51.647227113Z 2023-12-22T16:37:51.664292679Z 2023-12-22 16:37:51:662 IBC: Version: 3.15.2 2023-12-22T16:37:51.664325379Z System Properties 2023-12-22T16:37:51.664346379Z ------------------------------------------------------------ 2023-12-22T16:37:51.664654280Z jtsConfigDir = /root/Jts 2023-12-22T16:37:51.664679280Z java.runtime.name = Java(TM) SE Runtime Environment 2023-12-22T16:37:51.664716580Z sun.boot.library.path = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/amd64 2023-12-22T16:37:51.664732681Z java.vm.version = 25.202-b08 2023-12-22T16:37:51.664912681Z java.vm.vendor = Oracle Corporation 2023-12-22T16:37:51.664943881Z java.vendor.url = http://java.oracle.com/ 2023-12-22T16:37:51.664950181Z path.separator = : 2023-12-22T16:37:51.665029382Z java.vm.name = Java HotSpot(TM) 64-Bit Server VM 2023-12-22T16:37:51.665045482Z file.encoding.pkg = sun.io 2023-12-22T16:37:51.665056082Z user.country = US 2023-12-22T16:37:51.665067082Z sun.java.launcher = SUN_STANDARD 2023-12-22T16:37:51.665246782Z sun.os.patch.level = unknown 2023-12-22T16:37:51.665264483Z java.vm.specification.name = Java Virtual Machine Specification 2023-12-22T16:37:51.665283983Z user.dir = /root/Jts 2023-12-22T16:37:51.665291683Z java.runtime.version = 1.8.0_202-b08 2023-12-22T16:37:51.665396983Z java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment 2023-12-22T16:37:51.665413583Z java.endorsed.dirs = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/endorsed 2023-12-22T16:37:51.665537684Z os.arch = amd64 2023-12-22T16:37:51.665603284Z java.io.tmpdir = /tmp 2023-12-22T16:37:51.665617784Z line.separator = 2023-12-22T16:37:51.665626384Z 2023-12-22T16:37:51.665632684Z java.vm.specification.vendor = Oracle Corporation 2023-12-22T16:37:51.665791385Z os.name = Linux 2023-12-22T16:37:51.665840185Z sun.jnu.encoding = ANSI_X3.4-1968 2023-12-22T16:37:51.665848485Z java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2023-12-22T16:37:51.666126586Z java.specification.name = Java Platform API Specification 2023-12-22T16:37:51.666152086Z java.class.version = 52.0 2023-12-22T16:37:51.666157986Z sun.management.compiler = HotSpot 64-Bit Tiered Compilers 2023-12-22T16:37:51.666224586Z exe4j.isInstall4j = true 2023-12-22T16:37:51.666236486Z os.version = 5.15.133.1-microsoft-standard-WSL2 2023-12-22T16:37:51.666428787Z user.home = /root 2023-12-22T16:37:51.666445187Z user.timezone = GMT 2023-12-22T16:37:51.666456287Z java.awt.printerjob = sun.print.PSPrinterJob 2023-12-22T16:37:51.666545788Z file.encoding = ANSI_X3.4-1968 2023-12-22T16:37:51.666558488Z java.specification.version = 1.8 2023-12-22T16:37:51.666794188Z java.class.path = /root/Jts/ibgateway/10.19.1j/jars/jackson-core-2.12.3.jar:/root/Jts/ibgateway/10.19.1j/jars/jts4launch-1019.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-linux64-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/jxbrowser-swing-7.26.jar:/root/Jts/ibgateway/10.19.1j/jars/locales.jar:/root/Jts/ibgateway/10.19.1j/jars/log4j-api-2.17.1.jar:/root/Jts/ibgateway/10.19.1j/jars/log4j-core-2.17.1.jar:/root/Jts/ibgateway/10.19.1j/jars/total-2020.jar:/root/Jts/ibgateway/10.19.1j/jars/twslaunch-1019.jar:/root/Jts/ibgateway/10.19.1j/jars/twslaunch-install4j-1.12.jar:/root/Jts/ibgateway/10.19.1j/.install4j/i4jruntime.jar:/root/ibc/IBC.jar 2023-12-22T16:37:51.666810189Z user.name = root 2023-12-22T16:37:51.666828489Z channel = latest 2023-12-22T16:37:51.666840989Z java.vm.specification.version = 1.8 2023-12-22T16:37:51.667810492Z sun.java.command = ibcalpha.ibc.IbcGateway /root/ibc/config.ini *** *** paper 2023-12-22T16:37:51.667844593Z java.home = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202 2023-12-22T16:37:51.668020393Z sun.arch.data.model = 64 2023-12-22T16:37:51.668034793Z user.language = en 2023-12-22T16:37:51.668982397Z java.specification.vendor = Oracle Corporation 2023-12-22T16:37:51.669078797Z awt.toolkit = sun.awt.X11.XToolkit 2023-12-22T16:37:51.670413402Z java.vm.info = mixed mode 2023-12-22T16:37:51.672454010Z java.version = 1.8.0_202 2023-12-22T16:37:51.673106213Z java.ext.dirs = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/ext:/usr/java/packages/lib/ext 2023-12-22T16:37:51.673929316Z sun.boot.class.path = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/resources.jar:/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/rt.jar:/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/sunrsasign.jar:/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/jsse.jar:/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/jce.jar:/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/charsets.jar:/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/jfr.jar:/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/classes 2023-12-22T16:37:51.673983516Z java.vendor = Oracle Corporation 2023-12-22T16:37:51.674036016Z file.separator = / 2023-12-22T16:37:51.674078917Z twslaunch.autoupdate.serviceImpl = com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService 2023-12-22T16:37:51.674115517Z java.vendor.url.bug = http://bugreport.sun.com/bugreport/ 2023-12-22T16:37:51.674137917Z install4jType = standalone 2023-12-22T16:37:51.674311617Z sun.io.unicode.encoding = UnicodeLittle 2023-12-22T16:37:51.675478622Z sun.cpu.endian = little 2023-12-22T16:37:51.675618822Z sun.cpu.isalist = 2023-12-22T16:37:51.675700823Z ------------------------------------------------------------ 2023-12-22T16:37:51.676131524Z 2023-12-22 16:37:51:675 IBC: Using default settings provider: ini file is /root/ibc/config.ini 2023-12-22T16:37:51.676439126Z 2023-12-22 16:37:51:676 IBC: Using default login manager: getting username and password from args 2023-12-22T16:37:51.676914227Z 2023-12-22 16:37:51:676 IBC: Using default main window manager: constructor parameter isGateway=true 2023-12-22T16:37:51.677600630Z 2023-12-22 16:37:51:676 IBC: Using default trading mode manager: constructor parameter args: tradingMode=paper 2023-12-22T16:37:51.679297437Z 2023-12-22 16:37:51:678 IBC: Using default config dialog manager 2023-12-22T16:37:51.684836558Z 2023-12-22 16:37:51:684 IBC: CommandServer is not started because the port is not configured 2023-12-22T16:37:51.811696847Z 2023-12-22 16:37:51:811 IBC: TWS Settings directory is: /root/Jts 2023-12-22T16:37:51.820927683Z 2023-12-22 16:37:51:820 IBC: Ensuring /root/Jts/jts.ini contains required minimal lines 2023-12-22T16:37:51.821187384Z 2023-12-22 16:37:51:820 IBC: Found setting: [Logon]/s3store=true 2023-12-22T16:37:51.821744786Z 2023-12-22 16:37:51:821 IBC: Found setting: [Logon]/Locale=en 2023-12-22T16:37:51.822234788Z 2023-12-22 16:37:51:821 IBC: Found setting: [Logon]/displayedproxymsg=1 2023-12-22T16:37:51.822593189Z 2023-12-22 16:37:51:822 IBC: Found setting: [Logon]/UseSSL=true 2023-12-22T16:37:51.823286892Z 2023-12-22 16:37:51:822 IBC: Found setting: [IBGateway]/ApiOnly=true 2023-12-22T16:37:51.823454493Z 2023-12-22 16:37:51:823 IBC: Confirmed /root/Jts/jts.ini contains required minimal lines 2023-12-22T16:37:51.823996895Z 2023-12-22 16:37:51:823 IBC: Starting Gateway 2023-12-22T16:37:51.824597597Z 2023-12-22 16:37:51:824 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds 2023-12-22T16:37:53.497830950Z 2023-12-22 16:37:53:497 IBC: Getting config dialog 2023-12-22T16:37:53.497892550Z 2023-12-22 16:37:53:497 IBC: Creating config dialog future 2023-12-22T16:37:53.499995758Z 2023-12-22 16:37:53:499 IBC: Getting main window 2023-12-22T16:37:53.500062459Z 2023-12-22 16:37:53:499 IBC: Creating main window future 2023-12-22T16:37:54.877027169Z 2023-12-22 16:37:54:876 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-12-22T16:37:54.882220389Z 2023-12-22 16:37:54:881 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-12-22T16:37:54.883323493Z 2023-12-22 16:37:54:882 IBC: Detected frame entitled: IB Gateway; event=Opened 2023-12-22T16:37:54.883900595Z 2023-12-22 16:37:54:883 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT 2023-12-22T16:37:54.884751499Z 2023-12-22 16:37:54:884 IBC: Setting Trading mode = paper 2023-12-22T16:37:54.971437633Z 2023-12-22 16:37:54:971 IBC: Login attempt: 1 2023-12-22T16:37:54.999304641Z 2023-12-22 16:37:54:998 IBC: Click button: Paper Log In 2023-12-22T16:37:56.808492218Z 2023-12-22 16:37:56:808 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-12-22T16:37:56.808794019Z 2023-12-22 16:37:56:808 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-12-22T16:37:56.810126924Z 2023-12-22 16:37:56:809 IBC: Detected frame entitled: Loading...; event=Activated 2023-12-22T16:37:56.817264952Z 2023-12-22 16:37:56:816 IBC: Detected frame entitled: Loading...; event=Focused 2023-12-22T16:37:56.817562853Z 2023-12-22 16:37:56:817 IBC: Detected frame entitled: Loading...; event=Opened 2023-12-22T16:37:56.818062855Z 2023-12-22 16:37:56:817 IBC: Found Gateway main window 2023-12-22T16:37:56.820003662Z 2023-12-22 16:37:56:819 IBC: Got main window from future 2023-12-22T16:37:57.392233488Z 2023-12-22 16:37:57:391 IBC: Detected frame entitled: Connecting to server...; event=Opened 2023-12-22T16:37:57.404359661Z 2023-12-22 16:37:57:403 IBC: Detected frame entitled: Loading...; event=Lost focus 2023-12-22T16:37:57.404580662Z 2023-12-22 16:37:57:404 IBC: Detected frame entitled: Loading...; event=Deactivated 2023-12-22T16:37:57.405449867Z 2023-12-22 16:37:57:404 IBC: Detected frame entitled: Connecting to server...; event=Activated 2023-12-22T16:37:57.407134077Z 2023-12-22 16:37:57:406 IBC: Detected frame entitled: Connecting to server...; event=Focused 2023-12-22T16:37:58.958633302Z 2023-12-22 16:37:58:958 IBC: Detected dialog entitled: ** no title **; event=Opened 2023-12-22T16:37:58.977948018Z 2023-12-22 16:37:58:977 IBC: Detected frame entitled: ; event=Lost focus 2023-12-22T16:37:58.978183919Z 2023-12-22 16:37:58:977 IBC: Detected frame entitled: ; event=Deactivated 2023-12-22T16:37:58.978412820Z 2023-12-22 16:37:58:978 IBC: Detected dialog entitled: ** no title **; event=Activated 2023-12-22T16:37:58.980270832Z 2023-12-22 16:37:58:979 IBC: Detected dialog entitled: ** no title **; event=Focused 2023-12-22T16:38:21.395764235Z Forking :::4000 onto 0.0.0.0:4002 2023-12-22T16:38:23.357171953Z 2023/12/22 16:38:23 socat[173] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused ```

The unexpected line is this last one:

2023-12-22T16:38:23.357171953Z 2023/12/22 16:38:23 socat[173] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused

I've tried turning VPN on and off, still happens.

My docker compose file:

version: "3.4"

services:
  ib-gateway:
    image: ghcr.io/unusualalpha/ib-gateway:stable
    restart: always
    environment:
      TWS_USERID: ${TWS_USERID}
      TWS_PASSWORD: ${TWS_PASSWORD}
      TRADING_MODE: ${TRADING_MODE:-live}
      VNC_SERVER_PASSWORD: ${VNC_SERVER_PASSWORD:-}
    ports:
      - "127.0.0.1:4001:4001"
      - "127.0.0.1:4002:4002"
      - "127.0.0.1:5900:5900"

I pass credentials through an env.list file.

I'm then try connecting using code that is more or less along the lines of:

class Trader(EWrapper, EClient):
    ...
    def start(self):
        self.connect('127.0.0.1', 4002, 2)

Any help would be appreciated 👍

MateuszPu commented 9 months ago

I am facing the same problem. I am running stable version TWS version = 10.19.1j however using VNC i can see following message from ibkr client: image The same issue is for version 10.20. However using latest version, it looks like command to send login/password not working. image