heshiming / ibga

IB Gateway in a headless docker container.
GNU General Public License v3.0
24 stars 3 forks source link

Docker image doesn't run to the end #9

Open ownrepo1s opened 11 months ago

ownrepo1s commented 11 months ago
2023-12-09 16:43:39 chown: cannot access '/home/ibg_settings/exported_logs': No such file or directory
2023-12-09 16:43:39 ------------------------------------------------
2023-12-09 16:43:39  Manager Startup / Sat Dec  9 09:43:39 EST 2023
2023-12-09 16:43:39 ------------------------------------------------
2023-12-09 16:43:39 • starting xvfb (/usr/bin/Xvfb :0 -ac -screen 0 1024x768x16 +extension RANDR) ...
2023-12-09 16:43:39   pid: 63
2023-12-09 16:43:40   display :0 is ready
2023-12-09 16:43:40 • starting x11vnc (/usr/bin/x11vnc -forever -rfbport 5900 -o /var/log/x11vnc.log -display :0 -rfbauth /home/ibg/.vnc/passwd) ...
2023-12-09 16:43:40   pid: 145
2023-12-09 16:43:40 • starting novnc (/opt/noVNC-1.3.0/utils/novnc_proxy --listen 5800 --vnc localhost:5900) ...
2023-12-09 16:43:40   pid: 160
2023-12-09 16:43:40 • starting socat (/usr/bin/socat TCP-LISTEN:4000,fork,reuseaddr TCP:localhost:9000,forever,shut-down) ...
2023-12-09 16:43:40   pid: 172
2023-12-09 16:43:40 ----------------------------
2023-12-09 16:43:40  IB Gateway Installation 1
2023-12-09 16:43:40 ----------------------------
2023-12-09 16:43:40 • will install into /home/ibg
2023-12-09 16:43:45 • will use the existing installer: /home/ibg/ibgateway.sh ...
2023-12-09 16:43:45 • installing ...
2023-12-09 16:43:56 Starting Installer ...
2023-12-09 16:43:58 Welcome to the IB Gateway 10.26 Setup Wizard
2023-12-09 16:43:58 This will install IB Gateway 10.26 on your computer. The wizard will lead
2023-12-09 16:43:58 you step by step through the installation.
2023-12-09 16:43:58 
2023-12-09 16:43:58 Click Next to continue, or Cancel to exit Setup.
2023-12-09 16:43:58 Select the folder where you would like IB Gateway 10.26 to be installed,
2023-12-09 16:43:58 then click Next.
2023-12-09 16:43:58 Where should IB Gateway 10.26 be installed?
2023-12-09 16:43:58 [/home/ibg/Jts/ibgateway/1026]
2023-12-09 16:43:58 Extracting files ...

Looks like it gets stuck at Extracting files...

What do you suggest? I have tried using the official docker image, and also the build.sh. Same issue. Also tried setting the IBGA_EXPORT_LOGS to true, IB_LOGLEVEL=Detail, and looking into the folder /home/ibg_settings/exported_logs, the folder is empty.

Help please! Regards

heshiming commented 11 months ago

If you are running on a mac, bind mount (i.e. mapping a container folder to a host folder) can be real slow in this step, as it's literally unpacking more than tens of thousands of small files. You can try changing the configuration:

volumes:
  - ./run/program:/home/ibg

to

volumes:
  - /home/ibg

The docker engine will create a "volume", which is a virtual disk file. It's much faster than bind mounts. The downside is that the files are not directly visible on your file system. And to upgrade IBG, you have to open up Docker Desktop, locate this particular volume and delete it.

The 'chown' error usually doesn't matter once IBG starts exporting.

ownrepo1s commented 11 months ago

Thank you! That fixed it, yes, on macOS. This can be closed.

Not sure where can i ask this question, so i'll just drop it here. Feel free to move it if necessary. How could i send a reconnect to the market data command to the IBKR Gateway inside the docker? https://github.com/IbcAlpha/IBC/issues/242 I'm referring to something similar to RECONNECTDATA or RECONNECTACCOUNT

Regards

heshiming commented 11 months ago

Well I'm not aware of any "reconnectdata" command. I read somewhere in the official documentation that streaming data subscription is kept during a disconnection. But I couldn't vouch for that. In my own systems, I always resubscribe myself upon a reconnection. The same goes to PnL subscription, which in my experience, is not always reliable either.

If you ask on bigger forums, people would always redirect you to a professional data vendor, like IQFeed.