-
Notifications
You must be signed in to change notification settings - Fork 216
Description
UPDATE-
tl;dr - as explained in the many messages below, if the file jts.ini doesn't exist, IB Controller fails to select Trading Mode = 'paper' in the login screen; this has been reproduced consistently on my tests.
Hello,
For some reason, IB Controller 3.2.0 some times fails to select 'paper' Trading Mode. It's inconsistent - sometimes it does select paper, sometimes it doesn't. When it doesn't, since I'm using my paper credentials, IB Gateway will then show an error message complaining that I used paper user/password but didn't select paper trading mode.
Please see the attached screenshot.
Any ideas?
Thanks!
Here's some additional info.
-
The java process is started like this:
/opt/i4j_jres/1.8.0_60/bin/java -cp /root/Jts/959/jars/*:/opt/IBController/IBController.jar -Xmx256m -Xms256m -Xss1m ibcontroller.IBGatewayController /root/IBController/IBController.ini MY_USERNAME MY_PASSWORD paper(with redacted user/password). -
The IB Controller logs seem to show that it correctly understood that I wanted to use my paper account:
18:19:13:610 IBController: using default settings provider: ini file is /root/IBController/IBController.ini
18:19:13:614 IBController: using default login manager: getting username and password from args
18:19:13:615 IBController: using default config dialog manager: constructor parameter isGateway=true
18:19:13:615 IBController: using default trading mode manager: constructor parameter args: tradingMode=paper
- However, the following log entry on IB Controller only exists when it works:
IBController: Setting Trading mode = paper
I've compared the full logs for one execution that did work, and one that didn't. That line is the single difference in the logs.
-
I've tried different settings on
IBController.inifor the parameterTradingMode. I tried to comment out the line, I tried to set it to 'paper', and I tried to set it to 'live'. It doesn't seem to make any difference - I still observe inconsistent results. -
The 'launcher.log' file contains the following lines when IB Controller fails to select Trading Mode 'paper', that seem to be related to this issue:
2016-10-25 18:57:56.639 [DN] INFO [JTS-AuthDispatcherS2-16] - NSErrorResponse.PROD_PAPER_INVALID_CHOICE
2016-10-25 18:57:56.642 [DN] INFO [JTS-AuthDispatcherS2-16] - Connection to server failed: <html>You have selected the Live Trading Mode, but the specified user <br> is a Paper Trading user. <br><br>Please select the correct Trading Mode.</html>
