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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Just sent them to you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by alifarahani, Today, 09:40 AM
          6 responses
          31 views
          0 likes
          Last Post alifarahani  
          Started by Waxavi, Today, 02:10 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          13 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by Waxavi, Today, 02:00 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by gentlebenthebear, Today, 01:30 AM
          3 responses
          17 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X