IbcAlpha / IBC

Automation of Interactive Brokers TWS. You can download the latest release here: https://github.com/ibcalpha/ibc/releases/latest
GNU General Public License v3.0
974 stars 174 forks source link

Issue with not populating login/password; manual login causes crashing of ibgateway #211

Closed sharpkids closed 1 year ago

sharpkids commented 1 year ago

I am experiencing a weird issue with 3.16.2 and IBGateway 10.22 where IBC would not automatically log in (login/password not automatically populated) and if I try to login manually, I can see IBGateway continuing to load and then it crashes. This set up worked well for over a year and I can't pinpoint any changes on my side except updated IBC/IBGateway versions). I tried supplying username/password to ibcstart.sh via command arguments instead of config.ini, also tried older versions of IBC but nothing helped so far and I am not sure what else to try. If I replace a call to ibcstart.sh and start ibgateway directly, I can manually log in just fine and everything works without crashing.

ibc.log

rlktradewright commented 1 year ago

See #206, and use the updated IBC.jar and version files.

I've been intending to do a new release ever since then, but haven't quite got round to it yet! Must do so soon...

sharpkids commented 1 year ago

Will try that, thank you!

sharpkids commented 1 year ago

Just tried that, now getting a different error from IBC: Could not find or load main class ibcalpha.ibc.IbcGateway. I am trying to run it in a docker using headless image with x11vnc.

Here is the log: ibc1.log

sharpkids commented 1 year ago

Tried it with TigerVNC but that didn't help: tigervnc.log

rlktradewright commented 1 year ago

[Please can I ask you in future to attach log files rather than quote them inline - quoting them makes the posts very unwieldy, and if they're attached as files it's much easier to do things like comparing them with other files. Also always attach the whole of a log for a run, not just extracts.]

This problem is nothing to do with vnc, so trying different versions of that is not going to make any difference.

The error message means that IBC.jar is not in the location that it's supposed to be. You haven't supplied a value for the --ibc-path argument, so it defaults to /opt/ibc. It appears that IBC.jar is not there.

I've just uploaded a new IBC.jar version 3.16.4-beta.2 to the repository, so you might as well download it from https://github.com/IbcAlpha/IBC/tree/master/resources. Make sure you put it in /opt/ibc, and also ensure you set execute permission. Also please make sure the version file (also in /opt/ibc) contains just the version number, ie 3.16.4-beta.2.

sharpkids commented 1 year ago

OK, thank you, I will try that shortly. The reason I decided to try TigerVNC is actually due to your comment :) https://github.com/IbcAlpha/IBC/issues/210#issuecomment-1523108902

sharpkids commented 1 year ago

Sorry for the delay, I was unable to complete this yesterday. I have now confirmed that the 3.16.4-beta.2 resolves this issue. Thanks again!

rlktradewright commented 1 year ago

Let's be clear here: there is nothing in the 3.16.4-beta.2 that would have made the sligtest difference. The problem was that you didn't do the previous 3.16.3 upgrade properly, so either IBC.jar wasn't there at all, or you hadn't set execute permission on it. Presumably you have now done it correctly with 3.16.4-beta.2, and that's the only reason it is now working: there are changes in 3.16.4-beta.2, but they are only relevant if you're using the FIX Gateway rather than the standard Gateway, and you aren't.

3.16.3 works perfectly with Gateway 10.22. I use it all day every day.

sharpkids commented 1 year ago

OK, sounds good. I am closing this issue now.