I’ve just released version 3.16.0 of IBC to GitHub. You can download it here: ? ? This release provides additional support for Auto-restart in TWS and Gateway, for all current TWS/Gateway versions (ie 1012 onwards). Auto-restart is not supported when used with earlier TWS/Gateway versions. ? IMPORTANT If you are currently using an IBC version earlier than 3.15.2, you are strongly advised to upgrade to this version. ? The main enhancement is the provision of a RESTART command that can be sent to IBC's command server. This causes TWS/Gateway to auto-restart without the user having to re-authenticate. Note however that this command cannot be used to bypass the need to do full second-factor authentication on Sundays. A new Windows script, Restart.bat is provided. This script, and the revised Stop.bat script, both use a new user-customisable SendCommand.bat script to identify the IBC instance to be stopped or restarted. ? Note that for Gateway, and for TWS versions before 1018, using the RESTART command will alter the configured AutoRestart time to the time that the command was carried out. To prevent subsequent auto-restarts at that time, ensure that the AutoRestartTime or AutoLogoffTime setting in config.ini is set as desired. ? Additionally, the following changes have been made: ? - the description of running IBC under Task Scheduler on Windows has been corrected
? - the ReadOnlyLogin setting in config.ini now works properly in cases where the user has only a security code card but not IBKR mobile (fix Issue #190)
? - the StartTWS.bat script on Windows has been improved to allow the colours used for the banner window to be specified (as was previously enabled for the GatewayStart.bat script). This could be used for example to easily distinguish between the banner windows for live and paper trading instances
? - various code improvements have been made - see the commit history on GitHub
? - a number of clarifications have been made to the comments in the start scripts and in config.ini
? HOW TO UPGRADE ? The safest way to upgrade is to first to rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files. On Linux, remember to set execute permission on the scripts. ? All platforms: ? config.ini ? Windows only: ? StartTWS.bat StartGateway.bat SendCommand.bat? (new file in this release, needs customisation as per the old Stop.bat) ? Linux & macOS ? gatewaystart.sh (or gatewaystartmacos.sh) twsstart.sh (or twsstartmacos.sh) ? Richard ?
|
Awesome Richard! Can’t wait to try it.
toggle quoted message
Show quoted text
On 20 Jan 2023, at 18:58, Richard L King <rlking@...> wrote:
? I’ve just released version 3.16.0 of IBC to GitHub. You can download it here: ? ? This release provides additional support for Auto-restart in TWS and Gateway, for all current TWS/Gateway versions (ie 1012 onwards). Auto-restart is not supported when used with earlier TWS/Gateway versions. ? IMPORTANT If you are currently using an IBC version earlier than 3.15.2, you are strongly advised to upgrade to this version. ? The main enhancement is the provision of a RESTART command that can be sent to IBC's command server. This causes TWS/Gateway to auto-restart without the user having to re-authenticate. Note however that this command cannot be used to bypass the need to do full second-factor authentication on Sundays. A new Windows script, Restart.bat is provided. This script, and the revised Stop.bat script, both use a new user-customisable SendCommand.bat script to identify the IBC instance to be stopped or restarted. ? Note that for Gateway, and for TWS versions before 1018, using the RESTART command will alter the configured AutoRestart time to the time that the command was carried out. To prevent subsequent auto-restarts at that time, ensure that the AutoRestartTime or AutoLogoffTime setting in config.ini is set as desired. ? Additionally, the following changes have been made: ? - the description of running IBC under Task Scheduler on Windows has been corrected
? - the ReadOnlyLogin setting in config.ini now works properly in cases where the user has only a security code card but not IBKR mobile (fix Issue #190)
? - the StartTWS.bat script on Windows has been improved to allow the colours used for the banner window to be specified (as was previously enabled for the GatewayStart.bat script). This could be used for example to easily distinguish between the banner windows for live and paper trading instances
? - various code improvements have been made - see the commit history on GitHub
? - a number of clarifications have been made to the comments in the start scripts and in config.ini
? HOW TO UPGRADE ? The safest way to upgrade is to first to rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files. On Linux, remember to set execute permission on the scripts. ? All platforms: ? config.ini ? Windows only: ? StartTWS.bat StartGateway.bat SendCommand.bat? (new file in this release, needs customisation as per the old Stop.bat) ? Linux & macOS ? gatewaystart.sh (or gatewaystartmacos.sh) twsstart.sh (or twsstartmacos.sh) ? Richard ?
|
The restart command works (on Ubuntu) for me and skips the 2FA! This is great for the occasionally needed mid-week restart.
Thanks again, Richard.
toggle quoted message
Show quoted text
Awesome Richard! Can’t wait to try it. On 20 Jan 2023, at 18:58, Richard L King <rlking@...> wrote:
? I’ve just released version 3.16.0 of IBC to GitHub. You can download it here: ?
? This release provides additional support for Auto-restart in TWS and Gateway, for all current TWS/Gateway versions (ie 1012 onwards). Auto-restart is not supported when used with earlier TWS/Gateway versions. ? IMPORTANT If you are currently using an IBC version earlier than 3.15.2, you are strongly advised to upgrade to this version. ? The main enhancement is the provision of a RESTART command that can be sent to IBC's command server. This causes TWS/Gateway to auto-restart without the user having to re-authenticate. Note however that this command cannot be used to bypass the need to do full second-factor authentication on Sundays. A new Windows script, Restart.bat is provided. This script, and the revised Stop.bat script, both use a new user-customisable SendCommand.bat script to identify the IBC instance to be stopped or restarted. ? Note that for Gateway, and for TWS versions before 1018, using the RESTART command will alter the configured AutoRestart time to the time that the command was carried out. To prevent subsequent auto-restarts at that time, ensure that the AutoRestartTime or AutoLogoffTime setting in config.ini is set as desired. ? Additionally, the following changes have been made: ? - the description of running IBC under Task Scheduler on Windows has been corrected
? - the ReadOnlyLogin setting in config.ini now works properly in cases where the user has only a security code card but not IBKR mobile (fix Issue #190)
? - the StartTWS.bat script on Windows has been improved to allow the colours used for the banner window to be specified (as was previously enabled for the GatewayStart.bat script). This could be used for example to easily distinguish between the banner windows for live and paper trading instances
? - various code improvements have been made - see the commit history on GitHub
? - a number of clarifications have been made to the comments in the start scripts and in config.ini
? HOW TO UPGRADE ? The safest way to upgrade is to first to rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files. On Linux, remember to set execute permission on the scripts. ? All platforms: ? config.ini ? Windows only: ? StartTWS.bat StartGateway.bat SendCommand.bat? (new file in this release, needs customisation as per the old Stop.bat) ? Linux & macOS ? gatewaystart.sh (or gatewaystartmacos.sh) twsstart.sh (or twsstartmacos.sh) ? Richard ?
|
Does it mean that if the IBC is not working or closed by any accident, it would automatically restart itself? 「Richard L King < rlking@...>」在 2023年1月21日 週六,上午2:58 寫道:
toggle quoted message
Show quoted text
I’ve just released version 3.16.0 of IBC to GitHub. You can download it here: ?
? This release provides additional support for Auto-restart in TWS and Gateway, for all current TWS/Gateway versions (ie 1012 onwards). Auto-restart is not supported when used with earlier TWS/Gateway versions. ? IMPORTANT If you are currently using an IBC version earlier than 3.15.2, you are strongly advised to upgrade to this version. ? The main enhancement is the provision of a RESTART command that can be sent to IBC's command server. This causes TWS/Gateway to auto-restart without the user having to re-authenticate. Note however that this command cannot be used to bypass the need to do full second-factor authentication on Sundays. A new Windows script, Restart.bat is provided. This script, and the revised Stop.bat script, both use a new user-customisable SendCommand.bat script to identify the IBC instance to be stopped or restarted. ? Note that for Gateway, and for TWS versions before 1018, using the RESTART command will alter the configured AutoRestart time to the time that the command was carried out. To prevent subsequent auto-restarts at that time, ensure that the AutoRestartTime or AutoLogoffTime setting in config.ini is set as desired. ? Additionally, the following changes have been made: ? - the description of running IBC under Task Scheduler on Windows has been corrected
? - the ReadOnlyLogin setting in config.ini now works properly in cases where the user has only a security code card but not IBKR mobile (fix Issue #190)
? - the StartTWS.bat script on Windows has been improved to allow the colours used for the banner window to be specified (as was previously enabled for the GatewayStart.bat script). This could be used for example to easily distinguish between the banner windows for live and paper trading instances
? - various code improvements have been made - see the commit history on GitHub
? - a number of clarifications have been made to the comments in the start scripts and in config.ini
? HOW TO UPGRADE ? The safest way to upgrade is to first to rename your existing IBC folder (eg to IBC.old) and then create a new one. Then download the relevant zip file and extract the files, as for a new installation (as described in the User Guide). Then re-apply any changes you previously made to the following files. On Linux, remember to set execute permission on the scripts. ? All platforms: ? config.ini ? Windows only: ? StartTWS.bat StartGateway.bat SendCommand.bat? (new file in this release, needs customisation as per the old Stop.bat) ? Linux & macOS ? gatewaystart.sh (or gatewaystartmacos.sh) twsstart.sh (or twsstartmacos.sh) ? Richard ?
|
No. The auto-restart facilities in IBC are built on those in TWS/Gateway, introduced back in version 974 (if I remember correctly) and much improved in recent versions. These mechanisms depend on TWS/Gateway writing information to a file which enables them to carry on without re-authentication when they are restarted. The only times that this file is generated are when TWS/Gateway reaches the configured AutoRestart time, and when TWS receives a File | Restart command. ? So if you do a normal exit from TWS/Gateway, or it crashes, or your computer breaks, or your power supply fails, etc etc, then when it starts again that file will not exist and it will be a normal start requiring full 2FA. ? To guard against such situations, it’s easy to set up Task Scheduler on Windows or cron on Linux to start TWS/Gateway periodically, but only if it’s not already running (this is described in the User Guide). Of course if such an automatic start succeeds, then it will be a normal start, and full 2FA will be needed. ? I’ve been doing this periodic restart at 5-minute intervals every day for more than 18 years, and to be honest it happens so infrequently these days, it’s arguably not worth the effort – but then I’m at home nearly all the time. If you were away for a couple of weeks for example, then it probably would be worthwhile: such a failure would then result in TWS/Gateway being restarted, and you’d get the 2FA alert on your IBKR Mobile device as usual. ? ?
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> On Behalf Of Lam Kenneth Sent: 24 January 2023 07:58 To: [email protected] Subject: Re: [ibc] IBC Version 3.16.0? Does it mean that if the IBC is not working or closed by any accident, it would automatically restart itself?
|
Hi Richard,
I may have jumped the gun on this :). Is the restart script only available for windows in this version or am I being thick again?
|
Oops, sorry, forgot to reply… ? The restart script is Windows-only (though the target TWS/Gateway can be anywhere). ? I don’t bother providing a script for Linux because it’s easy to script telnet on Linux, as it reads input from stdin. This is not the case for Windows, hence the klunky mix of batch and vbs. ? For example on Linux: ? (echo restart; sleep 1; echo "quit" ) | telnet 10.252.0.7 7462 ? Richard ? ?
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> On Behalf Of Mark Murari Sent: 28 January 2023 10:49 To: [email protected] Subject: Re: [ibc] IBC Version 3.16.0? Hi Richard,
I may have jumped the gun on this :). Is the restart script only available for windows in this version or am I being thick again?
|
Just saw this, thanks. Need to figure out how to send telnet commands from python now…
toggle quoted message
Show quoted text
On 29 Jan 2023, at 19:08, Richard L King <rlking@...> wrote:
? Oops, sorry, forgot to reply… ? The restart script is Windows-only (though the target TWS/Gateway can be anywhere). ? I don’t bother providing a script for Linux because it’s easy to script telnet on Linux, as it reads input from stdin. This is not the case for Windows, hence the klunky mix of batch and vbs. ? For example on Linux: ? (echo restart; sleep 1; echo "quit" ) | telnet 10.252.0.7 7462 ? Richard ? ? ? Hi Richard,
I may have jumped the gun on this :). Is the restart script only available for windows in this version or am I being thick again?
|
Just create a socket connection, send the command, read the response, close the connection. I’m not a Pythonista, but I imagine this will be pretty straightforward. ? ?
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> On Behalf Of Mark Murari Sent: 01 February 2023 22:31 To: [email protected] Subject: Re: [ibc] IBC Version 3.16.0? Just saw this, thanks. Need to figure out how to send telnet commands from python now…
On 29 Jan 2023, at 19:08, Richard L King <rlking@...> wrote:
? Oops, sorry, forgot to reply… ? The restart script is Windows-only (though the target TWS/Gateway can be anywhere). ? I don’t bother providing a script for Linux because it’s easy to script telnet on Linux, as it reads input from stdin. This is not the case for Windows, hence the klunky mix of batch and vbs. ? For example on Linux: ? (echo restart; sleep 1; echo "quit" ) | telnet 10.252.0.7 7462 ? Richard ? ? ? Hi Richard,
I may have jumped the gun on this :). Is the restart script only available for windows in this version or am I being thick again?
|
toggle quoted message
Show quoted text
On 1 Feb 2023, at 23:15, Richard L King <rlking@...> wrote:
? Just create a socket connection, send the command, read the response, close the connection. I’m not a Pythonista, but I imagine this will be pretty straightforward. ? ? ? Just saw this, thanks. Need to figure out how to send telnet commands from python now…
On 29 Jan 2023, at 19:08, Richard L King <rlking@...> wrote:
? Oops, sorry, forgot to reply… ? The restart script is Windows-only (though the target TWS/Gateway can be anywhere). ? I don’t bother providing a script for Linux because it’s easy to script telnet on Linux, as it reads input from stdin. This is not the case for Windows, hence the klunky mix of batch and vbs. ? For example on Linux: ? (echo restart; sleep 1; echo "quit" ) | telnet 10.252.0.7 7462 ? Richard ? ? ? Hi Richard,
I may have jumped the gun on this :). Is the restart script only available for windows in this version or am I being thick again?
|
Thanks Richard for this awesome tool.?
I've been using latest version for more last few weeks now but i couldn't see any automated restart of TWS session after scheduled restart in TWS every day.? Probably coz i am on Ubuntu. i just want to clarify what kind of cron i need to setup on that ubuntu host. would it be just a shell script to keep checking tws process or something more than that??
Thank you again.?
|
I’m not entirely clear what you’re asking. ? Please can you clarify. Also attach a sample IBC logfile so I can see what settings you’re using. ? IBC works exactly the same on Linux as on Windows. You can use cron to provide a backstop restart capability to protect against certain types of failure: but the daily auto-restart governed by the AutoRestartTime setting in config.ini doesn’t need anything additional. For usage of cron with IBC, see the section on ‘Running with crontab (Linux only)’ towards the back of the User Guide. ? I won’t be responding further tonight as it’s getting late here in the UK, but will follow up tomorrow if need be. ? ?
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> On Behalf Of nkhetia@... Sent: 13 February 2023 23:31 To: [email protected] Subject: Re: [ibc] IBC Version 3.16.0? Thanks Richard for this awesome tool.?
I've been using latest version for more last few weeks now but i couldn't see any automated restart of TWS session after scheduled restart in TWS every day.? Probably coz i am on Ubuntu. i just want to clarify what kind of cron i need to setup on that ubuntu host. would it be just a shell script to keep checking tws process or something more than that??
Thank you again.?
|
Hi Richard,
The issue is resolved now. There were older restart folders under ~/Jts existed. After removing them, i did fresh login, it created new folder within ~/Jts and then restart worked as expected.?
Thank you!
|
Hi Richard
Thanks again for your great work!
Just wanted to get your thoughts on some unexpected (?) behaviour on my end (Windows 10) Thanks!:
Attempt 1: 1. Run StartGateway.bat on my PC 2. Wait for Gateway to finish Start 3. Run Restart.bat (Repeated Attempt 1 by sending the RESTART command to the CommandServer for same result) 4. Gateway successfully restarts but there is a 2nd Gateway window at the login page. 5. Run Stop.bat Result is IBC and the 2nd Gateway window at the login page are closed by Stop.bat but the logged in Gateway window remains
Attempt 2: Same steps as above, but wait 5 minutes after running StartGateway.bat Result is there are two Gateway windows attempting to login, one successfully logs in and the other says user already logged in.
Attempt 1 Logs: 2023-03-03 17:40:04:604 IBC: Using default login manager: getting username and password from args but not found. Will get from settings 2023-03-03 17:40:04:604 IBC: Using default main window manager 2023-03-03 17:40:04:604 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings 2023-03-03 17:40:04:605 IBC: Using default config dialog manager 2023-03-03 17:40:04:607 IBC: CommandServer is starting with port 7462 2023-03-03 17:40:04:634 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462 2023-03-03 17:40:04:634 IBC: CommandServer started and is ready to accept commands 2023-03-03 17:40:04:645 IBC: TWS Settings directory is: C:\Jts 2023-03-03 17:40:04:648 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:40:04:648 IBC: Found setting: [Logon]/s3store=true 2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/Locale=en 2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/displayedproxymsg=1 2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/UseSSL=true 2023-03-03 17:40:04:649 IBC: Found setting: [IBGateway]/ApiOnly=true 2023-03-03 17:40:04:649 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:40:04:649 IBC: Starting Gateway 2023-03-03 17:40:04:649 IBC: Re-starting session 2023-03-03 17:40:06:447 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:40:06:451 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:40:06:452 IBC: Detected frame entitled: IB Gateway; event=Opened 2023-03-03 17:40:06:452 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT 2023-03-03 17:40:12:541 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:40:12:542 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:41:01:382 IBC: CommandServer: ControlFrom setting = 2023-03-03 17:41:01:382 IBC: CommandServer accepted connection from: /127.0.0.1 2023-03-03 17:41:01:551 IBC: CommandServer received command: RESTART 2023-03-03 17:41:01:551 IBC: Getting main window 2023-03-03 17:41:01:552 IBC: Creating main window future 2023-03-03 17:41:05:431 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:41:05:433 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:41:08:073 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:41:08:074 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:41:12:520 IBC: CommandServer: ControlFrom setting = 2023-03-03 17:41:12:520 IBC: CommandServer accepted connection from: /127.0.0.1 2023-03-03 17:41:12:671 IBC: CommandServer received command: STOP 2023-03-03 17:41:12:672 IBC: Closing command channel 2023-03-03 17:41:12:672 IBC: CommandServer closing 2023-03-03 17:41:12:673 IBC: Login has not completed: exiting immediately 2023-03-03 17:41:12:673 IBC: CommandServer is shutdown
Attempt 2: 2023-03-03 17:44:01:930 IBC: Using default login manager: getting username and password from args but not found. Will get from settings 2023-03-03 17:44:01:930 IBC: Using default main window manager 2023-03-03 17:44:01:931 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings 2023-03-03 17:44:01:931 IBC: Using default config dialog manager 2023-03-03 17:44:01:933 IBC: CommandServer is starting with port 7462 2023-03-03 17:44:01:959 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462 2023-03-03 17:44:01:959 IBC: CommandServer started and is ready to accept commands 2023-03-03 17:44:01:968 IBC: TWS Settings directory is: C:\Jts 2023-03-03 17:44:01:970 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/s3store=true 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/Locale=en 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/displayedproxymsg=1 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/UseSSL=true 2023-03-03 17:44:01:970 IBC: Found setting: [IBGateway]/ApiOnly=true 2023-03-03 17:44:01:970 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:44:01:970 IBC: Starting Gateway 2023-03-03 17:44:01:970 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds 2023-03-03 17:44:03:722 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:44:03:729 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:44:03:730 IBC: Detected frame entitled: IB Gateway; event=Opened 2023-03-03 17:44:03:730 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT 2023-03-03 17:44:03:730 IBC: Trading mode from settings: tradingMode=live 2023-03-03 17:44:03:730 IBC: Setting Trading mode = live 2023-03-03 17:44:03:816 IBC: Login attempt: 1 2023-03-03 17:44:03:826 IBC: Click button: Log In 2023-03-03 17:44:04:642 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:44:04:643 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:44:04:643 IBC: Detected frame entitled: Loading...; event=Activated 2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Focused 2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Opened 2023-03-03 17:44:04:647 IBC: Found Gateway main window 2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Lost focus 2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Deactivated 2023-03-03 17:44:05:205 IBC: Detected frame entitled: Authenticating...; event=Activated 2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Focused 2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Opened 2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Lost focus 2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Deactivated 2023-03-03 17:44:05:945 IBC: Detected dialog entitled: Second Factor Authentication; event=Activated 2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Focused 2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Opened 2023-03-03 17:44:05:947 IBC: Second Factor Authentication initiated 2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Lost focus 2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Deactivated 2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Activated 2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Focused 2023-03-03 17:44:11:752 IBC: Detected dialog entitled: Second Factor Authentication; event=Closed 2023-03-03 17:44:11:752 IBC: Duration since login: 7 seconds 2023-03-03 17:44:11:752 IBC: If login has not completed, IBC will exit in 40 seconds LogModuleConfigurator-Init: Log4j Ver2.x found on classpath LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x 2023-03-03 17:44:13:925 IBC: Detected frame entitled: Starting application...; event=Lost focus 2023-03-03 17:44:13:926 IBC: Detected frame entitled: Starting application...; event=Focused 2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Lost focus 2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Deactivated 2023-03-03 17:44:13:927 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:44:13:928 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:44:13:928 IBC: Detected frame entitled: Starting application...; event=Closed 2023-03-03 17:44:13:928 IBC: Login has completed 2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:48:52:617 IBC: CommandServer: ControlFrom setting = 2023-03-03 17:48:52:618 IBC: CommandServer accepted connection from: /127.0.0.1 2023-03-03 17:48:52:784 IBC: CommandServer received command: RESTART 2023-03-03 17:48:52:785 IBC: Getting main window 2023-03-03 17:48:52:785 IBC: Main window already found 2023-03-03 17:48:52:788 IBC: Setting auto-restart time to 05:49 PM 2023-03-03 17:48:52:789 IBC: Closing command channel 2023-03-03 17:48:52:789 IBC: Getting config dialog 2023-03-03 17:48:52:789 IBC: Creating config dialog future 2023-03-03 17:48:52:789 IBC: Getting main window 2023-03-03 17:48:52:789 IBC: Main window already found 2023-03-03 17:48:52:789 IBC: Getting main window 2023-03-03 17:48:52:789 IBC: Main window already found 2023-03-03 17:48:52:789 IBC: Invoking config dialog menu 2023-03-03 17:48:53:054 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Activated 2023-03-03 17:48:53:056 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Focused 2023-03-03 17:48:53:057 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Opened 2023-03-03 17:48:53:057 IBC: Got config dialog from future 2023-03-03 17:48:53:062 IBC: Setting Auto restart time 2023-03-03 17:48:53:086 IBC: Auto restart time changed from 05:40 PM to 05:49 PM 2023-03-03 17:48:53:095 IBC: Click button: OK 2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Closed 2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Lost focus 2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Deactivated 2023-03-03 17:48:53:172 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:48:53:173 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:49:00:205 IBC: Detected dialog entitled: Restart in progress; event=Activated 2023-03-03 17:49:00:206 IBC: Detected dialog entitled: Restart in progress; event=Focused 2023-03-03 17:49:00:207 IBC: Detected dialog entitled: Restart in progress; event=Opened 2023-03-03 17:49:00,523 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:00,524 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:01,622 pool-3-thread-1 ERROR Attempted to append to non-started appender f Program has exited Error level is 0 Check for 2FA dialog timed out Check for login dialog display timeout Check for restart call :GetAutoRestartOption Finding autorestart file autorestart file found at C:\Jts\amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj\autorestart AUTORESTART_OPTION is -Drestart=amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj IBC will autorestart shortly
|
Dan ? Can I please ask you, and anyone else reading this, NOT to include extracts of log files in your posts. Instead, attach the WHOLE logfile(s) so that I can see everything in them. You might think that some of the information in the log files is irrelevant, but believe me everything is there for a reason and can be very helpful to me when diagnosing problems. ? So, with the information you’ve supplied, it’s not easy to see what’s going on. ? For a start, it looks like the Gateway in your attempt 1 actually thinks it’s restarting, but because I don’t have the whole logfile I can’t verify what it has done. So perhaps you haven’t told me the full story of what’s happening here? ? All I can suggest is that you do the following: ? - Make sure there are no Gateway (or TWS) instances running.
- Delete the file C:\Jts\amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj\autorestart if it exists.
- If there are any other similarly long-named folders under C:\Jts that contain an autorestart file, delete those files as well.
? Now run StartGateway.bat, and then try the Restart.bat file. If there is still a problem, then let me know and make sure to attach the complete logfiles. ? One more thing, are you perhaps running both live and paper-trading accounts at the same time with the same version of Gateway? If so, this may cause a problem. The problem arises when one of the Gateways is shut down normally (ie no restart): when the other one reaches its restart time, it does reload but not under IBC control, so the login dialog will be displayed without the username and password filled in. ? I’m investigating this, and the simple workaround is to run the live account with the Stable version and the paper account with the LATEST version. I had somehow convinced myself that this wasn’t going to be a problem, but I think I was wrong… ? ? ?
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> On Behalf Of Dan Sent: 03 March 2023 07:05 To: [email protected] Subject: Re: [ibc] IBC Version 3.16.0? Hi Richard
Thanks again for your great work!
Just wanted to get your thoughts on some unexpected (?) behaviour on my end (Windows 10) Thanks!:
Attempt 1: 1. Run StartGateway.bat on my PC 2. Wait for Gateway to finish Start 3. Run Restart.bat (Repeated Attempt 1 by sending the RESTART command to the CommandServer for same result) 4. Gateway successfully restarts but there is a 2nd Gateway window at the login page. 5. Run Stop.bat Result is IBC and the 2nd Gateway window at the login page are closed by Stop.bat but the logged in Gateway window remains
Attempt 2: Same steps as above, but wait 5 minutes after running StartGateway.bat Result is there are two Gateway windows attempting to login, one successfully logs in and the other says user already logged in.
Attempt 1 Logs: 2023-03-03 17:40:04:604 IBC: Using default login manager: getting username and password from args but not found. Will get from settings 2023-03-03 17:40:04:604 IBC: Using default main window manager 2023-03-03 17:40:04:604 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings 2023-03-03 17:40:04:605 IBC: Using default config dialog manager 2023-03-03 17:40:04:607 IBC: CommandServer is starting with port 7462 2023-03-03 17:40:04:634 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462 2023-03-03 17:40:04:634 IBC: CommandServer started and is ready to accept commands 2023-03-03 17:40:04:645 IBC: TWS Settings directory is: C:\Jts 2023-03-03 17:40:04:648 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:40:04:648 IBC: Found setting: [Logon]/s3store=true 2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/Locale=en 2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/displayedproxymsg=1 2023-03-03 17:40:04:649 IBC: Found setting: [Logon]/UseSSL=true 2023-03-03 17:40:04:649 IBC: Found setting: [IBGateway]/ApiOnly=true 2023-03-03 17:40:04:649 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:40:04:649 IBC: Starting Gateway 2023-03-03 17:40:04:649 IBC: Re-starting session 2023-03-03 17:40:06:447 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:40:06:451 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:40:06:452 IBC: Detected frame entitled: IB Gateway; event=Opened 2023-03-03 17:40:06:452 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT 2023-03-03 17:40:12:541 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:40:12:542 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:41:01:382 IBC: CommandServer: ControlFrom setting = 2023-03-03 17:41:01:382 IBC: CommandServer accepted connection from: /127.0.0.1 2023-03-03 17:41:01:551 IBC: CommandServer received command: RESTART 2023-03-03 17:41:01:551 IBC: Getting main window 2023-03-03 17:41:01:552 IBC: Creating main window future 2023-03-03 17:41:05:431 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:41:05:433 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:41:06:401 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:41:08:073 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:41:08:074 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:41:12:161 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:41:12:520 IBC: CommandServer: ControlFrom setting = 2023-03-03 17:41:12:520 IBC: CommandServer accepted connection from: /127.0.0.1 2023-03-03 17:41:12:671 IBC: CommandServer received command: STOP 2023-03-03 17:41:12:672 IBC: Closing command channel 2023-03-03 17:41:12:672 IBC: CommandServer closing 2023-03-03 17:41:12:673 IBC: Login has not completed: exiting immediately 2023-03-03 17:41:12:673 IBC: CommandServer is shutdown
Attempt 2: 2023-03-03 17:44:01:930 IBC: Using default login manager: getting username and password from args but not found. Will get from settings 2023-03-03 17:44:01:930 IBC: Using default main window manager 2023-03-03 17:44:01:931 IBC: Using default trading mode manager: constructor parameter args but trading mode not present - will be taken from settings 2023-03-03 17:44:01:931 IBC: Using default config dialog manager 2023-03-03 17:44:01:933 IBC: CommandServer is starting with port 7462 2023-03-03 17:44:01:959 IBC: CommandServer listening on addresses: 127.0.0.1,0:0:0:0:0:0:0:1,192.168.68.119,fd91:1c8e:8a6c:87c9:a4f2:4cb6:6317:60d2,fd91:1c8e:8a6c:87c9:194e:9d67:d5b7:cc25,fe80:0:0:0:b46d:6095:83d:fbf5%eth2; port: 7462 2023-03-03 17:44:01:959 IBC: CommandServer started and is ready to accept commands 2023-03-03 17:44:01:968 IBC: TWS Settings directory is: C:\Jts 2023-03-03 17:44:01:970 IBC: Ensuring C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/s3store=true 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/Locale=en 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/displayedproxymsg=1 2023-03-03 17:44:01:970 IBC: Found setting: [Logon]/UseSSL=true 2023-03-03 17:44:01:970 IBC: Found setting: [IBGateway]/ApiOnly=true 2023-03-03 17:44:01:970 IBC: Confirmed C:\Jts\jts.ini contains required minimal lines 2023-03-03 17:44:01:970 IBC: Starting Gateway 2023-03-03 17:44:01:970 IBC: Starting session: will exit if login dialog is not displayed within 60 seconds 2023-03-03 17:44:03:722 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:44:03:729 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:44:03:730 IBC: Detected frame entitled: IB Gateway; event=Opened 2023-03-03 17:44:03:730 IBC: Login dialog WINDOW_OPENED: LoginState is LOGGED_OUT 2023-03-03 17:44:03:730 IBC: Trading mode from settings: tradingMode=live 2023-03-03 17:44:03:730 IBC: Setting Trading mode = live 2023-03-03 17:44:03:816 IBC: Login attempt: 1 2023-03-03 17:44:03:826 IBC: Click button: Log In 2023-03-03 17:44:04:642 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:44:04:643 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:44:04:643 IBC: Detected frame entitled: Loading...; event=Activated 2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Focused 2023-03-03 17:44:04:647 IBC: Detected frame entitled: Loading...; event=Opened 2023-03-03 17:44:04:647 IBC: Found Gateway main window 2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Lost focus 2023-03-03 17:44:05:205 IBC: Detected frame entitled: Loading...; event=Deactivated 2023-03-03 17:44:05:205 IBC: Detected frame entitled: Authenticating...; event=Activated 2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Focused 2023-03-03 17:44:05:206 IBC: Detected frame entitled: Authenticating...; event=Opened 2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Lost focus 2023-03-03 17:44:05:945 IBC: Detected frame entitled: Authenticating...; event=Deactivated 2023-03-03 17:44:05:945 IBC: Detected dialog entitled: Second Factor Authentication; event=Activated 2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Focused 2023-03-03 17:44:05:947 IBC: Detected dialog entitled: Second Factor Authentication; event=Opened 2023-03-03 17:44:05:947 IBC: Second Factor Authentication initiated 2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Lost focus 2023-03-03 17:44:11:750 IBC: Detected dialog entitled: Second Factor Authentication; event=Deactivated 2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Activated 2023-03-03 17:44:11:751 IBC: Detected frame entitled: Authenticating...; event=Focused 2023-03-03 17:44:11:752 IBC: Detected dialog entitled: Second Factor Authentication; event=Closed 2023-03-03 17:44:11:752 IBC: Duration since login: 7 seconds 2023-03-03 17:44:11:752 IBC: If login has not completed, IBC will exit in 40 seconds LogModuleConfigurator-Init: Log4j Ver2.x found on classpath LogModuleConfigurator-Init: LogModuleConfigurator initialized with Log4j Verd.x 2023-03-03 17:44:13:925 IBC: Detected frame entitled: Starting application...; event=Lost focus 2023-03-03 17:44:13:926 IBC: Detected frame entitled: Starting application...; event=Focused 2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Lost focus 2023-03-03 17:44:13:927 IBC: Detected frame entitled: Starting application...; event=Deactivated 2023-03-03 17:44:13:927 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:44:13:928 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:44:13:928 IBC: Detected frame entitled: Starting application...; event=Closed 2023-03-03 17:44:13:928 IBC: Login has completed 2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:44:22:499 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:48:52:617 IBC: CommandServer: ControlFrom setting = 2023-03-03 17:48:52:618 IBC: CommandServer accepted connection from: /127.0.0.1 2023-03-03 17:48:52:784 IBC: CommandServer received command: RESTART 2023-03-03 17:48:52:785 IBC: Getting main window 2023-03-03 17:48:52:785 IBC: Main window already found 2023-03-03 17:48:52:788 IBC: Setting auto-restart time to 05:49 PM 2023-03-03 17:48:52:789 IBC: Closing command channel 2023-03-03 17:48:52:789 IBC: Getting config dialog 2023-03-03 17:48:52:789 IBC: Creating config dialog future 2023-03-03 17:48:52:789 IBC: Getting main window 2023-03-03 17:48:52:789 IBC: Main window already found 2023-03-03 17:48:52:789 IBC: Getting main window 2023-03-03 17:48:52:789 IBC: Main window already found 2023-03-03 17:48:52:789 IBC: Invoking config dialog menu 2023-03-03 17:48:53:054 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Activated 2023-03-03 17:48:53:056 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Focused 2023-03-03 17:48:53:057 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Opened 2023-03-03 17:48:53:057 IBC: Got config dialog from future 2023-03-03 17:48:53:062 IBC: Setting Auto restart time 2023-03-03 17:48:53:086 IBC: Auto restart time changed from 05:40 PM to 05:49 PM 2023-03-03 17:48:53:095 IBC: Click button: OK 2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Closed 2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Lost focus 2023-03-03 17:48:53:172 IBC: Detected dialog entitled: U9195885 Trader Workstation Configuration; event=Deactivated 2023-03-03 17:48:53:172 IBC: Detected frame entitled: IB Gateway; event=Activated 2023-03-03 17:48:53:173 IBC: Detected frame entitled: IB Gateway; event=Focused 2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Lost focus 2023-03-03 17:49:00:205 IBC: Detected frame entitled: IB Gateway; event=Deactivated 2023-03-03 17:49:00:205 IBC: Detected dialog entitled: Restart in progress; event=Activated 2023-03-03 17:49:00:206 IBC: Detected dialog entitled: Restart in progress; event=Focused 2023-03-03 17:49:00:207 IBC: Detected dialog entitled: Restart in progress; event=Opened 2023-03-03 17:49:00,523 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:00,524 JTS-IA Stopper-101 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:00,525 NIA-Input-Queue-2 ERROR Attempted to append to non-started appender d 2023-03-03 17:49:01,622 pool-3-thread-1 ERROR Attempted to append to non-started appender f Program has exited Error level is 0 Check for 2FA dialog timed out Check for login dialog display timeout Check for restart call :GetAutoRestartOption Finding autorestart file autorestart file found at C:\Jts\amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj\autorestart AUTORESTART_OPTION is -Drestart=amgehjgmnolmhjbjhkdeojcddnkficaikkpcpjlj IBC will autorestart shortly
|
Apologies Richard regarding the log files, a bad habit of mine from before I joined this forum!
I ended up completely reinstalling Gateway and that has resolved the issue... probably should have tried that first. I realized this when I spun up the same scenario on my VPS and it worked perfectly.
I did first try Step 2 and 3 but there were no autorestart files in any of the long-named folders, thanks again Richard
|
Was there a recent change that IB now actually supports running
the tws for one week without manual auth. every day ?
I remembered discussions end of last year that IB would drop this
feature for security reasons.
Or is it just IBC that can handle this mode correctly now ?
Am 23.01.2023 um 17:34 schrieb Jonathan
S:
toggle quoted message
Show quoted text
The restart command works (on Ubuntu) for me and
skips the 2FA!
This is great for the occasionally needed mid-week restart.
Thanks again, Richard.
Awesome Richard! Can’t wait to try it.
On 20 Jan 2023, at 18:58, Richard
L King <rlking@...>
wrote:
?
I’ve just released version 3.16.0
of IBC to GitHub. You can download it here:
?
?
This release provides additional
support for Auto-restart in TWS and Gateway, for all
current TWS/Gateway versions (ie 1012 onwards).
Auto-restart is not supported when used with earlier
TWS/Gateway versions.
?
IMPORTANT If you are
currently using an IBC version earlier than 3.15.2,
you are strongly advised to upgrade to this version.
?
The main enhancement is the
provision of a RESTART command that can be sent to
IBC's command server. This causes TWS/Gateway to
auto-restart without the user having to
re-authenticate. Note however that this command
cannot be used to bypass the need to do full
second-factor authentication on Sundays. A new
Windows script, Restart.bat
is provided. This script, and the revised Stop.bat
script, both use a new user-customisable SendCommand.bat
script to identify the IBC instance to be stopped or
restarted.
?
Note that for Gateway, and for
TWS versions before 1018, using the RESTART command
will alter the configured AutoRestart time to the
time that the command was carried out. To prevent
subsequent auto-restarts at that time, ensure that
the AutoRestartTime
or AutoLogoffTime
setting in config.ini
is set as desired.
?
Additionally, the following
changes have been made:
?
- the description of
running IBC under Task Scheduler on Windows has
been corrected
?
- the ReadOnlyLogin
setting in config.ini
now works properly in cases where the user has
only a security code card but not IBKR mobile (fix
Issue #190)
?
- the StartTWS.bat
script on Windows has been improved to allow the
colours used for the banner window to be specified
(as was previously enabled for the GatewayStart.bat
script). This could be used for example to easily
distinguish between the banner windows for live
and paper trading instances
?
- various code
improvements have been made - see the commit
history on GitHub
?
- a number of
clarifications have been made to the comments in
the start scripts and in config.ini
?
HOW TO UPGRADE
?
The safest way to upgrade is to
first to rename your existing IBC folder (eg to
IBC.old) and then create a new one. Then download
the relevant zip file and extract the files, as for
a new installation (as described in the User Guide).
Then re-apply any changes you previously made to the
following files. On Linux, remember to set execute
permission on the scripts.
?
All platforms:
?
config.ini
?
Windows only:
?
StartTWS.bat
StartGateway.bat
SendCommand.bat?
(new file in this release, needs customisation as
per the old Stop.bat)
?
Linux & macOS
?
gatewaystart.sh
(or gatewaystartmacos.sh)
twsstart.sh (or twsstartmacos.sh)
?
Richard
?
|
No change at IB. ? IBC now deals correctly with auto-restart, so you don’t need to manually re-authenticate or do 2FA or anything during the week. ? Richard ? ?
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> On Behalf Of Henry147 Sent: 08 March 2023 07:48 To: [email protected] Subject: Re: [ibc] IBC Version 3.16.0? Was there a recent change that IB now actually supports running the tws for one week without manual auth. every day ? I remembered discussions end of last year that IB would drop this feature for security reasons. Or is it just IBC that can handle this mode correctly now ?
|
Working quite slowly through my upgrade todo list, I am luckily at the point where I am trying to enable the recent restart function in Linux (via python). This python code should work but and pointers as to where I can locate the correct command server address and port would be appreciated, or do I need to explicitly configure these myself? import telnetlib with telnetlib.Telnet(IBC_SERVER_ADDRESS, IBC_SERVER_PORT) as tn: ? ? ? ? ? ??tn.write(RESTART_COMMAND.encode())
|
Hi Mark, as far as I know, you need to configure those yourself explicitly. See the file config.ini, section #8 "IBC Command Server Settings" and the settings under this section
- CommandServerPort
- ControlFrom
- BindAddress
It is noteworthy that
- if CommandServerPort is set to 0 (which is the default), the command server will not be started.
- ControlFrom only needs to be set if you want to control the instance from a remote computer, since localhost can always send commands to the IBC control server
- BindAddress, by default, accepts connection requests on all local addresses
Regards, Max
|