Git Product home page Git Product logo

ib-gateway-docker-gcp's People

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

Watchers

 avatar  avatar  avatar

ib-gateway-docker-gcp's Issues

Login not working: E connect(5, AF=2 127.0.0.1:4001, 16): Connection refused

v978

Since today I get the following error:

------------------------------------------------------------
2022-04-28 10:33:25:694 IBC: Using default settings provider: ini file is /root/IBController/IBController.ini
2022-04-28 10:33:25:694 IBC: Using default login manager: getting username and password from args
2022-04-28 10:33:25:694 IBC: Using default main window manager: constructor parameter isGateway=true
2022-04-28 10:33:25:694 IBC: Using default trading mode manager: constructor parameter args: tradingMode=live
2022-04-28 10:33:25:695 IBC: Using default config dialog manager
2022-04-28 10:33:25:700 IBC: CommandServer is not started because the port is not configured
2022-04-28 10:33:25:831 IBC: TWS Settings directory is: /root/Jts
2022-04-28 10:33:25:840 IBC: Ensuring /root/Jts/jts.ini contains required minimal lines
2022-04-28 10:33:25:841 IBC: Found setting: [Logon]/s3store=true
2022-04-28 10:33:25:842 IBC: Found setting: [Logon]/Locale=en
2022-04-28 10:33:25:842 IBC: Found setting: [Logon]/displayedproxymsg=1
2022-04-28 10:33:25:842 IBC: Found setting: [IBGateway]/ApiOnly=true
2022-04-28 10:33:25:842 IBC: Confirmed /root/Jts/jts.ini contains required minimal lines
2022-04-28 10:33:26,843 INFO success: ibdies entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-04-28 10:33:26,844 INFO success: ibcontroller entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-04-28 10:33:26,844 INFO success: socat_live entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-04-28 10:33:26,844 INFO success: socat_paper entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-04-28 10:33:29:773 IBC: Detected frame entitled: IB Gateway; event=Activated
2022-04-28 10:33:29:781 IBC: Detected frame entitled: IB Gateway; event=Opened
2022-04-28 10:33:29:782 IBC: Setting Trading mode = live
2022-04-28 10:33:29:920 IBC: Click button: Log In
2022-04-28 10:33:30:913 IBC: Detected frame entitled: Loading...; event=Activated
2022-04-28 10:33:30:931 IBC: Detected frame entitled: Loading...; event=Opened
2022-04-28 10:33:30:931 IBC: Found Gateway main window
2022-04-28 10:33:30:931 IBC: Minimizing main window
2022-04-28 10:33:31:502 IBC: Detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Activated
2022-04-28 10:33:31:505 IBC: Detected frame entitled: Connecting to server (trying for another 19 seconds)...; event=Opened
2022-04-28 10:33:33:351 IBC: Detected dialog entitled: null; event=Activated
2022-04-28 10:33:33:356 IBC: Detected dialog entitled: null; event=Opened
2022/04/28 10:41:57 socat[168] E connect(5, AF=2 127.0.0.1:4001, 16): Connection refused
2022/04/28 10:42:13 socat[169] E connect(5, AF=2 127.0.0.1:4001, 16): Connection refused

/root/Jts/*encrypted-dir*/ibgateway.date.time.aaa.ibenc logs blow up the disc

After 1 week of usage, there is a large amount of logging wasting space:

4.0K    nia2.lck
4.0K    nia2.log
4.0K    nia2.properties
4.0K    nia2.properties.bak
4.0K    nia2.script
4.0K    nia2.script.bak
4.0K    nia2.tmp
4.0M    ibgateway.20200420.193720.aaa.ibenc
6.5M    language.jar
55M     ibgateway.20200420.075025.aaa.ibenc
56M     ibgateway.20200419.232914.aaa.ibenc
57M     ibgateway.20200416.012330.aaa.ibenc
57M     ibgateway.20200416.073235.aaa.ibenc
61M     ibgateway.20200415.191743.aaa.ibenc
61M     ibgateway.20200416.195820.aaa.ibenc
62M     ibgateway.20200417.041947.aaa.ibenc
62M     ibgateway.20200419.164017.aaa.ibenc
63M     ibgateway.20200414.055821.aaa.ibenc
64M     ibgateway.20200415.043744.aaa.ibenc
67M     ibgateway.20200414.185312.aaa.ibenc
83M     ibgateway.20200416.135640.aaa.ibenc
89M     ibgateway.20200415.120932.aaa.ibenc
98M     ibgateway.20200414.132206.aaa.ibenc
101M    ibgateway.20200420.133037.aaa.ibenc
363M    ibgateway.20200417.103500.aaa.ibenc
555M    ibgateway.20200419.075736.aaa.ibenc
1.1G    ibgateway.20200418.155441.aaa.ibenc
1.3G    ibgateway.20200418.001226.aaa.ibenc

So, this is almost a gig of encrypted (and therefore unreadable) logs per day. Yuck!

Path on Google Container-Optimized OS: /mnt/stateful_partition/var/lib/docker/overlay2/*encrypted-name*/diff/root/Jts/

Error: Could not find or load main class

Upon running docker-compose up, I ran into Error: Could not find or load main class. The full log is as below:

tws_1   | 2021-01-31 10:44:09,703 INFO spawned: 'ibcontroller' with pid 196
tws_1   | 
tws_1   | ================================================================================
tws_1   |
tws_1   | Starting IBC version  on 2021-01-31 at 10:44:09
tws_1   |
tws_1   | Operating system: Linux 44a52400c769 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
tws_1   |
tws_1   | Arguments:
tws_1   |
tws_1   | TWS version = 978
tws_1   | Entry point = ibcalpha.ibc.IbcGateway
tws_1   | --tws-path = /root/Jts
tws_1   | --tws-settings-path = /root/Jts
tws_1   | --ibc-path = /opt/IBController
tws_1   | --ibc-ini = /root/IBController/IBController.ini
tws_1   | --mode = paper
tws_1   | --java-path = /opt/i4j_jres/1.8.0_152-tzdata2019c/bin
tws_1   | --user = ***
tws_1   | --pw = ***
tws_1   | --fix-user =
tws_1   | --fix-pw =
tws_1   |
tws_1   | =================================
tws_1   | Generating the classpath
tws_1   | Classpath=/root/Jts/ibgateway/978/jars/jts4launch-978.jar:/root/Jts/ibgateway/978/jars/locales.jar:/root/Jts/ibgateway/978/jars/log4j-api-2.5.jar:/root/Jts/ibgateway/978/jars/log4j-core-2.5.jar:/root/Jts/ibgateway/978/jars/total-2018.jar:/root/Jts/ibgateway/978/jars/twslaunch-978.jar:/root/Jts/ibgateway/978/jars/twslaunch-install4j-1.9.jar:/opt/IBController/IBC.jar
tws_1   |
tws_1   | Generating the JAVA VM options
 -XX:+ExitOnOutOfMemoryErrorPercent=45
tws_1   |
tws_1   | Determining the location of java executable
tws_1   | Location of java executable=/opt/i4j_jres/1.8.0_152-tzdata2019c/bin
tws_1   |
tws_1   | Starting Gateway with this command:
tws_1   | "/opt/i4j_jres/1.8.0_152-tzdata2019c/bin/java" -cp "/root/Jts/ibgateway/978/jars/jts4launch-978.jar:/root/Jts/ibgateway/978/jars/locales.jar:/root/Jts/ibgateway/978/jars/log4j-api-2.5.jar:/root/Jts/ibgateway/978/jars/log4j-core-2.5.jar:/root/Jts/ibgateway/978/jars/total-2018.jar:/root/Jts/ibgateway/978/jars/twslaunch-978.jar:/root/Jts/i ibcalpha.ibc.IbcGateway "/root/IBController/IBController.ini" *** *** paper
tws_1   |
tws_1   | Error: Could not find or load main class
tws_1   | Gateway finished
tws_1   |
tws_1   | 2021-01-31 10:44:09,899 INFO exited: ibcontroller (exit status 1; not expected)

Any idea on why this error has occurred?

Allowing IBC to change Read-Only API mode

Your README says

IBC has decided not to support switching off the Read-Only checkbox (on by default) on the API Settings page.

However, this was changed in in a recent commit: IbcAlpha/IBC@ecb6f3d#diff-c8d8d62a34800f1c969ec30de080d73cb3d46a102c697d8d4b942e973c615f6f

Editing IBCLinux-3.8.2/config.ini to say ReadOnlyApi=no takes no effect, though. A newly built container will start in the read only mode, regardless of how config.iniends up.

What must one change to have this config file read in?

I see supervisord.conf calls /opt/IBController/scripts/ibcstart.sh. Should it call something else? The first comment in this file suggests that it be called from something else, and that it not be edited:

Note that this command file is a 'service file' intended to be called from
higher level command files. There should be no reason for the end user to modify
it in any way. So PLEASE DON'T CHANGE IT UNLESS YOU KNOW WHAT YOU'RE DOING!

Is this still being maintained?

I noticed the last commit is last year, so I just wanted to clarify if the project is still being actively maintained before using it

Cheers

JRE issue

Trying to build the image with docker build . and getting this error. I also tried with the predecessor project "IB-Gateway" and got the same error message in the build process. Any ideas of why the bundled JVM wouldn't be matching? Assuming that this would be an issue for everyone?

 => ERROR [11/21] RUN yes n | /opt/TWS/ibgateway-stable-standalone-linux-  4.8s
------
 > [11/21] RUN yes n | /opt/TWS/ibgateway-stable-standalone-linux-x64.sh:
#15 1.997 Unpacking JRE ...
#15 4.317 Error unpacking jar files. The architecture or bitness (32/64)
#15 4.317 of the bundled JVM might not match your machine.
------
executor failed running [/bin/sh -c yes n | /opt/TWS/ibgateway-stable-standalone-linux-x64.sh]: exit code: 1

/usr/bin/xvfb-run: 184: 0: not found

