6 Replies Latest reply on May 24, 2012 9:36 PM by nagarwal

    ACE Calculations using SDK fail when Primary PI Server fails

    derekohachey
      I have some ACE Calculations using SDK that fail when Primary PI Server from PI collective is taken offline.  Example SDK MDB Code: CurrentModule = PIACEBIFunctions.GetPIModuleFromPath(Context) GroupID = CurrentModule.PIProperties("GroupID").Value Any thoughts on how we make this code "collective aware"?
        • Re: ACE Calculations using SDK fail when Primary PI Server fails
          derekohachey

          We are using PI SDK 1.3.6.363 & PI ACE 2.1.12

            • Re: ACE Calculations using SDK fail when Primary PI Server fails
              Ahmad Fattahi

              Here is an excerpt from the PI ACE user manual. Let's see if that helps you in any way (especially the first point). Other than these, is the PI Collective recognized by any other PI SDK application on the same box as the ACE Server? Can you use PI SMT for example to look at a tag value on the collective (secondary server when the primary is down)?

              • With proper buffering setup, ACE automatically sends data to all members in a server collective. Since the HA buffering is not currently supported on a PI Server, you should not run the ACE Scheduler on a PI Server if you need to send data to all members of a server collective.
              • When retrieving data from a PI Server collective, ACE Scheduler automatically connects to the available collective member.
              • See High Availability User Guide and High Availability Advanced User Guide for details.

                • Re: ACE Calculations using SDK fail when Primary PI Server fails
                  derekohachey

                  ACE runs on its own server, not on the PI server.  It also has a redundant server for scheduler to run on.

                   

                  Most of the calculations run fine when primary PI server is down

                   

                  Those guides are useless and too high level.

                    • Re: ACE Calculations using SDK fail when Primary PI Server fails
                      Ahmad Fattahi

                      Making configuration changes in a collective, including writing to MDB, is intrinsically limited to the Primary PI Server. If you attempt to do this on a Secondary server it will fail. PI SDK automatically tries to choose a server with sufficient privileges/support for any task at hand; if no such server is online or available the operation will fail.

                        • Re: ACE Calculations using SDK fail when Primary PI Server fails
                          derekohachey

                          We never write to the MDB with ACE, we only read.  Does the SDK look for write access regardless?

                            • Re: ACE Calculations using SDK fail when Primary PI Server fails
                              nagarwal

                              Hi Derek - As long as you are not making any configuration changes and your calculations only read from PI MDB - the calculations should continue to work when the primary PI server becomes unavailable. ACE should automatically connect to the secondary PI server and continue reading MDB properties.

                               

                              When you say the calculation fails - in what ways does it fail - you get an error message in the log or you see no error messages but fail to see data for your output tags? You can try putting some debug messages in the code and try outputting the property values - in order to make sure that it actually fails. And if it does fail, you can put a Try Catch block around it and get what error it throws. Also if possible can you post your code, so we can see if you inadvertently end up writing to MDB.

                               

                              Just to confirm, using your combination of ACE/SDK - I set up a test calculation that reads MDB properties (using the two lines of code you mentioned). I could verify that when the primary goes down, it connects to the secondary PI Server and continues to read.

                               

                              Thanks

                               

                              Nitin