Keyboard Shortcuts
Likes
- Ibcalpha
- Messages
Search
Re: gatewaystart.sh is opening two gateway windows
Dear Mr.King,?
I appreciate the timely response! I will attach the log results along with a screenshot of my local computer after completing the dual authentication, you can see the second window it opens behind it. Any insight is much appreciated, thank you! ?
P.S For some reason the screenshot looks different than the actual screen, the window was black as per usual. Nothing wrong visually on my end...
?
? |
Re: gatewaystart.sh is opening two gateway windows
开云体育I can absolutely guarantee that there is no way that gatewaystart.sh would start two instances of Gateway, and you haven’t provided any evidence or illustrations of what you mean. ? So please do this: ?
? Richard |
gatewaystart.sh is opening two gateway windows
A little bit of background, my instance of IBC is installed on virtual machine which automatically opens an tmux session which has an env session ran within it.?
?
The reason I am doing this is because I want IBC ?to run in the background void of any windows on my local computer.?
?
I tried to run the gatewaystart.sh file on its own via ./gatewaystart.sh within this environment and still got two windows, indicating that the issue lies within this file.?
The second window only opens after I finish the dual authentication on my phone after successfully logging in. This leaves me with an operational instance and one which is simply on the login screen. I am unsure what to do.?
?
Any insight or potential solutions is much appreciated .
?
P.S Apologies for the briefness of my last post. I attempted to elaborate here as much as I can.? |
Two IB Gateway Windows are Opening..
The sequence shows that the initial IB Gateway session opens a single window and prompts me to complete the dual authentication. Once I complete said authentication, then it logs me in on one of the gateway sessions and keeps the other session on the login screen. Any insight is much appreciated.? |
Re: Help with jre 21 & BNC 3.20
开云体育I don’t have any suggestions to make. ? Let me clarify something. IBC is behaving exactly as it should here. It is expecting Gateway to display the login dialog within the specified timeout period. If it doesn’t happen within that time, IBC closes down and the IBC script restarts it. There is a reason for this: in rare circumstances, some condition in the IB servers prevents the login dialog being displayed, but trying again succeeds. I’ve no idea what the cause of this is, or even whether it still happens (other than the large initial download, as mentioned before), but when it does happen IBC’s restart mechanism means the login automation is not broken. ? But clearly you aren’t in this large download scenario, and it is something else that is preventing Gateway displaying the login dialog. That ‘something’ cannot be IBC. As I said before, it’s possibly something to do with the JavaFX setup, because displaying the login dialog is the first thing that uses JavaFX. ? Actually I do have one suggestion: when Gateway runs, it writes log entries to an unencrypted text file called launcher.log, which you should find in /home/ibgateway/Jts. There may well be some information about what’s happening recorded there. ? I’m sorry I can’t be more help. ? Richard |
Re: Help with jre 21 & BNC 3.20
Richard, even with increasing value to 120 seconds it's blocked on this step :-(? 2024-12-31 08:58:00:753 IBC: Waiting for config dialog future to complete 2024-12-31 08:58:00:756 IBC: Getting config dialog 2024-12-31 08:58:00:756 IBC: Waiting for config dialog future to complete 2024-12-31 08:58:00:757 IBC: Getting main window 2024-12-31 08:58:00:758 IBC: Creating main window future |
Re: Help with jre 21 & BNC 3.20
Hi Richard, I hope you had a great Christmas ! And I also wish you a wonderful upcoming New Year's Eve celebration. Apologies for the delayed response—I was spending time with family over the holidays. Thank you for your detailed explanation regarding the exit code 1112 in the IBC logfile.? I will rebuild the Docker image with the Thanks again for your support! Best regards, |
Re: IBC Closing after TWS/Gateway failed to display login dialog
@Jonathan - will try onceI am back from the holidays. I am also expecting a RPi 5000 based desktop which I will use for configuring a stable version of the Gateway.
My current configuration is being tested in the simulation environment and I am hoping to go live 2nd week of Jan. Will keep you updated. |
Re: Help with jre 21 & BNC 3.20
开云体育Sorry, I saw this on Sunday and then completely forgot about it. ? The exit code 1112 in your IBC logfile occurs when the Gateway login dialog has not been displayed within the time specified in LoginDialogDisplayTimeout in config.ini. ? The most likely cause of this (if it was working before) is that this timeout is too short. When it starts up, Gateway downloads a ton of stuff, including the JxBrowser web browser. For a low-power machine like a Pi, it may just not be able to process this stuff quickly enough. So try increasing the value, perhaps to 90 secs, or even longer if that doesn’t help. ? If extending the timeout doesn’t help no matter what value you use, it probably means that there is something not right about the JavaFX setup. ? Richard ? ? ? From: [email protected] <[email protected]> On Behalf Of Jonathan S via groups.io
Sent: 22 December 2024 23:15 To: [email protected] Subject: Re: [ibc] Help with jre 21 & BNC 3.20 ? Richard, Manish Here’s the latest version of my Dockerfile. I’ve kept the The image uses BellSoft’s JDK: The build completes successfully, and the container starts up fine. However, I’m encountering an issue where IBC seems to be stuck in a loop. I’ve attached the log file from the Docker container to provide more context. I’m unsure what’s causing this behavior and would appreciate your thoughts on what might be going wrong. Best regards, |
Re: IBC Closing after TWS/Gateway failed to display login dialog
On Sat, Dec 21, 2024 at 05:43 PM, <manish.p.mahajan@...> wrote:
JAVA_PATH in gatewaystart.sh to JAVA_PATH=/usr/lib/jvm/bellsoft-java11-full-aarch64/bin ?
Manish could you try with this version and see if it still works ? Thanks a lot?
https://download.bell-sw.com/java/11.0.25+11/bellsoft-jdk11.0.25+11-linux-aarch64.tar.gz |
Re: Help with jre 21 & BNC 3.20
Richard, Manish Here’s the latest version of my Dockerfile. I’ve kept the The image uses BellSoft’s JDK: The build completes successfully, and the container starts up fine. However, I’m encountering an issue where IBC seems to be stuck in a loop. I’ve attached the log file from the Docker container to provide more context. I’m unsure what’s causing this behavior and would appreciate your thoughts on what might be going wrong. Best regards, |
Re: Help with jre 21 & BNC 3.20
Richard, Gonzalo is just the creator and maintener of the docker image we (you and I) know -> And more precisely I am using the aarch64 branch of the dockerfile -> ? I speak sometimes with Gonzalo on Discord . Practically speaking, you’re absolutely right that IB Gateway and IBC were built for Java 8, I? just wanted to test until which version I could upgrade jre and keeping things working? Jonathan? |
Re: Help with jre 21 & BNC 3.20
开云体育Jonathan ? You (and others) refer to ‘Gonzalo’s Docker image’, but without any explanation as to who Gonzalo is and where his Docker image is to be found. Please fill me in. ? I need to point out that there is no benefit as far as IBC and Gateway are concerned in trying to upgrade to ‘the latest possible JRE version’. The simple fact is that both Gateway and IBC are built using Java 8: neither use any feature from later Java versions. I develop IBC with the same JRE as IBKR do for Gateway and TWS, because it means I can rely on the identical version in all IBC instances, thus potentially avoiding problems where different users use different versions. IBKR has used the same version of Java 8 for several years now, presumably for much the same reason. If they were to switch to a later version they would end up with possible support nightmare: whether this would actually be the case is debatable, but for many years it was the user’s responsibility to maintain their own JRE installation: I suspect that was a bad experience for IBKR, and the current mechanism, where the same JRE they use is automatically included by the installer and any other JRE on the machine is ignored, made life simpler for them. ? It’s possible that eventually there’ll be some new feature in a later Java version that IBKR can’t do without, and then they’ll feel the need to develop against that version and adjust the installer according (and face the support problems that will occur when the two get out of step). But they show no signs of this at the moment. Presumably Java 8 does everything they need. But ?if and when this happens, then I’ll switch to the same JRE for IBC. ? Richard |
Re: Help with jre 21 & BNC 3.20
Hi Richard and Manish, I'm really glad to see that my project has sparked your interest! @Manish: I believe you were referring to my setup when you mentioned running IB Gateway in a Docker container. For the past 10 months, I've been using Gonzalo's Docker image, which utilizes BellSoft JRE 11. Specifically, I'm running:
This setup has been running smoothly without any issues for months now on my raspi. If you need assistance, I'd be more than happy to help you build and run the Docker image on your Raspberry Pi. Running the gateway in a Docker container offers several advantages over running it directly on the host, such as:
However, what I'm aiming to do is upgrade this image to use the latest possible JRE version, along with updating to IB_GATEWAY_VERSION=10.30.1s and IBC_VERSION=3.20.0. My goal is to ensure that the gateway and IBC are running on the most recent and compatible software versions to take advantage of new features and improvements. I'm truly excited to connect with others working on similar setups because, since the beginning of 2024, I've felt quite alone in running IB Gateway and IBC on a Raspberry Pi! It's great to have a community to collaborate with and share experiences. Feel free to reach out if you need any help or if you'd like to collaborate on improving the Docker image. Best regards, |
Re: Help with jre 21 & BNC 3.20
开云体育I’m really glad to hear you got it working. Well done! ? I’ve just ordered myself a Pi 5. I read a review in the UK PCPro magazine this morning and was quite impressed by how they’ve progressed over the years. ? It will be useful in future for making sure IBC continues to work on ARM (assuming I can replicate your success…). I probably won’t use it for running TWS for real, as I don’t want to have yet another computer that has to be powered on 24x7 (even if it is only a few watts). ? No, I’m not working on a Docker image myself, but various other people are. Of these, the one that seems most promising to me is this one: ? ? I haven’t used it myself yet, so this is not an ‘official’ endorsement, but the author has clearly put a lot of work into it and appears to have taken account of the various desiderata I expressed some time ago for what an IBC Docker should provide. ? Richard ? |
Re: IBC Closing after TWS/Gateway failed to display login dialog
Hi Richard - thanks very much for your quick and helpful response.
1. The command you provided was able to launch the standalone gateway successfully! This gave me heart to proceed with 2. below despite your notes of caution (I promised myself that I would only spend a few hours!) 2. I tried to fix the Java FX problem and am happy to report that I was able to make IBC work. I am now running it through a few days and will report back. These are the steps I followed:
a)? Dowloaded the Bellsoft Liberica JDK from ? b) Installed it using dpkg
c) Changed JAVA_PATH in gatewaystart.sh to JAVA_PATH=/usr/lib/jvm/bellsoft-java11-full-aarch64/bin
It works!
I ultimately ended up pretty much replicating the steps described in - found it immensely helpful. Thanks very much and Happy Holidays Manish |
Re: IBC Closing after TWS/Gateway failed to display login dialog
开云体育The pre-packaged JRE is irrelevant. The IBKR installer includes a script to run Gateway that uses the pre-packed JRE, and it also caters for using another JRE, but there’s no reason why you have to run it using that script. ? All you need is the right Java command to run the Gateway JAR files. And I posted that command in the other thread you spoke on today. Here it is again, adjusted for your pi username: ? ? java -DjtsConfigDir=/home/pi/Jts -Xmx768m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 -DvmOptionsPath=/home/pi/Jts/ibgateway/1033/ibgateway.vmoptions -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -classpath /home/pi/Jts/ibgateway/1033/jars/jackson-databind-2.12.3.jar:/home/pi/Jts/ibgateway/1033/jars/log4j-api-2.17.1.jar:/home/pi/Jts/ibgateway/1033/jars/twslaunch-1033.jar:/home/pi/Jts/ibgateway/1033/jars/xmlgraphics-commons-2.8.jar:/home/pi/Jts/ibgateway/1033/jars/jackson-core-2.12.3.jar:/home/pi/Jts/ibgateway/1033/jars/jts4launch-1033.jar:/home/pi/Jts/ibgateway/1033/jars/commons-io-2.11.0.jar:/home/pi/Jts/ibgateway/1033/jars/fop-2.8.jar:/home/pi/Jts/ibgateway/1033/jars/jackson-annotations-2.12.3.jar:/home/pi/Jts/ibgateway/1033/jars/jxbrowser-7.41.3.jar:/home/pi/Jts/ibgateway/1033/jars/batik-all-1.16.jar:/home/pi/Jts/ibgateway/1033/jars/jxbrowser-linux64-7.41.3.jar:/home/pi/Jts/ibgateway/1033/jars/jxbrowser-swing-7.41.3.jar:/home/pi/Jts/ibgateway/1033/jars/log4j-core-2.17.1.jar:/home/pi/Jts/ibgateway/1033/jars/total-2023.jar ibgateway.GWClient ? ? Running Gateway standalone won’t actually help if the problem is that the login dialog is not being displayed, but at least it will demonstrate that the problem is not being caused by IBC. That most likely indicates an incomplete JavaFX problem on ARM, but I have no expertise in this area, and no access to an ARM platform to investigate it myself. ? Frankly I’m tempted to just say forget ARM and stick with x64. Everything just works ‘out of the box’. One day someone will crack this on ARM and do a decent write-up of how, but at present it seems we’re not there, and if you don’t have the expertise to move this forward yourself, you could waste a lot of your (and other people’s) time. ? Richard |
IBC Closing after TWS/Gateway failed to display login dialog
I am trying to run IBC(3.20) / Gateway 10.33 on arm64 Debian.? I have downloaded and installed the right JRE and am able to get the gatewaystart.sh script to execute. However it is not able to get past the display of the login dialog. It is not possible for me to test the standalone execution of the Gateway because the pre-packaged JRE does not work on ARM.
I am attaching the log file and will be grateful for any help. I am migrating from Saxo to IBKR and am not very familiar with Java. Thanks Manish? |