Giter Club home page Giter Club logo

ib-gateway-docker's Introduction

Interactive Brokers Gateway Docker

What is it?

A docker image to run the Interactive Brokers Gateway Application without any human interaction on a docker container.

It includes:

  • IB Gateway Application (stable, latest)
  • IBC Application - to control the IB Gateway Application (simulates user input).
  • Xvfb - a X11 virtual framebuffer to run IB Gateway Application without graphics hardware.
  • x11vnc - a VNC server that allows to interact with the IB Gateway user interface (optional, for development / maintenance purpose).
  • socat a tool to accept TCP connection from non-localhost and relay it to IB Gateway from localhost (IB Gateway restricts connections to 127.0.0.1 by default).

Supported Tags

Channel IB Gateway Version IBC Version Docker Tags
latest 10.22.1m 3.16.0 latest 10.22 10.22.1m
stable 10.19.1j 3.15.2 stable 10.19 10.19.1j

See all available tags here.

How to use?

Create a docker-compose.yml (or include ib-gateway services on your existing one)

version: "3.4"

services:
  ib-gateway:
    image: ghcr.io/unusualalpha/ib-gateway:latest
    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"

Create an .env on root directory or set the following environment variables:

Variable Description Default
TWS_USERID The TWS username.
TWS_PASSWORD The TWS password.
TRADING_MODE live or paper paper
READ_ONLY_API yes or no (see) not defined
VNC_SERVER_PASSWORD VNC server password. If not defined, no VNC server will be started. not defined (VNC disabled)

Example .env file:

TWS_USERID=myTwsAccountName
TWS_PASSWORD=myTwsPassword
TRADING_MODE=paper
READ_ONLY_API=no
VNC_SERVER_PASSWORD=myVncPassword

Run:

$ docker-compose up

After image is downloaded, container is started + 30s, the following ports will be ready for usage on the container and docker host:

Port Description
4001 TWS API port for live accounts.
4002 TWS API port for paper accounts.
5900 When VNC_SERVER_PASSWORD was defined, the VNC server port.

_Note that with the above docker-compose.yml, ports are only exposed to the docker host (127.0.0.1), but not to the network of the host. To expose it to the whole network change the port mappings on accordingly (remove the '127.0.0.1:'). Attention: See Leaving localhost

How build locally

  1. Clone this repo

       git clone https://github.com/UnusualAlpha/ib-gateway-docker
  2. Change docker file to use your local IB Gateway installer file, instead of loading it from this project releases: Open Dockerfile on editor and replace this lines:

    RUN curl -sSL https://github.com/UnusualAlpha/ib-gateway-docker/raw/gh-pages/ibgateway-releases/ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh \
        --output ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh
    RUN curl -sSL https://github.com/UnusualAlpha/ib-gateway-docker/raw/gh-pages/ibgateway-releases/ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh.sha256 \
        --output ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh.sha256
    

    with

    COPY ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh
    
  3. Remove RUN sha256sum --check ./ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh.sha256 from Dockerfile (unless you want to keep checksum-check)

  4. Download IB Gateway and name the file ibgateway-{IB_GATEWAY_VERSION}-standalone-linux-x64.sh, where {IB_GATEWAY_VERSION} must match the version as configured on Dockerfile (first line)

  5. Download IBC and name the file IBCLinux-{IBC_VERSION}.zip, where {IBC_VERSION} must match the version as configured on Dockerfile (second line)

  6. Build and run: docker-compose up --build

Versions and Tags

The docker image version is similar to the IB Gateway version on the image.

See Supported tags

IB Gateway installation files

Note that the Dockerfile does not download IB Gateway installer files from IB homepage but from the github-pages of this project.

This is because it shall be possible to (re-)build the image, targeting a specific Gateway version, but IB does only provide download links for the latest or stable version (there is no 'old version' download archive).

The installer files stored on github-pages have been downloaded from IB homepage and renamed to reflect the version.

If you want to download Gateway installer from IB homepage directly, or use your local installation file, change this line on Dockerfile RUN curl -sSL https://github.com/UnusualAlpha/ib-gateway-docker/raw/gh-pages/ibgateway-releases/ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh --output ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh to download (or copy) the file from the source you prefer.

Example: change to RUN curl -sSL https://download2.interactivebrokers.com/installers/ibgateway/stable-standalone/ibgateway-stable-standalone-linux-x64.sh --output ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh for using current stable version from IB homepage.

Customizing the image

The image can be customized by overwriting the default configuration files with custom ones.

Apps and config file locations:

App Folder Config file Default
IB Gateway /root/Jts /root/Jts/jts.ini jts.ini
IBC /root/ibc /root/ibc/config.ini config.ini

To start the IB Gateway run /root/scripts/run.sh from your Dockerfile or run-script.

Security Considerations

Leaving localhost

The IB API protocol is based on an unencrypted, unauthenticated, raw TCP socket connection between a client and the IB Gateway. If the port to IB API is open to the network, every device on it (including potential rogue devices) can access your IB account via the IB Gateway.

Because of this, the default docker-compose.yml only exposes the IB API port to the localhost on the docker host, but not to the whole network.

If you want to connect to IB Gateway from a remote device, consider adding an additional layer of security (e.g. TLS/SSL or SSH tunnel) to protect the 'plain text' TCP sockets against unauthorized access or manipulation.

Credentials

This image does not contain nor store any user credentials.

They are provided as environment variable during the container startup and the host is responsible to properly protect it (e.g. use Kubernetes Secrets or similar).

ib-gateway-docker's People

Contributors

bluphy avatar efernandes-ppb avatar efernandesng avatar electic avatar fujiapple852 avatar github-actions[bot] avatar mfrener avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ib-gateway-docker's Issues

