Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue during maintenance window #264

Open
ghost opened this issue Aug 9, 2024 · 2 comments
Open

Issue during maintenance window #264

ghost opened this issue Aug 9, 2024 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 9, 2024

Hello,

This morning I my ibc seemed to crash and I'm not sure why. Could I get some help with this? I've attached a screenshot of the exception received.

‏لقطة الشاشة ٢٠٢٤-٠٨-٠٩ في ٠٨ ٠٥ ٠١
@rlktradewright
Copy link
Member

You need to post the whole IBC logfile, not just the bit you see on the screen. Attach it to your reply (don't quote it inline).

The exception is misleading. What has actually caused the shutdown is the Login Error dialog displayed by TWS at 04:40:11:681. When IBC encounters this all it can do is restart, so it attempts to close down TWS/Gateway tidily and exit, so that the script can re-start IBC which will then result in full authentication (with 2FA if this is a live account). Unfortunately there is evidently a bug in the closedown routine, and that's what is throwing the exception.

So the reason the Login Error dialog was displayed is entriely a amatter for IBKR. IBC is not the cause of it, it's just reacting to the fact that TWS has displayed it. If I had the full logfile, I might be able to deduce something because it contains a mass of useful information that is often helpful in diagnosing these things, but without that there's nothing I can say.

If for some reason you';re not using an IBC logfile, then this is a direct demonstation of why that's a bad idea. Without it I've no idea what IBC has been doing or how you've configured it. For example, at the most basic level I don't even know any of the following:

  • whether you're running TWS or Gateway
  • which version of TWS/Gateway you're using
  • which version of IBC you're using
  • whether this is live or paper-trading
  • which operating system you're using
  • how long IBC has been running
  • has there just been an auto-restart
  • has there just been an IBKR server reset
  • and much more besides

What I will do is investigate and fix the problem with the tidy closedown. At least then, if this happens again, everything will restart automatically.

@rlktradewright
Copy link
Member

I've fixed the problem that caused the exception report. I'll publish a new release shortly containing this fix: version 3.20.0.

While doing this, I realised that the reason for the Login Error dialog is that the login credentials have expired or been invalidated. The usual reason for this is allowing TWS/Gateway to run right through the weekend without a complete shutdown and restart, which IBKR requires - see the note entitled Auto-Restart limitations and Cold Restart in config.ini.

There may be other reasons why IBKR would invalidate your credentials, but I have no further information about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant