开云体育

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

Re: help troubleshooting ibc startup script

 

Thanks for your help Jon B

Are you sure that X is actually running on :0 ?

No. I got a bit further on by running a terminal app on the machine, and executing echo $DISPLAY, response was :1. So now ibc starts

I would suggest being explicit when starting X, by setting DISPLAY to :0 there as well.

That sounds like good advice. I haven't been able to figure out how to do that though. If you have any clues, I'd be grateful. It's a Debian 10 machine, with gdm3 display manager

The problem now is that ibc does not fill in the username and password on the IB login screen. I updated to latest gateway, version 10.23. Is anyone else using IB Gateway 10.23 with ibc successfully?

log attached


Re: help troubleshooting ibc startup script

Jon B
 

Are you sure that X is actually running on :0 ?? I would suggest being explicit when starting X, by setting DISPLAY to :0 there as well.






On Mon, Jun 19, 2023 at 4:45?AM <andy@...> wrote:
Hi All

I'm using ibcAlpha (3.16.2) to connect to IB Gateway (10.22). It is configured to start with a cron entry like

0,15,30,45 * * * 1-7 export DISPLAY=:0 && /bin/bash /opt/ibc/gatewaystart.sh
It has been working fine for months, but mid last week stopped starting automatically. If I run

export DISPLAY=:0 && /bin/bash /opt/ibc/gatewaystart.sh
manually, I get an error like

No protocol specified
xterm: Xt error: Can't open display: :0
The output of? ps aux | grep X is

Debian-+ 709 0.0 0.2 649260 48656 tty1 Sl+ 09:58 0:01 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/116/gdm/Xauthority -background none -noreset -keeptty -verbose 3
user 986 0.0 0.3 707324 59720 tty2 Sl+ 09:59 0:01 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

Anyone know what is wrong, or can help me troubleshoot why the startup command is failing please?

cheers Andy


Re: help troubleshooting ibc startup script

 

开云体育

A bit of web searching and it seems likely that you just don’t have the right permissions.

?

I don’t have any expertise in this area, but maybe that hint will help?

?

?

From: [email protected] <[email protected]> On Behalf Of andy@...
Sent: Monday, June 19, 2023 11:26 AM
To: [email protected]
Subject: [ibc] help troubleshooting ibc startup script

?

Hi All

I'm using ibcAlpha (3.16.2) to connect to IB Gateway (10.22). It is configured to start with a cron entry like

0,15,30,45 * * * 1-7 export DISPLAY=:0 && /bin/bash /opt/ibc/gatewaystart.sh

It has been working fine for months, but mid last week stopped starting automatically. If I run

export DISPLAY=:0 && /bin/bash /opt/ibc/gatewaystart.sh

manually, I get an error like

No protocol specified
xterm: Xt error: Can't open display: :0

The output of? ps aux | grep X is

Debian-+ 709 0.0 0.2 649260 48656 tty1 Sl+ 09:58 0:01 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/116/gdm/Xauthority -background none -noreset -keeptty -verbose 3
user 986 0.0 0.3 707324 59720 tty2 Sl+ 09:59 0:01 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

Anyone know what is wrong, or can help me troubleshoot why the startup command is failing please?

cheers Andy


help troubleshooting ibc startup script

 

Hi All

I'm using ibcAlpha (3.16.2) to connect to IB Gateway (10.22). It is configured to start with a cron entry like

0,15,30,45 * * * 1-7 export DISPLAY=:0 && /bin/bash /opt/ibc/gatewaystart.sh
It has been working fine for months, but mid last week stopped starting automatically. If I run

export DISPLAY=:0 && /bin/bash /opt/ibc/gatewaystart.sh
manually, I get an error like

No protocol specified
xterm: Xt error: Can't open display: :0
The output of? ps aux | grep X is

Debian-+ 709 0.0 0.2 649260 48656 tty1 Sl+ 09:58 0:01 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/116/gdm/Xauthority -background none -noreset -keeptty -verbose 3
user 986 0.0 0.3 707324 59720 tty2 Sl+ 09:59 0:01 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

Anyone know what is wrong, or can help me troubleshoot why the startup command is failing please?

cheers Andy


Re: IBC 3.16.2 WSL2 Ubuntu 20.04

 

Recent versions of Ubuntu don't include xterm 'out-of-the-box'. You have to install it yourself. This sort of thing is very common with Linux, and it's very easy to install missing items. Please make a bit more effort to discover things for yourself, rather than be spoon-fed by group members.?

Sent from


Re: IBC 3.16.2 WSL2 Ubuntu 20.04

 

开云体育

Hi Paul,

?

Are you by any chance running the gateway just from a shell? You need to install a GUI and then run the gateway.

?

Pranav

From: [email protected] <[email protected]> On Behalf Of Paul Murawski
Sent: Friday, June 9, 2023 2:48 PM
To: [email protected]
Subject: Re: [ibc] IBC 3.16.2 WSL2 Ubuntu 20.04

?

Okay, so I found out where I went wrong. I did not unzip the file into /opt/ibc/. Now after unzipping the file to /opt/ibc/ and making the script files executable by running? "sudo chmod o+x *.sh */*.sh" in /opt/ibc/, I come to the error of "line 233: xterm: command not found" when running "./gatewaystart.sh". What would this error indicate and how would I fix it?


Re: IBC 3.16.2 WSL2 Ubuntu 20.04

 

Okay, so I found out where I went wrong. I did not unzip the file into /opt/ibc/. Now after unzipping the file to /opt/ibc/ and making the script files executable by running? "sudo chmod o+x *.sh */*.sh" in /opt/ibc/, I come to the error of "line 233: xterm: command not found" when running "./gatewaystart.sh". What would this error indicate and how would I fix it?


Re: IBC 3.16.2 WSL2 Ubuntu 20.04

 

开云体育

Well there you go, you haven’t given the scripts execute permission.

?

The User Guide tells you how to do this.

?

?

From: [email protected] <[email protected]> On Behalf Of Paul Murawski
Sent: Thursday, June 8, 2023 9:02 PM
To: [email protected]
Subject: [ibc] IBC 3.16.2 WSL2 Ubuntu 20.04

?

Hello, after downloading, unzipping and installing IBC. I run into an issue when starting gatewaystart.sh. The error that I am getting is

?

gatewaystart.sh: 193: [[: not found

gatewaystart.sh: 195: [[: not found

-e Error: no execute permission for scripts in /opt/ibc/scripts

?

Help on this matter would be greatly appreciated.


IBC 3.16.2 WSL2 Ubuntu 20.04

 

Hello, after downloading, unzipping and installing IBC. I run into an issue when starting gatewaystart.sh. The error that I am getting is

?

gatewaystart.sh: 193: [[: not found

gatewaystart.sh: 195: [[: not found
-e Error: no execute permission for scripts in /opt/ibc/scripts
?
Help on this matter would be greatly appreciated.


Re: WSL2 Ubuntu 20.04 Installed IBC 3.16.2 through wget - Cannot locate the directory

 

开云体育

What directory?

?

From: [email protected] <[email protected]> On Behalf Of Paul Murawski
Sent: Thursday, June 8, 2023 4:05 PM
To: [email protected]
Subject: [ibc] WSL2 Ubuntu 20.04 Installed IBC 3.16.2 through wget - Cannot locate the directory

?

Hello, as the title suggests, I downloaded and unzip IBC 3.16.2 through WSL2. However, I am having an issue locating the directory. Help on this matter would be appreciated.


Re: TWS or IBC times out while TWS panels and charts are loading

 

开云体育

闯ü谤驳别苍

?

Thanks very much for that fascinating information. I’ll consider adding something explicit to the IBC User Guide to point out the potential consequences of this, and what to do if it causes a problem.

?

Richard

?


Re: TWS or IBC times out while TWS panels and charts are loading

 

When we moved from version 9 of TWS to version 10 we experienced generally slightly longer startup and restart times with the occasional very long delay. TWS and any open windows appeared to be frozen during these times, so we ran some network traces to see what is going on between TWS and the "outside" world.

First of all, during startup and restart, V10 TWS performs many more interactions with IBKR than what comparable V9 TWS would do. But the biggest impact on startup time in general and the cause of all very long startup times was downloading, installing, and starting JxBrowser.

While TWS/IBGW are still fundamentally Java 8 programs (and there is nothing wrong with that since Java 8 is a long-term support version along with Java 11, and Java 17), IBKR continuously upgrades the JavaFX GUI technology they use. And they take advantage of JxBrowser, a complete Chromium browser that is installed in /tmp/JxBrowser (on Linux). The current version 7.26 is just shy of 400MB when installed so it is no surprise that downloading, installing, and starting that browser may take some time. At least the peak delays are somewhat independent of how fast your server is.

We have not analyzed what exactly triggers the download and installation during startup (other than cases after system reboot when /tmp is empty) and under what circumstances TWS reuses and existing installation, but we have occasionally seen multiple versions installed by the end of the week.

I guess that was the long way of saying that peak startup times can be very long for TWS V10 and timeouts might have to increased considerably, as Richard suggested.

闯ü谤驳别苍

On Wed, Jun 7, 2023 at 09:49 AM, Kevin Jameson wrote:

Thank you. I thought it might be a slow-machine timeout (I'm on AWS), but I was kind of following the instructions "Don't change anything below this line!" :-)

I will increase my timeout if it happens again.


Re: TWS or IBC times out while TWS panels and charts are loading

 

Thank you. I thought it might be a slow-machine timeout (I'm on AWS), but I was kind of following the instructions "Don't change anything below this line!" :-)

I will increase my timeout if it happens again.


Re: TWS or IBC times out while TWS panels and charts are loading

 

开云体育

Ok, thanks for that.

?

The short answer here is this: can you please set the value of SecondFactorAuthenticationExitInterval in config.ini to something higher than the default value (which is 40). I suggest:

?

SecondFactorAuthenticationExitInterval=90

?

The slightly longer answer is that IBC is just not giving TWS long enough to get fired up before deciding that login hasn’t worked. The default of 40 used to be adequate in most situations, but I’ve noticed that recent TWS releases are often ?taking longer to get everything ready, and this is especially true if your computer is a little slow. In fact that’s exactly the situation here, where I’m running in a virtual machine on a 1.8GHz server from 2014, so not exactly speedy – I have set this to 100.

?

And here’s a bit more info: the intention was that if IBC’s auto-2FA restart facility is not in use, then IBC would just let TWS take as long as it wanted, and if for some weird reason it never got going properly then the user would be left to decide what to do. That’s why the comment in config.ini for SecondFactorAuthenticationExitInterval says ‘This setting is only relevant if ReloginAfterSecondFactorAuthenticationTimeout is set to 'yes', or if ExitAfterSecondFactorAuthenticationTimeout is set to 'yes'’. However in fact, as you’ve found, the SecondFactorAuthenticationExitInterval setting is actually always relevant.

?

I will correct this flaw in the next release, and I’ll also increase the default value..

?

Richard

?

?

?

From: [email protected] <[email protected]> On Behalf Of Kevin Jameson
Sent: Tuesday, June 6, 2023 9:00 PM
To: [email protected]
Subject: Re: [ibc] TWS or IBC times out while TWS panels and charts are loading

?

Here is my entire log file.

I apologize for not attaching it per your best practices.
I certainly do not want to waste your time!

I'm posting this directly through groups.io in case my other reply through Outlook doesn't get chained properly.

Thank you


Re: TWS or IBC times out while TWS panels and charts are loading

 

Here is my entire log file.

I apologize for not attaching it per your best practices.
I certainly do not want to waste your time!

I'm posting this directly through groups.io in case my other reply through Outlook doesn't get chained properly.

Thank you


Re: TWS or IBC times out while TWS panels and charts are loading

 

开云体育

Please reply to this with your complete logfile attached. I keep saying this over and over again: the logfile contains masses of information that may be helpful in diagnosing issues. If you don’t give me that information, it’s like having one hand tied behind my back and just wastes my time.

?

And please attach the logfile: don’t just quote it in the message.

?

Richard


TWS or IBC times out while TWS panels and charts are loading

 

I have a strange problem that I have seen maybe a dozen times before. I log in with 2FA (face recognition on my iphone), TWS starts to display my (classic mode) quote panels, charts, and trading log window, and then everything shuts down. It always scares me. Once I had to wait half a day before I could get a login that would stick around for the week (auto-relogin every day). Otherwise, the whole setup works very well, and has been doing so since the beginning of the year.

Here is the IBC text displayed in read in the Windows command window. Does anyone have any tips or configuration changes that might help to avoid the (seemingly random) problem? If it helps any, I run the code on an AWS t3.large instance, which always feels slow.
?
+ IBC version 3.16.2
+ Running TWS 1019 at 2023-06-05 16:40:29.02
+
+ Diagnostic information is logged in:
+ C:\IBC\Logs\me\IBC-3.16.2_TWS-1019_MONDAY.txt
+
+ ** Caution: closing this window will close TWS 1019 **
+
The system cannot find the drive specified.
Second factor authentication dialog has timed out, IBC not restarted
+==============================================================================
+
+? ? ? ? ? ? ? ? ? ? ? ?**** An error has occurred ****
+
+ Error while: Running StartIBC.bat
+
+ ERRORLEVEL = 1111
+ Error: TWOFA_TIMEOUT_ACTION is set to : something wrong here
+ Please look in the diagnostics file mentioned above for further information
+==============================================================================

The log file says: (note the weird Log4j Verd.x?)

2023-05-22 00:45:17:199 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT
2023-05-22 00:45:17:200 IBC: Setting Trading mode = live
2023-05-22 00:45:17:280 IBC: Setting user name
2023-05-22 00:45:17:284 IBC: Setting password
2023-05-22 00:45:17:287 IBC: Login attempt: 1
2023-05-22 00:45:17:352 IBC: Click button: Log In
2023-05-22 00:45:17:804 IBC: Button now disabled: Log In
2023-05-22 00:45:20:374 IBC: Detected dialog entitled: Second Factor Authentication; event=Closed
2023-05-22 00:45:20:377 IBC: Duration since login: 3 seconds
2023-05-22 00:45:20:377 IBC: If login has not completed, IBC will exit in 40 seconds
2023-05-22 00:45:22:844 IBC: Detected dialog entitled: Downloading settings from server; event=Closed
LogModuleConfigurator-Init: Log4j Ver2.x found on classpath
LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2023-05-22 00:46:03:498 IBC: IBC closing because login has not completed after Second Factor Authentication
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2023-05-22 00:46:03:499 IBC: Exiting with exit code=1111
2023-05-22 00:46:03,718 JTS-AsyncNonLocked-35 WARN Unable to register Log4j shutdown hook because JVM is shutting down. Using SimpleLogger
Program has exited
Error level is 1111
Check for 2FA dialog timed out
2FA completion timed-out but TWOFA_TO_ACTION=EXIT so not restarting IBC
Normal exit
?
TWS finished at 2023-05-22? 0:46:04.49
IBC running TWS 1019 has finished at 2023-05-22? 0:46:04.51


I don't understand why IBC or TWS or whatever would close down when the login obviously worked and TWS was starting to display my trading screens. Any help or advice would be appreciated. Thank you.


Re: App not able to connect to the IB Gateway (IB logs show line "remove client 427334")

 

开云体育

This message is logged by Gateway (but not TWS) for some reason when an API client connects successfully , and it seems to be completely harmless. I suspect it’s a little diagnostic that someone at IB put into the Gateway code years ago and has never been removed. Most Gateway/TWS logging is done to the Gateway/TWS logfile, which is completely separate from IBC’s logfile. But some things are logged to StdOut or StdErr, and they are captured by IBC’s logfile: this is one of those cases.

?

This message does NOT mean that your API client program has not connected: you should find that it’s working fine.

?


Re: How do I select the "Show log" checkbox in the IB Gateway window through IBC?

 

Sounds good, will add a VNC connection to update these settings. Thanks!


App not able to connect to the IB Gateway (IB logs show line "remove client 427334")

 

Hi all,
I'm running IB Gateway on a remote server, using IBC and xvfb. When my app connects to the IB Gateway app, I see this message in the IBC logs (nothing else is printed). On the app side, the connection to port shows connected. Both the Gateway and app are running on the same host, and connecting over localhost.

Just for reference, the same IBC + Gateway setup is working fine on my local Macbook.

I have tried setting the client ID to random integers on every app restart, and checked that the port is correct - these were the suggestions I found on the internet, but neither of them are working for my case.

IBC version - 3.16.2
Gateway version - 10.19
OS - Linux

Attaching the logfile as well.?

Would appreciate any insight into this.

Thanks!