I'm running a modified version of this, and whenever I try to docker-compose up --build everything, I keep getting the error /usr/bin/xvfb-run: 184: 0: not found. Here's a snippet of the output:

ib_logger_app | 2020-12-30 18:29:51,539 INFO spawned: 'ibdies' with pid 8
ib_logger_app | 2020-12-30 18:29:51,543 INFO spawned: 'ibcontroller' with pid 9
ib_logger_app | 2020-12-30 18:29:51,545 INFO spawned: 'socat_live' with pid 10
ib_logger_app | 2020-12-30 18:29:51,548 INFO spawned: 'socat_paper' with pid 11
ib_logger_app | /usr/bin/xvfb-run: 184: 0: not found
ib_logger_app | 2020-12-30 18:29:51,662 INFO exited: ibcontroller (exit status 127; not expected)
ib_logger_app | 2020-12-30 18:29:52,678 INFO success: ibdies entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ib_logger_app | 2020-12-30 18:29:52,680 INFO spawned: 'ibcontroller' with pid 52
ib_logger_app | 2020-12-30 18:29:52,680 INFO success: socat_live entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ib_logger_app | 2020-12-30 18:29:52,680 INFO success: socat_paper entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
ib_logger_app | /usr/bin/xvfb-run: 184: 0: not found
ib_logger_app | 2020-12-30 18:29:52,753 INFO exited: ibcontroller (exit status 127; not expected)
ib_logger_app | 2020-12-30 18:29:54,758 INFO spawned: 'ibcontroller' with pid 93
ib_logger_app | /usr/bin/xvfb-run: 184: 0: not found
ib_logger_app | 2020-12-30 18:29:54,837 INFO exited: ibcontroller (exit status 127; not expected)
ib_logger_app | 2020-12-30 18:29:57,842 INFO spawned: 'ibcontroller' with pid 134
ib_logger_app | /usr/bin/xvfb-run: 184: 0: not found
ib_logger_app | 2020-12-30 18:29:57,920 INFO exited: ibcontroller (exit status 127; not expected)
ib_logger_app | 2020-12-30 18:29:58,921 INFO gave up: ibcontroller entered FATAL state, too many start retries too quickly
ib_logger_app | 2020-12-30 18:29:59,932 WARN ibdies: has entered the UNKNOWN state and will no longer receive events, this usually indicates the process violated the eventlistener protocol
ib_logger_app | 2020-12-30 18:29:59,932 WARN received SIGTERM indicating exit request
ib_logger_app | 2020-12-30 18:29:59,932 INFO waiting for ibdies, socat_live, socat_paper to die
ib_logger_app | 2020-12-30 18:29:59,933 INFO stopped: socat_paper (exit status 143)
ib_logger_app | 2020-12-30 18:29:59,934 INFO stopped: socat_live (exit status 143)
ib_logger_app | 2020-12-30 18:30:00,936 INFO stopped: ibdies (terminated by SIGTERM)
ib_logger_app | 2020-12-30 18:30:02,199 INFO Set uid to user 0 succeeded
ib_logger_app | 2020-12-30 18:30:02,202 INFO supervisord started with pid 6
ib_logger_app | 2020-12-30 18:30:03,204 INFO spawned: 'ibdies' with pid 8
ib_logger_app | 2020-12-30 18:30:03,208 INFO spawned: 'ibcontroller' with pid 9
ib_logger_app | 2020-12-30 18:30:03,210 INFO spawned: 'socat_live' with pid 10
ib_logger_app | 2020-12-30 18:30:03,213 INFO spawned: 'socat_paper' with pid 11
ib_logger_app | /usr/bin/xvfb-run: 184: 0: not found

Why is this happening? "0" not found? Isn't that set in docker-compose.yml

XVFB_ARGS: "-ac -screen 0 1024x768x16 +extension RANDR"

/opt/IBController/scripts/ibcstart.sh: not found

Upon running docker-compose up, I got the following error.

tws_1   | 2021-01-24 15:04:00,614 INFO Set uid to user 0 succeeded   
tws_1   | 2021-01-24 15:04:00,616 INFO supervisord started with pid 7  
tws_1   | 2021-01-24 15:04:01,621 INFO spawned: 'ibdies' with pid 9  
tws_1   | 2021-01-24 15:04:01,626 INFO spawned: 'ibcontroller' with pid 10  
tws_1   | 2021-01-24 15:04:01,630 INFO spawned: 'socat_live' with pid 11  
tws_1   | 2021-01-24 15:04:01,635 INFO spawned: 'socat_paper' with pid 12  
tws_1   | /usr/bin/xvfb-run: 184: /opt/IBController/scripts/ibcstart.sh: not found  
tws_1   | 2021-01-24 15:04:01,707 INFO exited: ibcontroller (exit status 127; not expected)  
...

ib_insync says it has not been able to locate /opt/IBController/scripts/ibcstart.sh. I then check whether the file ibcstart.sh exists in the /scripts directory and it is there. Any idea why this is causing an issue?

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.