Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Log file access error when calling OnConnectionStatus

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Log file access error when calling OnConnectionStatus

    I have Kinetick and two IB gateway as connections for my script. Inside OnConnectionStatus, I just set up sending email as alert.

    IB connection was lost last night around 2:04 AM, it did get reconnected and I did get the alter email, but the script stopped working, no any orders submitted. I check the log, it says the process cannot access the log file because it is being used by another process. The log message looks like this:

    8/22/2017 2:04:56 AM|1|2|IBGateway-1: Primary connection=ConnectionLost, Price feed=ConnectionLost
    8/22/2017 2:04:56 AM|3|128|Strategy '88d88ea05bb148af825e8b679a28e682' lost price connection but will keep running.
    8/22/2017 2:04:56 AM|3|128|Error on calling 'OnConnectionStatus' method for strategy '88d88ea05bb148af825e8b679a28e682': The process cannot access the file 'C:\Users\Administrator\Documents\NinjaTrader 7\log\log.20170822.txt' because it is being used by another process.
    8/22/2017 2:04:56 AM|3|128|Strategy 'ac18d70322ac46d9bc4e8ebe5a82d3c6' lost order connection but will keep running.
    8/22/2017 2:04:56 AM|3|128|Strategy 'ac18d70322ac46d9bc4e8ebe5a82d3c6' lost price connection but will keep running.
    8/22/2017 2:04:56 AM|3|128|Error on calling 'OnConnectionStatus' method for strategy 'ac18d70322ac46d9bc4e8ebe5a82d3c6': The process cannot access the file 'C:\Users\Administrator\Documents\NinjaTrader 7\log\log.20170822.txt' because it is being used by another process.
    8/22/2017 2:04:56 AM|1|2|IBGateway-2: Primary connection=ConnectionLost, Price feed=ConnectionLost
    8/22/2017 2:05:23 AM|1|2|IBGateway-1: Primary connection=Connected, Price feed=Connected
    8/22/2017 2:05:26 AM|1|2|IBGateway-2: Primary connection=Connected, Price feed=Connected

    #2
    Hello gjing,

    Thank you for writing to the support team.

    1.Are you on the current build of NinjaTrader? (Help>About)

    2.What build of Traders Workstation are you using?

    Please note that IB Gateway is not officially supported with NinjaTrader 7.

    The reason for this error is likely due to the fact that IB Gateway and NinjaTrader are both attempting to write to the log file at the same time.

    The currently supported build of TWS is version 960.2.g for NinjaTrader 7.

    I look forward to your reply.

    Comment


      #3
      I'm running NT 7.0.1000.35 and my IB gateway is 960.2.g by using the tool TWSStart.

      I got the exactly same error when running NT 8.0.8.0 and IB gateway 960.2.g on 08/10/2017 night, pretty much the same time, so I don't think it's NT 7 and gateway related issues.

      Comment


        #4
        Hello gjing

        Thank you for the follow-up.

        Can you please send your latest log and trace file to support 'at' ninjatrader 'dot' com and include a link to this thread.

        You will find the trace file in the Documents > NinjaTrader 7 > Trace folder.
        * The trace file will be named "trace.YYYYMMDD.txt"

        This error is usually from another program accessing the file system in some way. Please make sure to exclude the NinjaTrader.exe as well as the 'NinjaTrader 7/8' folder in your Documents from any antivirus software running on your computer.

        The team will be looking out for your email, thank you for your patience with this.

        Comment


          #5
          Just sent them to you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          103 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          52 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          32 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          36 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          73 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X