¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

TWS restart error, help !!


 

every now and then, I will wake up in the morning and see this error. I think TWS has problem restarting itself.? What's the solution for this ??


 

¿ªÔÆÌåÓý

I¡¯ll just say exactly what I said to you on 27 Jan:

?

Send me the IBC logfile¡­

?

(see /g/ibcalpha/message/2206)

?

?

?

From: [email protected] <[email protected]> On Behalf Of linkblock123
Sent: Monday, February 19, 2024 2:34 PM
To: [email protected]
Subject: [ibc] TWS restart error, help !!

?

every now and then, I will wake up in the morning and see this error. I think TWS has problem restarting itself.? What's the solution for this ??


 

Hi Richard, here's the log file. Thanks again for the help


 

¿ªÔÆÌåÓý

Ok, there¡¯s a couple of things here:

?

  1. You¡¯ve probably noticed that the log file is full of lines containing ¡°java.io.IOException: write beyond end of stream¡±. These are errors thrown by TWS when attempting to write to its logfile: the exceptions are written out to StdErr, and they are redirected into the IBC log file.

?

I¡¯ve seen these in other logs now and again, and I don¡¯t know what the cause is ¨C certainly nothing IBC can do anything about. It¡¯s possible they¡¯re due to some incorrect settings in TWS¡¯s settings file, possibly incorrectly set by IBKR.

?

The only suggestion I can make for that is to ensure you have installed the latest version of TWS 1019: this is version 10.19.2i ¨C it may well be a bug in your version that has since been fixed.

?

  1. Regarding the screenshot, I suspect that the problem here is that you¡¯re letting TWS run through Sunday without shutting it down. The rule is that you must shut down TWS completely at some point during Sunday. If you don¡¯t do this, it will try to auto-restart using expired credentials, and then it just defaults to normal full login requiring user id and password to be entered. IBC can¡¯t do this automatically in this case because it thinks it¡¯s in a restart situation, in which case it ignores the login dialog completely.

?

The simplest way to ensure that TWS is closed down on Sunday is to use the ClosedownAt setting in config.ini, like this:

?

ClosedownAt=Sunday 15:00

?

The next release of IBC will contain a new setting that will cause IBC to shut down TWS at a specified time on Sunday (like the above ClosedownAt setting) and then automatically restart it. Full 2FA login will then (of course) be needed, but it means that you wouldn¡¯t need to make arrangements to restart TWS yourself

?

Richard