Keyboard Shortcuts
Likes
- Ibcalpha
- Messages
Search
Re: Unable to make private static javax.swing.UIManager$LAFState
开云体育By the way, I noticed that you said “running start_tws.bat”. But IBC doesn’t have a .bat file of that name. Did you mean StartTWS.bat? Or is this another .bat file from somewhere else? |
Re: Unable to make private static javax.swing.UIManager$LAFState
开云体育I can’t possibly tell anything from that. ? Please attach your IBC logfile to your reply (that’s the logfile whose name is shown in the banner window when you start IBC). This file contains a mass of information that can help. ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of kng180@...
Sent: Wednesday, April 3, 2024 10:08 AM To: [email protected] Subject: [ibc] Unable to make private static javax.swing.UIManager$LAFState ? I encounter this error when running start_tws.bat, any idea? java.lang.reflect.InaccessibleObjectException: Unable to make private static javax.swing.UIManager$LAFState javax.swing.UIManager.getLAFState() accessible: module java.desktop does not "opens javax.swing" to unnamed module @3ba9ad43 at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:388) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:364) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:312) at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:203) at java.base/java.lang.reflect.Method.setAccessible(Method.java:197) at feature.search.recorder.JtsMultiLookAndFeel.a(JtsMultiLookAndFeel.java:107) at twslaunch.jclient.login.a.d(a.java:429) at twslaunch.jclient.login.l.a(l.java:450) at jclient.LoginFrame.main(LoginFrame.java:454) at ibcalpha.ibc.IbcTws.startTws(Unknown Source) at ibcalpha.ibc.IbcTws.startTwsOrGateway(Unknown Source) at ibcalpha.ibc.IbcTws.load(Unknown Source) at ibcalpha.ibc.IbcTws.main(Unknown Source) ? |
Unable to make private static javax.swing.UIManager$LAFState
I encounter this error when running start_tws.bat, any idea?
2024-04-03 17:02:49:625 IBC: Starting TWS java.lang.reflect.InaccessibleObjectException: Unable to make private static javax.swing.UIManager$LAFState javax.swing.UIManager.getLAFState() accessible: module java.desktop does not "opens javax.swing" to unnamed module @3ba9ad43
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:388)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:364)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:312)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:203)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:197)
at feature.search.recorder.JtsMultiLookAndFeel.a(JtsMultiLookAndFeel.java:107)
at twslaunch.jclient.login.a.d(a.java:429)
at twslaunch.jclient.login.l.a(l.java:450)
at jclient.LoginFrame.main(LoginFrame.java:454)
at ibcalpha.ibc.IbcTws.startTws(Unknown Source)
at ibcalpha.ibc.IbcTws.startTwsOrGateway(Unknown Source)
at ibcalpha.ibc.IbcTws.load(Unknown Source)
at ibcalpha.ibc.IbcTws.main(Unknown Source)
? |
Re: connection timeouterror
开云体育If I understand you correctly, when you run your live IBC/Gateway, it starts up OK (as per the logfile you sent me), your application (which uses ib_insync) makes a series of API connections to Gateway, and they succeed until another attempt where IBC/Gateway just vanish? ? Here are some suggestions for investigation: ?
? I can’t really suggest anything else. IBC is almost certainly not the cause: if it exits for any reason, it writes something to its logfile first. Besides, once it’s got Gateway going and logon has completed, it doesn’t do anything at all unless Gateway displays a dialog that it’s interested in. And gain, if there was a fault while IBC is processing such a dialog, it would be logged before IBC exits. ? Upgrading to a later version of Gateway might help. ? ? From: [email protected] <[email protected]> On Behalf Of Mark Murari
Sent: Thursday, March 21, 2024 10:44 AM To: [email protected] Subject: Re: [ibc] connection timeouterror ? Spoke too soon. After a unproblematic couple of days, connections were refused from about? 02:30 GMT this morning (but again only on my live account, paper account has worked uninterrupted). |
Re: connection timeouterror
开云体育Oh, sorry, I forgot that I haven’t actually done a new release since pushing the script to GitrHub. ? You’ll find it in ? ? and you’ll also need the commandsend.sh script as well. ? ? ? From: [email protected] <[email protected]> On Behalf Of Mark Murari
Sent: Tuesday, March 19, 2024 6:59 PM To: [email protected] Subject: Re: [ibc] connection timeouterror ? Thanks Richard, appreciate your taking a stab at this, but fingers crossed the issue has not re-appeared since the morning, so no point wasting any further time on this for now. Some points of clarification: addLogConsole must be stdout as it appears with every attempt at client connection but I am not sure. You did however raise one separate and intriguing possibility to improve matters by using stop.sh to gracefully terminate the gateway. However, when I took a closer look, at least at the latest linux version, I found an empty file. Would you be able to point me to a link with a working version somewhere please? |
Re: connection timeouterror
Thanks Richard, appreciate your taking a stab at this, but fingers crossed the issue has not re-appeared since the morning, so no point wasting any further time on this for now. Some points of clarification: addLogConsole must be stdout as it appears with every attempt at client connection but I am not sure. You did however raise one separate and intriguing possibility to improve matters by using stop.sh to gracefully terminate the gateway. However, when I took a closer look, at least at the latest linux version, I found an empty file. Would you be able to point me to a link with a working version somewhere please?
|
Re: connection timeouterror
开云体育Let’s start with the easy stuff: how to shutdown Gateway tidily. Obviously if the GUI is accessible you can just click on the close button, so the question is what to do when that isn’t possible (eg remote headless server). ? There are two options ?
? I’m not quite sure what you mean by your ‘restart script’. ?Is this something you use at the start of the week to get it all going, and then use auto-restart for the rest of the week? Or do you run it every day? Not that it really makes much difference, just want to be clear that I know what you’re doing. Oh, I see that you have AutoRestartTime=08:00 PM in your config.ini, so I guess that answers that question. ? The last line in your logfile says: ? addLogConsole Client 201 ? I’ve no idea what this is, and I can’t find a method with that name anywhere (and neither can CoPilot). Do you know what this is? Being the last entry, it may well have something to do with your problem ? Otherwise, I don’t think there’s anything I can do to help. ? Oh, but wait: it is presumably a message output by Gateway to stdout or stderr: all such messages are redirected to IBC’s logfile. I don’t often use Gateway, but I think it has an option to write its log output to a log tab on the main window. Maybe that is turned on and is causing a problem? Trouble is, I don’t suppose you can see the GUI to check! Can you connect to the GUI with VNC, and turn it off if it is on (there’s not much point in it being on if you can’t see it). ? ? ? From: [email protected] <[email protected]> On Behalf Of Mark Murari
Sent: Tuesday, March 19, 2024 10:10 AM To: [email protected] Subject: Re: [ibc] connection timeouterror ? Thanks Richard. Yes that was the whole logfile. As of this morning I was having the same issues. I invoked my python live trading restart script on the headless server which first attempts to kill any active gateways in case they have become problematic and then invokes the ibc script to restart it (I haven't figured out how to soft terminate the gateway reliably yet). Then the script attempts various client connections (using ib_insync) for different tasks. The first two connections succeeded but the third failed. When I checked to see if the live gateway was up, it wasn't anywhere to be found - so presumably had just crashed of its own accord. Weirdly the same script for paper trading succeeded without a hiccup and is still running smoothly. After several repeat attempts the live trading? finally started to work without hiccups too for reasons that are completely opaque to me. |
Re: connection timeouterror
Thanks Richard. Yes that was the whole logfile. As of this morning I was having the same issues. I invoked my python live trading restart script on the headless server which first attempts to kill any active gateways in case they have become problematic and then invokes the ibc script to restart it (I haven't figured out how to soft terminate the gateway reliably yet). Then the script attempts various client connections (using ib_insync) for different tasks. The first two connections succeeded but the third failed. When I checked to see if the live gateway was up, it wasn't anywhere to be found - so presumably had just crashed of its own accord. Weirdly the same script for paper trading succeeded without a hiccup and is still running smoothly. After several repeat attempts the live trading? finally started to work without hiccups too for reasons that are completely opaque to me.
The only thing that changed prior to the succesful restart are permissions on another machine physically stored elsewhere with IP permissions to connect to the headless server. I disabled these permissions on the server firewalls, so it can no longer connect. Could there have been, however unlikely, a bad actor tunneling via that machine attempting to gain access to my live account which was then blocking attempts from the server to connect?? Separate Q. In the Jts folder I can see another launcher.log (for each day of the week) but should there also separate ones for the live and paper accounts here which are worth investigating? |
Re: connection timeouterror
开云体育I don’t see anything unexpected in this logfile at all. So I’m not sure what the problem is. ? Everything seems to have worked perfectly so far. Is this the whole of the logfile? It seems rather odd that it just ends so abruptly. But certainly IBC seems to be behaving itself. ? When are you getting timeout errors? How do they manifest? ? ? ? From: [email protected] <[email protected]> On Behalf Of Mark Murari
Sent: Monday, March 18, 2024 10:13 PM To: [email protected] Subject: [ibc] connection timeouterror ? Hi Richard - hope you are well.? |
connection timeouterror
Hi Richard - hope you are well.?
Everything working smoothly with the help of IBC on my dual setup until yesterday, and I can still connect to the paper account using the ib_insync API. For the live account I am getting timeout errors. Not sure if its an ibc issue but I thought I would check here first in case there is anything obvious in the ibc log files explaining the failure with the live account. Thanks |
Re: TWS restart error, help !!
开云体育Ok, there’s a couple of things here: ?
? I’ve seen these in other logs now and again, and I don’t know what the cause is – 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 – it may well be a bug in your version that has since been fixed. ?
? 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 |
Re: TWS restart error, help !!
开云体育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 ?? |