Address already in use

The scripts runs fine.
However, If I change the config.ini.tmpl and make it auto-start at a fixed time everyday by adding the following lines, I get the error which is shown in the logs.
These lines were added under "4. TWS Auto-Closedown"
AutoLogoffTime= AutoRestartTime=10:00 PM
The logs are shown below.
2023-01-03 14:22:59:252 IBC: Setting ReadOnlyApi ib-gateway_1  | 2023-01-03 14:22:59:321 IBC: Read-Only API checkbox is now set to: false ib-gateway_1  | 2023-01-03 14:22:59:321 IBC: Setting Auto restart time ib-gateway_1  | 2023-01-03 14:22:59:341 IBC: Auto restart time set to 10:00 PM ib-gateway_1  | 2023-01-03 14:22:59:341 IBC: Performing port configuration ib-gateway_1  | 2023-01-03 14:22:59:349 IBC: TWS API socket port was set to 4001 ib-gateway_1  | 2023-01-03 14:22:59:350 IBC: TWS API socket port now set to 4000 ib-gateway_1  | 2023-01-03 14:22:59:350 IBC: Click button: OK ib-gateway_1  | Forking :::4000 onto [0.0.0.0:4001](http://0.0.0.0:4001/) ib-gateway_1  | 2023/01/03 14:23:15 socat[229] E bind(5, {AF=2 [0.0.0.0:4001](http://0.0.0.0:4001/)}, 16): Address already in use

2FA for live account

I would like to use this docker image with my IB live account, but the account is protected with 2FA, so it requires to use VNC to enter the code.
Is there a way to skip the 2FA code or to automate the process somehow?
Did anyone find a solution for it?

IBC Crash after succesful login

Bug
version of ib-gateway 10.24.1f
After succesfull Login and 2FA. IBC shuts down the docker with an error

To Reproduce
Steps to reproduce the behavior:

  1. Cloned the repo
  2. changed the version in \latest\Dockerfile to 10.24.1f in two places in the file , as needed.
  3. The build is ok
  4. I ran the docker (I had to get in with VNC and had to manually enter password and userid but this is for another issue)
  5. gave 2FA
  6. login successfully
  7. CRASH

Expected behavior
After login I should be able to trade

Container logs

2023-09-05 17:16:26:958 IBC: Detected dialog entitled: U11XXXXXX TWS Configuration; event=Focused
2023-09-05 17:16:26:958 IBC: Detected frame entitled: Starting application...; event=Closed
2023-09-05 17:16:26:958 IBC: Login has completed
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2023-09-05 17:16:26:958 IBC: An exception has occurred:
java.lang.NullPointerException
at ibcalpha.ibc.LoginManager.setLoginState(Unknown Source)
at ibcalpha.ibc.SplashFrameHandler.handleWindow(Unknown Source)
at ibcalpha.ibc.TwsListener.lambda$eventDispatched$0(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2023-09-05 17:16:26:959 IBC: Exiting with exit code=1100
IBC returned exit status 76
Renaming TWS or Gateway .exe file to original name
Gateway finished
Versions (please complete the following information):

  • OS: linux
  • Docker version: [e.g. chrome, safari]

Additional context
Add any other context about the problem here.

IBC 3.17 seems to be needed for v10.22 gateway

Describe the bug
The latest branch is using IBC 3.16 with Gateway 10.22. In may case it fails to login, while with the 'stable' brunch it works well.
According to IBC this is a known issue and fixed in 3.17:

https://github.com/IbcAlpha/IBC/releases/tag/3.17.0

To Reproduce
Install the latest branch and try to use it.

Versions (please complete the following information):

  • OS: Debian
  • Docker version:
  • Image Tag (docker --version): latest
  • Image Digest (docker images --digests):

Unable to connect?

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

Modifying ibc/config.ini variables without rebuilding image?

Great you are maintaining this. Thanks!

I want to set ReadOnlyAPI=no for more configuration in /config/ibc/config.ini. I can rebuild the image myself of course but I was wondering if there's a way of injecting this or if we might create environment variables for some of the config options that people might want to change.

I tried mounting a volume on /root/ibc but there are other files in that config folder that I need to then pull across too.

I can find a way around it and will build my own container, but just wanted to raise this in case you already have a smarter idea. Thanks

Cotnainer Health Check implementation

Is your feature request related to a problem? Please describe.
yes, there is no programatic way to check the container health if the broker is reall connected and logged in or not
Describe the solution you'd like
implement a halth check that can give a clear status for the container

Describe alternatives you've considered
i use the container logs with some grep commands
Additional context
this could be useful in matter of automated platforms

out of memory core dumped

Describe the bug
setup 9/17: RUN ./ibgateway-10.22.1m-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/10.22.1m
generates core dumped due to out of memory

To Reproduce
just set variables and launch:
docker-compose up --build

Expected behavior
Creation and launch of ibgateway docker service

Container logs
docker-compose up --build
Building ib-gateway
[+] Building 336.3s (16/27) docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 2.62kB 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 0.9s
=> [setup 1/17] FROM docker.io/library/ubuntu:22.04@sha256:aabed3296a3d 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 1.04kB 0.0s
=> CACHED [setup 2/17] RUN apt-get update -y 0.0s
=> CACHED [setup 3/17] RUN apt-get install --no-install-recommends --ye 0.0s
=> CACHED [setup 4/17] WORKDIR /tmp/setup 0.0s
=> CACHED [stage-1 2/7] WORKDIR /root 0.0s
=> CACHED [stage-1 3/7] RUN apt-get update -y 0.0s
=> [stage-1 4/7] RUN apt-get install --no-install-recommends --yes g 196.6s
=> [setup 5/17] RUN curl -sSL https://github.com/UnusualAlpha/ib-gate 327.7s
=> [setup 6/17] RUN curl -sSL https://github.com/UnusualAlpha/ib-gatewa 1.9s
=> [setup 7/17] RUN sha256sum --check ./ibgateway-10.22.1m-standalone-l 1.0s
=> [setup 8/17] RUN chmod a+x ./ibgateway-10.22.1m-standalone-linux-x64 0.5s
=> ERROR [setup 9/17] RUN ./ibgateway-10.22.1m-standalone-linux-x64.sh 4.1s

[setup 9/17] RUN ./ibgateway-10.22.1m-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/10.22.1m:
0.906 Unpacking JRE ...
3.509 Starting Installer ...
3.599 library initialization failed - unable to allocate file descriptor table - out of memoryAborted (core dumped)


Dockerfile:33

31 | RUN sha256sum --check ./ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh.sha256
32 | RUN chmod a+x ./ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh
33 | >>> RUN ./ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/${IB_GATEWAY_VERSION}
34 | COPY ./config/ibgateway/jts.ini /root/Jts/jts.ini
35 |

ERROR: failed to solve: process "/bin/sh -c ./ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/${IB_GATEWAY_VERSION}" did not complete successfully: exit code: 134
ERROR: Service 'ib-gateway' failed to build : Build failed

Versions (please complete the following information):

  • OS: Fedora 38, Linux 6.5.5-200.fc38.x86_64
  • Docker version: Docker Engine - Community
  • Image Tag (docker --version): Docker version 24.0.6, build ed223bc
  • Image Digest (docker images --digests): image not created

Additional context
Tried to change ulimits without success.
16Go memory, 3Go free, 3Go used, 9Go buff/cache according to top.

Does not build when targeting Mac silicon

Describe the bug
Looks like the Install4j script does not support mac sillicon. Get this error when building:

 => [setup  7/17] RUN sha256sum --check ./ibgateway-10.19.1j-standalone-linux-x64.sh.sha256                                 2.9s
 => [setup  8/17] RUN chmod a+x ./ibgateway-10.19.1j-standalone-linux-x64.sh                                                0.9s
 => ERROR [setup  9/17] RUN ./ibgateway-10.19.1j-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/10.19.1j               6.8s
------
 > [setup  9/17] RUN ./ibgateway-10.19.1j-standalone-linux-x64.sh -q -dir /root/Jts/ibgateway/10.19.1j:
#15 2.560 Unpacking JRE ...
#15 6.743 Error unpacking jar files. The architecture or bitness (32/64)
#15 6.743 of the bundled JVM might not match your machine.

To Reproduce

docker build --platform linux/arm64/v8 . -t ib-gateway-local

Expected behavior
It should build

Container logs
NA

Versions (please complete the following information):

  • OS: Ubuntu Via WSL2 targeting linux/arm64/v8
  • Docker version: 20.10.11, build dea9396
  • Image Tag (docker --version): building stable
  • Image Digest (docker images --digests): NA

Additional context
If you could upload your images supported Mac silicon that would be ideal.

How about minimum system requirements?

I have a free Oracle instance with 1CPU 1G-ram.
Before I found this project, I installed VNC & IBGateway For Linux munually on it, it worked fine.

After running successfully on my local environment, I tried to deploy this docker container on Oracle server.
But it was so heavy and made my server down.

Ports blocked

Can't connect to ports 5900, 4001 or 4002. Ports show as "filtered" in nmap. ufw not fixing the issue.

Ubuntu 20.01 running in VirtualBox on a Windows 10 machine. Opened ports with ufw but they are still blocked as nmap shows. Any ideas on what I need to do?

(base) mike@wayne:/ib-gateway-docker$ sudo ufw allow from any to any port 5900 proto tcp
Skipping adding existing rule
Skipping adding existing rule (v6)
(base) mike@wayne:
/ib-gateway-docker$ sudo nmap 192.168.0.162
Starting Nmap 7.80 ( https://nmap.org ) at 2022-10-22 13:08 EDT
Nmap scan report for wayne (192.168.0.162)
Host is up (0.0000040s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
111/tcp open rpcbind
4001/tcp filtered newoak
4002/tcp filtered mlchat-proxy
5000/tcp open upnp
5900/tcp filtered vnc

Nmap done: 1 IP address (1 host up) scanned in 1.40 seconds

Cannot start, exited with code 133

Describe the bug
When trying to run the gateway it fails to start the container

To Reproduce
set

TWS_USERID
TWS_PASSWORD
TRADING_MODE
READ_ONLY_API

run docker-compose up

Expected behavior
The gateway container to run

Container logs
Error message, it tries to run again after about 15 seconds and faces the same issue

ib-gateway-1  | 2024-02-07 10:46:55:461 IBC: Using default settings provider: ini file is /root/ibc/config.ini
ib-gateway-1  | 2024-02-07 10:46:55:462 IBC: Using default login manager: getting username and password from args
ib-gateway-1  | 2024-02-07 10:46:55:462 IBC: Using default main window manager
ib-gateway-1  | 2024-02-07 10:46:55:462 IBC: Using default trading mode manager: constructor parameter args: tradingMode=paper
ib-gateway-1  | 2024-02-07 10:46:55:464 IBC: Using default config dialog manager
ib-gateway-1  | 2024-02-07 10:46:55:468 IBC: CommandServer is not started because the port is not configured
ib-gateway-1  | 2024-02-07 10:46:55:569 IBC: TWS Settings directory is: /root/Jts
ib-gateway-1  | 2024-02-07 10:46:55:574 IBC: Ensuring /root/Jts/jts.ini contains required minimal lines
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Found setting: [Logon]/s3store=true
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Found setting: [Logon]/Locale=en
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Found setting: [Logon]/displayedproxymsg=1
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Found setting: [Logon]/UseSSL=true
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Found setting: [IBGateway]/ApiOnly=true
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Confirmed /root/Jts/jts.ini contains required minimal lines
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Starting Gateway
ib-gateway-1  | 2024-02-07 10:46:55:575 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds
ib-gateway-1  | assertion failed [rem_idx != -1]: Unable to find existing allocation for shared memory segment to unmap
ib-gateway-1  | (VMAllocationTracker.cpp:745 remove_shared_mem)
ib-gateway-1  |  /root/ibc/scripts/ibcstart.sh: line 468:   125 Trace/breakpoint trap   "$java_path/java" -cp "$ibc_classpath" $java_vm_options$autorestart_option $entry_point "$ibc_ini" "$ib_user_id" "$ib_password" ${mode}
ib-gateway-1  | IBC returned exit status 133
ib-gateway-1  | Renaming TWS or Gateway .exe file to original name
ib-gateway-1  | 
ib-gateway-1  | Gateway finished
ib-gateway-1  | 
ib-gateway-1 exited with code 133

Versions (please complete the following information):

  • OS: MacOS 14.3, M1 Max
  • Docker version: Docker version 25.0.2, build 29cf629
  • Image Tag (docker --version): latest
  • Image Digest (docker images --digests): sha256:5f3311ed8dab171e5f955fdeca15ca269cea899577b82ad5955c5956e13461c3

Cannot find run.sh

Hi there,

I am getting this error when running docker-compose up:

image

My docker-compose.yml contains what is shown in the ReadMe.

Any ideas what might be the issue?

error, obsolete version. Download latest version

Describe the bug

i have docker-compose.yml with following

`version: "3.4"

services:
ib-gateway:
image: ghcr.io/unusualalpha/ib-gateway:latest
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"`

And when i vnc to ibg and enter login details for paper version then i get error:

"error , obsolete version. Download latest version"

I have made sure i had latest docker image version as well

  • OS: Macosx
  • Docker version: macosx intel latest stable version
  • Image Tag: latest

Container is not available anymore for any new connections

Describe the bug
After some time running, the container becomes unavailable/unreachable for new connections, for for ib_insync and VNC.
The container is running on GCP VM (Compute Engine), the server itself is reachable via SSH and I can confirm the container is running. I couldn't find any meaningful log. But maybe you can tell me where to look.

Once I restart the container (just docker stop and docker start, even without restarting the server), new connections are being accepted for IB and VNC

To Reproduce
Start the container and let it run for a few hours.

Expected behavior
The container should be reachable at all times.

Container logs

2023-01-09 08:14:58:708 IBC: Using default settings provider: ini file is /root/ibc/config.ini
2023-01-09 08:14:58:709 IBC: Using default login manager: getting username and password from args
2023-01-09 08:14:58:709 IBC: Using default main window manager: constructor parameter isGateway=true
2023-01-09 08:14:58:710 IBC: Using default trading mode manager: constructor parameter args: tradingMode=live
2023-01-09 08:14:58:712 IBC: Using default config dialog manager
2023-01-09 08:14:58:737 IBC: CommandServer is not started because the port is not configured
2023-01-09 08:14:59:041 IBC: TWS Settings directory is: /root/Jts
2023-01-09 08:14:59:060 IBC: Ensuring /root/Jts/jts.ini contains required minimal lines
2023-01-09 08:14:59:061 IBC: Found setting: [Logon]/s3store=true
2023-01-09 08:14:59:061 IBC: Found setting: [Logon]/Locale=en
2023-01-09 08:14:59:061 IBC: Found setting: [Logon]/displayedproxymsg=1
2023-01-09 08:14:59:062 IBC: Found setting: [Logon]/UseSSL=true
2023-01-09 08:14:59:062 IBC: Found setting: [IBGateway]/ApiOnly=true
2023-01-09 08:14:59:062 IBC: Confirmed /root/Jts/jts.ini contains required minimal lines
2023-01-09 08:14:59:062 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds
2023-01-09 08:15:02:835 IBC: Getting config dialog
2023-01-09 08:15:02:835 IBC: Creating config dialog future
2023-01-09 08:15:02:837 IBC: Getting config dialog
2023-01-09 08:15:02:838 IBC: Waiting for config dialog future to complete
2023-01-09 08:15:02:839 IBC: Getting main window
2023-01-09 08:15:02:840 IBC: Creating main window future
2023-01-09 08:15:05:487 IBC: Detected frame entitled: IB Gateway; event=Activated
2023-01-09 08:15:05:501 IBC: Detected frame entitled: IB Gateway; event=Focused
2023-01-09 08:15:05:503 IBC: Detected frame entitled: IB Gateway; event=Opened
2023-01-09 08:15:05:505 IBC: Setting Trading mode = live
2023-01-09 08:15:05:599 IBC: Login attempt: 1
2023-01-09 08:15:05:654 IBC: Click button: Log In
2023-01-09 08:15:08:387 IBC: Detected frame entitled: IB Gateway; event=Lost focus
2023-01-09 08:15:08:387 IBC: Detected frame entitled: IB Gateway; event=Deactivated
2023-01-09 08:15:08:388 IBC: Detected frame entitled: Loading...; event=Activated
2023-01-09 08:15:08:410 IBC: Detected frame entitled: Loading...; event=Focused
2023-01-09 08:15:08:410 IBC: Detected frame entitled: Loading...; event=Opened
2023-01-09 08:15:08:411 IBC: Found Gateway main window
2023-01-09 08:15:08:419 IBC: Got main window from future
2023-01-09 08:15:08:917 IBC: Detected frame entitled: Connecting to server...; event=Opened
2023-01-09 08:15:08:961 IBC: Detected frame entitled: Loading...; event=Lost focus
2023-01-09 08:15:08:963 IBC: Detected frame entitled: Loading...; event=Deactivated
2023-01-09 08:15:08:963 IBC: Detected frame entitled: Connecting to server...; event=Activated
2023-01-09 08:15:08:965 IBC: Detected frame entitled: Connecting to server...; event=Focused
2023-01-09 08:15:09:622 IBC: Detected dialog entitled: Second Factor Authentication; event=Opened
2023-01-09 08:15:09:624 IBC: Second Factor Authentication initiated
2023-01-09 08:15:09:662 IBC: Detected frame entitled: Authenticating...; event=Lost focus
2023-01-09 08:15:09:663 IBC: Detected frame entitled: Authenticating...; event=Deactivated
2023-01-09 08:15:09:664 IBC: Detected dialog entitled: Second Factor Authentication; event=Activated
2023-01-09 08:15:09:666 IBC: Detected dialog entitled: Second Factor Authentication; event=Focused
Forking :::4000 onto 0.0.0.0:4001
2023-01-09 08:18:13:418 IBC: Detected dialog entitled: Second Factor Authentication; event=Lost focus
2023-01-09 08:18:13:419 IBC: Detected dialog entitled: Second Factor Authentication; event=Deactivated
2023-01-09 08:18:13:420 IBC: Detected dialog entitled: Second Factor Authentication; event=Closed
2023-01-09 08:18:13:421 IBC: Duration since login: 187 seconds
2023-01-09 08:18:13:422 IBC: Re-login after second factor authentication timeout not required
2023/01/09 12:35:15 socat[506] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused
2023/01/09 12:35:15 socat[507] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused
2023/01/09 12:35:15 socat[508] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused
2023/01/09 12:35:15 socat[509] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused```

**Versions (please complete the following information):**
 - OS: GCP Container Optimized OS (Linux)
 - Docker version: 20.10.12
 - Image Tag (`docker --version`): latest
 - Image Digest (`docker images --digests`): sha256:a8298b17e8ef8aa200f3130c43357edb08505aaf8384709f92432f814ec0b6e6   62baa9b6a2b6

fail to connect

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

  1. clone master branch and edit the docker-compose.yml file: replace 'latest' with 'stable'
  2. create .env in the same directory as docker-compose.yml, input the information for the following:
TWS_USERID=myuserid
TWS_PASSWORD=mypassword
TRADING_MODE=paper
READ_ONLY_API=no
  1. run docker-compose up

Expected behavior
expect to connect ib normally

Container logs
Starting ib-gateway-docker-master_ib-gateway_1 ... done
Attaching to ib-gateway-docker-master_ib-gateway_1
ib-gateway_1 |
ib-gateway_1 | ================================================================================
ib-gateway_1 |
ib-gateway_1 | Starting IBC version on 2023-10-11 at 15:25:55
ib-gateway_1 |
ib-gateway_1 | Operating system: Linux ca53af3cb547 5.10.104-linuxkit #1 SMP Thu Mar 17 17:08:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
ib-gateway_1 |
ib-gateway_1 | Arguments:
ib-gateway_1 |
ib-gateway_1 | TWS version = 10.22.1m
ib-gateway_1 | Program = Gateway
ib-gateway_1 | Entry point = ibcalpha.ibc.IbcGateway
ib-gateway_1 | --tws-path = /root/Jts
ib-gateway_1 | --tws-settings-path =
ib-gateway_1 | --ibc-path = /root/ibc
ib-gateway_1 | --ibc-ini = /root/ibc/config.ini
ib-gateway_1 | --mode = paper
ib-gateway_1 | --java-path =
ib-gateway_1 | --user = ***
ib-gateway_1 | --pw = ***
ib-gateway_1 | --fix-user =
ib-gateway_1 | --fix-pw =
ib-gateway_1 |
ib-gateway_1 | =================================
ib-gateway_1 | Generating the classpath
ib-gateway_1 | Classpath=/root/Jts/ibgateway/10.22.1m/jars/jackson-core-2.12.3.jar:/root/Jts/ibgateway/10.22.1m/jars/jts4launch-1022.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-linux64-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-swing-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/locales.jar:/root/Jts/ibgateway/10.22.1m/jars/log4j-api-2.17.1.jar:/root/Jts/ibgateway/10.22.1m/jars/log4j-core-2.17.1.jar:/root/Jts/ibgateway/10.22.1m/jars/total-2020.jar:/root/Jts/ibgateway/10.22.1m/jars/twslaunch-1022.jar:/root/Jts/ibgateway/10.22.1m/jars/twslaunch-install4j-1.12.jar:/root/Jts/ibgateway/10.22.1m/.install4j/i4jruntime.jar:/root/ibc/IBC.jar
ib-gateway_1 |
ib-gateway_1 | Generating the JAVA VM options
ib-gateway_1 | 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
ib-gateway_1 |
ib-gateway_1 | Determining the location of java executable
ib-gateway_1 | Location of java executable=/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/bin
ib-gateway_1 |
ib-gateway_1 | Renaming IB's TWS or Gateway start script to prevent restart without IBC
ib-gateway_1 |
ib-gateway_1 | Starting Gateway with this command:
ib-gateway_1 | "/usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/bin/java" -cp "/root/Jts/ibgateway/10.22.1m/jars/jackson-core-2.12.3.jar:/root/Jts/ibgateway/10.22.1m/jars/jts4launch-1022.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-linux64-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-swing-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/locales.jar:/root/Jts/ibgateway/10.22.1m/jars/log4j-api-2.17.1.jar:/root/Jts/ibgateway/10.22.1m/jars/log4j-core-2.17.1.jar:/root/Jts/ibgateway/10.22.1m/jars/total-2020.jar:/root/Jts/ibgateway/10.22.1m/jars/twslaunch-1022.jar:/root/Jts/ibgateway/10.22.1m/jars/twslaunch-install4j-1.12.jar:/root/Jts/ibgateway/10.22.1m/.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
ib-gateway_1 |
ib-gateway_1 | IBC Settings:
ib-gateway_1 | AcceptBidAskLastSizeDisplayUpdateNotification=accept
ib-gateway_1 | AcceptIncomingConnectionAction=reject
ib-gateway_1 | AcceptNonBrokerageAccountWarning=yes
ib-gateway_1 | AllowBlindTrading=no
ib-gateway_1 | BindAddress=
ib-gateway_1 | ClosedownAt=
ib-gateway_1 | CommandPrompt=
ib-gateway_1 | ControlFrom=
ib-gateway_1 | DismissNSEComplianceNotice=yes
ib-gateway_1 | DismissPasswordExpiryWarning=no
ib-gateway_1 | ExistingSessionDetectedAction=primary
ib-gateway_1 | ExitAfterSecondFactorAuthenticationTimeout=no
ib-gateway_1 | FIX=no
ib-gateway_1 | FIXLoginId=***
ib-gateway_1 | FIXPassword=***
ib-gateway_1 | IbAutoClosedown=yes
ib-gateway_1 | IbDir=/root/Jts
ib-gateway_1 | IbLoginId=***
ib-gateway_1 | IbPassword=***
ib-gateway_1 | LogStructureScope=known
ib-gateway_1 | LogStructureWhen=never
ib-gateway_1 | LoginDialogDisplayTimeout=60
ib-gateway_1 | MinimizeMainWindow=no
ib-gateway_1 | OverrideTwsApiPort=4000
ib-gateway_1 | ReadOnlyApi=no
ib-gateway_1 | ReadOnlyLogin=no
ib-gateway_1 | SaveTwsSettingsAt=
ib-gateway_1 | SecondFactorAuthenticationExitInterval=
ib-gateway_1 | SecondFactorDevice=
ib-gateway_1 | SendMarketDataInLotsForUSstocks=
ib-gateway_1 | StoreSettingsOnServer=
ib-gateway_1 | SuppressInfoMessages=yes
ib-gateway_1 | TradingMode=
ib-gateway_1 | End IBC Settings
ib-gateway_1 |
ib-gateway_1 | 2023-10-11 15:25:55:893 IBC: Version: 3.16.0
ib-gateway_1 | System Properties
ib-gateway_1 | ------------------------------------------------------------
ib-gateway_1 | jtsConfigDir = /root/Jts
ib-gateway_1 | java.runtime.name = Java(TM) SE Runtime Environment
ib-gateway_1 | sun.boot.library.path = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/amd64
ib-gateway_1 | java.vm.version = 25.202-b08
ib-gateway_1 | java.vm.vendor = Oracle Corporation
ib-gateway_1 | java.vendor.url = http://java.oracle.com/
ib-gateway_1 | path.separator = :
ib-gateway_1 | java.vm.name = Java HotSpot(TM) 64-Bit Server VM
ib-gateway_1 | file.encoding.pkg = sun.io
ib-gateway_1 | user.country = US
ib-gateway_1 | sun.java.launcher = SUN_STANDARD
ib-gateway_1 | sun.os.patch.level = unknown
ib-gateway_1 | java.vm.specification.name = Java Virtual Machine Specification
ib-gateway_1 | user.dir = /root/Jts
ib-gateway_1 | java.runtime.version = 1.8.0_202-b08
ib-gateway_1 | java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
ib-gateway_1 | java.endorsed.dirs = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/endorsed
ib-gateway_1 | os.arch = amd64
ib-gateway_1 | java.io.tmpdir = /tmp
ib-gateway_1 | line.separator =
ib-gateway_1 |
ib-gateway_1 | java.vm.specification.vendor = Oracle Corporation
ib-gateway_1 | os.name = Linux
ib-gateway_1 | sun.jnu.encoding = ANSI_X3.4-1968
ib-gateway_1 | java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
ib-gateway_1 | java.specification.name = Java Platform API Specification
ib-gateway_1 | java.class.version = 52.0
ib-gateway_1 | sun.management.compiler = HotSpot 64-Bit Tiered Compilers
ib-gateway_1 | exe4j.isInstall4j = true
ib-gateway_1 | os.version = 5.10.104-linuxkit
ib-gateway_1 | user.home = /root
ib-gateway_1 | user.timezone = GMT
ib-gateway_1 | java.awt.printerjob = sun.print.PSPrinterJob
ib-gateway_1 | file.encoding = ANSI_X3.4-1968
ib-gateway_1 | java.specification.version = 1.8
ib-gateway_1 | java.class.path = /root/Jts/ibgateway/10.22.1m/jars/jackson-core-2.12.3.jar:/root/Jts/ibgateway/10.22.1m/jars/jts4launch-1022.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-linux64-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/jxbrowser-swing-7.29.jar:/root/Jts/ibgateway/10.22.1m/jars/locales.jar:/root/Jts/ibgateway/10.22.1m/jars/log4j-api-2.17.1.jar:/root/Jts/ibgateway/10.22.1m/jars/log4j-core-2.17.1.jar:/root/Jts/ibgateway/10.22.1m/jars/total-2020.jar:/root/Jts/ibgateway/10.22.1m/jars/twslaunch-1022.jar:/root/Jts/ibgateway/10.22.1m/jars/twslaunch-install4j-1.12.jar:/root/Jts/ibgateway/10.22.1m/.install4j/i4jruntime.jar:/root/ibc/IBC.jar
ib-gateway_1 | user.name = root
ib-gateway_1 | channel = latest
ib-gateway_1 | java.vm.specification.version = 1.8
ib-gateway_1 | sun.java.command = ibcalpha.ibc.IbcGateway /root/ibc/config.ini *** *** paper
ib-gateway_1 | java.home = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202
ib-gateway_1 | sun.arch.data.model = 64
ib-gateway_1 | user.language = en
ib-gateway_1 | java.specification.vendor = Oracle Corporation
ib-gateway_1 | awt.toolkit = sun.awt.X11.XToolkit
ib-gateway_1 | java.vm.info = mixed mode
ib-gateway_1 | java.version = 1.8.0_202
ib-gateway_1 | java.ext.dirs = /usr/local/i4j_jres/Oda-jK0QgTEmVssfllLP/1.8.0_202/lib/ext:/usr/java/packages/lib/ext
ib-gateway_1 | 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
ib-gateway_1 | java.vendor = Oracle Corporation
ib-gateway_1 | file.separator = /
ib-gateway_1 | twslaunch.autoupdate.serviceImpl = com.ib.tws.twslaunch.install4j.Install4jAutoUpdateService
ib-gateway_1 | java.vendor.url.bug = http://bugreport.sun.com/bugreport/
ib-gateway_1 | install4jType = standalone
ib-gateway_1 | sun.io.unicode.encoding = UnicodeLittle
ib-gateway_1 | sun.cpu.endian = little
ib-gateway_1 | sun.cpu.isalist =
ib-gateway_1 | ------------------------------------------------------------
ib-gateway_1 | 2023-10-11 15:25:55:899 IBC: Using default settings provider: ini file is /root/ibc/config.ini
ib-gateway_1 | 2023-10-11 15:25:55:900 IBC: Using default login manager: getting username and password from args
ib-gateway_1 | 2023-10-11 15:25:55:900 IBC: Using default main window manager
ib-gateway_1 | 2023-10-11 15:25:55:900 IBC: Using default trading mode manager: constructor parameter args: tradingMode=paper
ib-gateway_1 | 2023-10-11 15:25:55:901 IBC: Using default config dialog manager
ib-gateway_1 | 2023-10-11 15:25:55:904 IBC: CommandServer is not started because the port is not configured
ib-gateway_1 | 2023-10-11 15:25:55:988 IBC: TWS Settings directory is: /root/Jts
ib-gateway_1 | 2023-10-11 15:25:55:994 IBC: Ensuring /root/Jts/jts.ini contains required minimal lines
ib-gateway_1 | 2023-10-11 15:25:55:995 IBC: Found setting: [Logon]/s3store=true
ib-gateway_1 | 2023-10-11 15:25:55:995 IBC: Found setting: [Logon]/Locale=en
ib-gateway_1 | 2023-10-11 15:25:55:995 IBC: Found setting: [Logon]/displayedproxymsg=1
ib-gateway_1 | 2023-10-11 15:25:55:995 IBC: Found setting: [Logon]/UseSSL=true
ib-gateway_1 | 2023-10-11 15:25:55:996 IBC: Found setting: [IBGateway]/ApiOnly=true
ib-gateway_1 | 2023-10-11 15:25:55:996 IBC: Confirmed /root/Jts/jts.ini contains required minimal lines
ib-gateway_1 | 2023-10-11 15:25:55:997 IBC: Starting Gateway
ib-gateway_1 | 2023-10-11 15:25:55:997 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds
ib-gateway_1 | 2023-10-11 15:25:57:151 IBC: Getting config dialog
ib-gateway_1 | 2023-10-11 15:25:57:151 IBC: Creating config dialog future
ib-gateway_1 | 2023-10-11 15:25:57:152 IBC: Getting main window
ib-gateway_1 | 2023-10-11 15:25:57:152 IBC: Creating main window future
ib-gateway_1 | 2023-10-11 15:25:57:151 IBC: Getting config dialog
ib-gateway_1 | 2023-10-11 15:25:57:160 IBC: Waiting for config dialog future to complete
ib-gateway_1 | 2023-10-11 15:25:58:259 IBC: Detected frame entitled: IBKR Gateway; event=Opened
ib-gateway_1 | 2023-10-11 15:25:58:280 IBC: Detected frame entitled: IBKR Gateway; event=Activated
ib-gateway_1 | 2023-10-11 15:25:58:283 IBC: Detected frame entitled: IBKR Gateway; event=Focused
ib-gateway_1 | Forking :::4000 onto 0.0.0.0:4002

Versions (please complete the following information):

  • OS: Mac Ventura 13.4
  • Docker version: 4.8.1 (78998)
  • Image Tag (docker --version): stable
  • Image Digest (docker images --digests): N/A

Additional context
Add any other context about the problem here.

Segmentation Fault

Describe the bug
I cloned the repo and ran docker-compose up --build but am running into a segmentation fault core dumped error. I'm running on an Apple M2 Pro, 16 GB Memory, etc. How do I address this?

To Reproduce
I cloned the repo and ran docker-compose up --build but am running into a segmentation fault core dumped error. I'm running on an Apple M2 Pro, 16 GB Memory, etc. How do I address this?

Expected behavior
I should be able to build the docker image locally. I tried writing a similar one but still no luck with the seg fault issue.

Container logs

Versions (please complete the following information):

  • OS: Mac
  • Docker version: Docker version 25.0.2, build 29cf629
  • Image Tag (docker --version): [e.g. latest] Just trying to use the latest which is what's pointed to by the docker-compose file
  • Image Digest (docker images --digests):

Additional context
Add any other context about the problem here.

socat connection timed out

After about 4h of running the docker container, and being working perfectly, it starts to log the following message every 5 minutes:

2022/12/22 21:27:11 socat[956] E connect(5, AF=2 127.0.0.1:4000, 16): Connection timed out
2022/12/22 21:32:12 socat[964] E connect(5, AF=2 127.0.0.1:4000, 16): Connection timed out
2022/12/22 21:37:11 socat[973] E connect(5, AF=2 127.0.0.1:4000, 16): Connection timed out
...

Until the nightly reboot happens, which is performed correctly, and it stops logging that time out. Until about 4 hours pass again, and then it logs the same timeout message every 5 minutes:

2022-12-22 23:45:38:448 IBC: Performing port configuration
2022-12-22 23:45:38:807 IBC: TWS API socket port is already set to 4000
2022-12-22 23:45:38:807 IBC: Setting ReadOnlyApi
2022-12-22 23:45:38:808 IBC: Read-Only API checkbox is already set to: false
2022-12-22 23:45:38:820 IBC: Click button: OK
2022-12-22 23:45:39:321 IBC: Detected dialog entitled: DUXXXXXX Trader Workstation Configuration (Simulated Trading); event=Lost focus
2022-12-22 23:45:39:322 IBC: Detected dialog entitled: DUXXXXXX Trader Workstation Configuration (Simulated Trading); event=Deactivated
2022-12-22 23:45:39:323 IBC: Detected dialog entitled: DUXXXXXX Trader Workstation Configuration (Simulated Trading); event=Closed
Forking :::4000 onto 0.0.0.0:4002
remove Client 0
2022/12/23 04:12:13 socat[759] E connect(5, AF=2 127.0.0.1:4000, 16): Connection timed out
2022/12/23 04:17:12 socat[768] E connect(5, AF=2 127.0.0.1:4000, 16): Connection timed out
2022/12/23 04:22:11 socat[778] E connect(5, AF=2 127.0.0.1:4000, 16): Connection timed out
2022/12/23 04:27:12 socat[787] E connect(5, AF=2 127.0.0.1:4000, 16): Connection timed out
...

Any idea why it could be? I have seen that in other repo put the forever option in the socat command, can that be the solution?

And, another question, why is the fork_ports_delayed.sh script necessary? And why is it necessary to run it with a delay of 30s? My knowledge about IBGateway and docker is limited, but I would like to understand the reason for this script. I have also seen that in this other repo they say that with the network_mode: host option of docker this file is no longer necessary. I do not know if it is true or not, since as I say my knowledge about docker is scarce. But I comment it in case it is of help.

Thank you very much for continuing to maintain this project.

READ_ONLY_API=no is not working

i did start the container with READ_ONLY_API=no in the .env file and added READ_ONLY_API: ${READ_ONLY_API:-}
in the docker-compose.yml

however in the container, this isn't reflected

root@1253ca273743:~# cat /root/ibc/config.ini|grep ReadOnlyApi=
ReadOnlyApi=

Please update config.ini.tmpl file to add the latest features of IBC 3.16.0

Describe the bug
The config.ini.tmpl file in the 'latest' channel does not correspond to the config.ini of IBC 3.16.0. In particular, the config.ini.tmpl does not contain such variables as 'AutoLogoffTime=' and 'AutoRestartTime='.

To Reproduce
Please, I kindly ask you to update the config.ini.tmpl to match the config.ini of IBC 3.16.0 in terms of variables so that all the new features of IBC 3.16.0 can be used. Many thanks!

Additional context
Great project, thank you!

Package tag staleness

Describe the bug
Stable is currently 10.22.2a and Latest currently 10.23.2b but tags are behind so the versions running in the images differ

I see branches and PRs for the correct versions but sees those haven't made their way into images yet.

To Reproduce

% docker run --pull always -it ghcr.io/unusualalpha/ib-gateway:stable ls -al /root/Jts/ibgateway
stable: Pulling from unusualalpha/ib-gateway
Digest: sha256:7d5c3e5d0e49197f7abeab871d6c48e43996de8177d7cac2262cba0795367603
Status: Image is up to date for ghcr.io/unusualalpha/ib-gateway:stable
total 12
drwxr-xr-x 3 root root 4096 Jan 19  2023 .
drwxr-xr-x 3 root root 4096 Jan 19  2023 ..
drwxr-xr-x 5 root root 4096 Jan 19  2023 10.19.1j
%

connection refused on the latest version

Describe the bug
I am getting connection refused on the latest version trying to login to a paper trading account. The stable version works just fine.

Container logs
ib-gateway_1 | 2023-06-18 18:18:43:807 IBC: Detected frame entitled: IBKR Gateway; event=Activated
ib-gateway_1 | 2023-06-18 18:18:43:816 IBC: Detected frame entitled: IBKR Gateway; event=Focused
ib-gateway_1 | 2023-06-18 18:18:43:818 IBC: Detected frame entitled: IBKR Gateway; event=Opened
ib-gateway_1 | 2023/06/18 18:18:56 socat[217] E connect(5, AF=2 127.0.0.1:4000, 16): Connection refused
ib-gateway_1 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ib-gateway_1 | 2023-06-18 18:19:40:953 IBC: IBC closing after TWS/Gateway failed to display login dialog
ib-gateway_1 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ib-gateway_1 | 2023-06-18 18:19:40:953 IBC: Exiting with exit code=1112
ib-gateway_1 | IBC returned exit status 88
ib-gateway_1 | IBC will restart shortly

Versions (please complete the following information):

  • OS: Ubuntu 22

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.