2 Replies Latest reply on May 22, 2018 1:15 PM by vkaufmann

    PI Web API failure for AF based tags

    JamesIggulden

      Hello,

       

      We have a customer using the PI Web API to retrieve actual tag values using queries of the form:

      https://<server_name>:<port>/piwebapi/streamsets/value?webId=<web_id>

       

      For most of the tags the results come back as expected. However, for a subset we get the following example:

       

      {

        "Links": {},

        "Items": [

          {

            "WebId": "A0ErAc0bFuIIkSe-0tWIZhorANiiQe74g5RGhKgBQVroKrgWPw6byeKDE-_nyeZV2fbFQQUJaUElBRjAxVFxFWEVDVVRJVkVcTk9SVEhFUk4gUFJPRFVDRVJcUFJPRFVDVElPTlxQUk9EVUNUSU9OIEJZIEZJRUxEfFBST0RVQ1RJT04gWVRIQU4",

            "Name": "<name>",

            "Links": {

              "Source": "https://<server_name>:<port>/piwebapi/attributes/A0ErAc0bFuIIkSe-0tWIZhorANiiQe74g5RGhKgBQVroKrgWPw6byeKDE-_nyeZV2fbFQQUJaUElBRjAxVFxFWEVDVVRJVkVcTk9SVEhFUk4gUFJPRFVDRVJcUFJPRFVDVElPTlxQUk9EVUNUSU9OIEJZIEZJRUxEfFBST0RVQ1RJT04gWVRIQU4"

            },

            "Value": {

              "Timestamp": "2018-05-21T13:38:51.6107453Z",

              "Value": {

                "Errors": [

                  "Unexpected Server Error: 'Login failed for user 'EPDS'.'. \r\nUse Event Viewer to the the PI AF Server log file for more information."

                ]

              },

              "UnitsAbbreviation": "",

              "Good": false,

              "Questionable": false,

              "Substituted": false

            }

          }

        ]

      }

       

      The message is quite clear but the customer says they cannot see any failed login reports in the "server event logs".

      Has anyone had a similar experience? What else should we be checking?

       

      Thanks,

      James

        • Re: PI Web API failure for AF based tags
          rschmitz

          Hi James,

           

          I think this might be better handled in a Tech Support case, but just for a few quick sanity checks:

           

          1. Can that user connect to the AF Database in PI System Explorer and view those tags successfully?

          2. Is there any crossing domains between the client where the querying is being made, AF server, and Web API instance?

          3. Does querying for other AF attributes on the server or in this database work or does the same error result for all AF attributes in this database when queried via the PI Web API?

           

          Cheers,

          Rob

          • Re: PI Web API failure for AF based tags
            vkaufmann

            Hi James,

             

            A few other things to check out and some questions:

             

            1. What is the client you are using to query the Web API?

            2. Can this user authenticate to the DataServers controller? Are there any messages when you hit that endpoint?

            3. If so, can you query the tag directly with the streams controller? Can you query the attribute directly with the streams controller?

            4. From your other thread I am assuming that you are using Kerberos authentication, can you confirm you have a PIServer SPN on your Data Archive as well as configuring the Web API for delegation to the Data Archive?

             

            --Vince