Skip to content

Stuck at "IBKR Gateway; event=Focused" Failing to Render Gui Login Window on Headless VM (Version 3.15.0) #322

@ejohns1321

Description

@ejohns1321

I'm trying to run IBC code on my headless VM.

I can run the IBKR ibgateway successfully on my VM.

However, when I run ibc/gatewaystart.sh it stalls on the following line in my log:

"IBKR Gateway; event=Focused"

The following is my sequence of commands that I execute to get the script to start:

Xvfb :1 -ac -screen 0 1024x768x24 &
export DISPLAY=:1
./gatewaystart.sh —java-path=/usr/lib/jvm/java-11-openjdk-amd64 -Djava.awt.headless=false

I've tried running headless equals "false" and "true" but no difference in log occurs.

I believe the issue is that the ibc code attempts to render the log in window, but it cannot either because the JAVA code on my headless VM does not have the necessary files to support gui rendering (Swing/AWT) or because the wrappers do not add the correct flags to enable that segment of Java code. I asked AI about this and it told me, "IBC (IB controller) often needs to "reach inside" swing components to dismiss dialogues, automate buttons, etc. Without special flags, that access is blocked on Java 11, 17, etc."

I tried downloading the source code and using jdb to step through code at runtime, but don't know how to compile the java code.

Here is my log output and code modifications:

Note: I had to modify the wrappers to point to the correct locations of my files and to add more flags to hopefully enable the correct Java flags.

Please give me your github handle if you would like to look at these files to help me.

Thank you.

Log:

https://github.com/ejohns1321/My-IBC/blob/main/ibc-3.15.0_GATEWAY-1037_Wednesday.txt

Code:

https://github.com/ejohns1321/My-IBC/blob/main/gatewaystart.sh

https://github.com/ejohns1321/My-IBC/blob/main/scripts/displaybannerandlaunch.sh

https://github.com/ejohns1321/My-IBC/blob/main/scripts/ibcstart.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions