3 Replies Latest reply on Jan 13, 2018 9:29 PM by patn RSS
    patn Explorer

    OpcDa Service (release 5.6.1) Not working with default OpcDaThing.config file

    Dear Community


    We have an issue and an outstanding support ticket relating to the OPC DA Client, version 5.6.1.

    Using the default OpcDaThing.config file as a starting point (as supplied with the download), we are unable to get the service to connect to our platform.

    Errors from the OPC DA Client log files are as follows:


    2016-02-17 11:49:01.157Z [L: Warning] [T: 6] [U: SYSTEM] [O: com.thingworx.Configuration] Could not get auto connect value from configuration, using default. :      System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.  

              at System.ThrowHelper.ThrowKeyNotFoundException()  

              at System.Collections.Generic.Dictionary`2.get_Item(TKey key)  

              at com.thingworx.opcda.OpcDaConfiguration.get_AutoConnect()


    2016-02-17 11:49:01.157Z [L: Error] [T: 6] [U: SYSTEM] [O: com.thingworx.opcda.OpcDaClient] Error while initializing new OpcDaThing, or opening connection to Platform:

         System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.   

              at System.ThrowHelper.ThrowKeyNotFoundException()   

              at System.Collections.Generic.Dictionary`2.get_Item(TKey key)  

              at com.thingworx.opcda.OpcDaConfiguration.get_OpcItemsConfigTable()  

              at com.thingworx.opcda.OpcDaThing.Init()  

              at com.thingworx.opcda.OpcDaThing..ctor(String name, String description, String identifier, ConnectedThingClient client)  

              at com.thingworx.opcda.OpcDaClient.run()



    The AutoConnect property refers (we think) to the AutoConnect value in OpcDaThing.config in the section relating to OPC connections, i.e. AutoConnect to OPC server on startup. Our file includes the following lines, so we assume we have configured correctly:


      "rows": [{

       "ServerName": "myOpcPath",     //real OPC path removed here :-)

       "GroupName": "Twx",

       "ItemDelimiter": ".",

       "UpdateRate": 60000,

      "AutoConnect": true,

       "ReadTagsOnInitialAdd": false,

       "ReadTagsOnInitialAddMaxAge": 600000



    We aren't sure about "The given key was not present in the dictionary" in the second error.


    We tried switching on Verbose logging in the ThingWorxOPCService.exe.config file but did not receive any further error details in the log files.


    Has anyone else come across this issue, or have any suggestions?