Keyboard Shortcuts
Likes
Search
IBC not able to authenticate after "Re-login is required"
I have been running TWS in paper trading mode using IBC for a while, last night I configured the TWS to autorestart, it did autorestart correctly as given in the attached log file, but after a few hours TWS threw a "Re-login is required" dialog, IBC tried to re-login but couldn't, and multiple re-logins attempts actually locked me out of the account asking to reset password.
toggle quoted message
Show quoted text
Can someone please explain why in the first place that re-login was required, and why IBC was not able to authenticate it? Below is attached the snippet of logs indicating above, and also is attached the complete log file. Thanks 2024-07-12 23:46:41:632 IBC: Found TWS main window |
开云体育The logfile you attached has a number of peculiarities that I first need to comment on. ? First there is this series of consecutive entries: ? 2024-07-12 09:09:22:953 IBC: Starting TWS ES2 Prism: Error - GLX extension is not supported ??? GLX version 1.3 or higher is required Xlib:? extension "RANDR" missing on display ":1". 2024-07-12 13:09:33:520 IBC: detected frame entitled: Login; event=Opened ? For some reason there is a nearly 4-hour gap between the first and the last. Normally I would expect this interval to be about 3 to 5 seconds. Can you throw any light on this? And can you try to get rid of the error messages regarding the GLX extension?(search online for ‘extension "RANDR" missing on display’). ? The same sequence occurs later at 2024-07-12 19:45:26:152: again a 4-hour gap, at the same point in the start-up phase. Bizarre… ? Also there is the following entry: ? 2024-07-12 19:45:26:063 IBC: Re-starting sessiohe restarted TWS doesn’t runn ? IBC does indeed output this message: IBC: Re-starting session But where does he restarted TWS doesn’t run come from? IBC never outputs this anywhere. Have you tampered with the logfile? ? Regarding your questions: ?
? I’ll try to do this within the next couple of days. ? ? ? ? From: [email protected] <[email protected]> On Behalf Of mubbashirali35@...
Sent: Saturday, July 13, 2024 5:01 PM To: [email protected] Subject: [ibc] IBC not able to authenticate after "Re-login is required" ? I have been running TWS in paper trading mode using IBC for a while, last night I configured the TWS to autorestart, it did autorestart correctly as given in the attached log file, but after a few hours TWS threw a "Re-login is required" dialog, IBC tried to re-login but couldn't, and multiple re-logins attempts actually locked me out of the account asking to reset password.
|
Thanks for the detailed reply, and sure I am looking into that extension RANDR missing.
As for the time difference, could it be due to timezone difference as my system timezone is Eastern which has exactly four hours difference with the UTC? For the "Re-starting sessiohe restarted TWS doesn’t runn", this line could have been tampered by me as I was looking into it on VSCode, might have pasted unknowingly what I was google searching that time, ignore it. Also all of this happened again, TWS triggered relogin required and after excessive failed attempts I am again locked out of my account. While you are looking into IBC's handling of this dialog, is there a way to restrict IBC to stop attempting logins after x number of failures? Thanks! |
开云体育Yes, that time difference must be due to timezone. So the timezone of your computer is America/New_York, as shown in the Java properties listing. But perhaps you have set the timezone in the TWS login options to be UTC? If so, then the start of the ‘time gap’ is presumably when TWS switches your Java VM from America/New_York to UTC. I don’t see any reason why this should cause any problems, but it might be worth doing some runs with TWS and the operating system both running in the same timezone. ? My conjecture yesterday that the ‘relogin required’ might be due to it being Saturday is almost certainly incorrect. My paper-trading system runs all the way through from Sunday evening until restarting at 12:00 the following Sunday, and I’ve never seen ‘relogin required’. ? If this is continuing to happen, it would be very helpful if you could run TWS manually (ie without using IBC), and note exactly what happens (there won’t be a useful logfile when the ‘relogin required’ occurs). It should behave exactly the same way when the Re-Login button is clicked as it does when run in IBC (because clicking that same button is all that IBC does here). But then something different ought to happen to enable or cause the re-login to actually take place, and I need to know what this is and why it isn’t happening when running under IBC. ? I said yesterday that I thought I knew what to do to fix this, but after looking at the code for some time I realise that’s not the case. If I’m unable to make any headway with this, I’ll just have to use a brute force cold restart. For the paper-trading system that wouldn’t be too bad, but for a live system it would be unpleasant because it would mean the user having to do the 2FA alert acknowledgement, which would be unexpected and probably at an inconvenient time. ? Regarding your suggestion of limiting the number of retries, I think that will sit nicely with the cold restart suggestion above. There is in fact a known reason for the ‘relogin required’ dialog to be displayed, which is when login to the same account is attempted at another TWS: IBC does handle this properly, but it cannot tell the difference between this valid reason and whatever is causing yours. IBC’s handling is the same in both cases (ie click the Re-Login button), so if that leads to a Login failed, then IBC could do a cold restart. ? I’ll try to get that done tomorrow (Tuessday). |
开云体育I’ve produced a new IBC version, updated as per yesterday’s post. ? I’ve labelled this as a beta, and I’ve put it on my OneDrive rather than uploading it to GitHub. You can get it here: ? ? All you need to do to use this version is to extract the IBC.jar and version files into your IBC folder, overwriting the existing ones. Then run as normal. ? If this new version encounters the ‘Login failed’ dialog, it should tidily shut down IBC and TWS, then immediately reload IBC and a new TWS instance, and do a full login. ? As I said yesterday, this is not an ideal solution to the underlying issue here, ie the ‘Relogin is required’ message, but until we can get some information about what actually causes that, it will at least keep you going. |
Thanks for getting this done.
?
I am running TWS manually today i.e. without IBC, I'll let you know how do things go with auto-restart functionality and whether I am encountered a relogin is required dialogue etc. Will report back here.
?
Meanwhile I am thinking to discuss this in TWS related groups too, to get an idea what is causing the "relogin is required" |
So I tried running TWS Manually to see what's up with the "Relogin is required" dialogue.
?
I checked around 3AM ET, and that relogin is required dialogue was there, below is the screenshot attached for that. I am guessing this occurs around IB servers daily reset, I am assuming this as I saw some topics having same issue (Relogin is required) while daily reset is happening in the TWS group here. Once I clicked on the relogin button, I encountered login failed dialogue telling me "passwords are case sensitive", screenshot is attached below.
?
What is happening here? What password is it talking about as I am providing none, just clicking the Relogin button.
?
I'll also be posting this in the TWS group to understand what's actually going on here.
?
Thanks.
?
|
开云体育Ok thanks. I guess that proves that this is not an IBC issue, though the update I provided should get you out of the hole it causes. ? I suggest you take this up with IBKR directly (raise a ticket in Account Management). ? It’s not at all appropriate to ask about this on the TWS API group, as this is nothing whatsoever to do with the API. So I’m going to reject your post to that group (I’m a moderator for that group too). ? ? From: [email protected] <[email protected]> On Behalf Of mubbashirali35@...
Sent: Thursday, July 18, 2024 8:28 AM To: [email protected] Subject: Re: [ibc] IBC not able to authenticate after "Re-login is required" ? So I tried running TWS Manually to see what's up with the "Relogin is required" dialogue. ? I checked around 3AM ET, and that relogin is required dialogue was there, below is the screenshot attached for that. I am guessing this occurs around IB servers daily reset, I am assuming this as I saw some topics having same issue (Relogin is required) while daily reset is happening in the TWS group here. Once I clicked on the relogin button, I encountered login failed dialogue telling me "passwords are case sensitive", screenshot is attached below. ? What is happening here? What password is it talking about as I am providing none, just clicking the Relogin button. ? I'll also be posting this in the TWS group to understand what's actually going on here. ? Thanks. ? |