ib-gateway-docker
ib-gateway-docker copied to clipboard
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
Hey,
first, thank you for this repo!
im having this issue too, any chance you've found a way to solve it?
I also have the problem that its not connecting
I am stuck on this too. Has anyone had any luck?