5 Replies Latest reply on Jul 31, 2018 8:46 PM by smehrens

    Cloud Node-Red connect to Pi Web Api

    RonChen

      Hello Small People

                I am new to the PI system and please give me some instructions on troubleshoot. 

       

                I have a connection issue between Node-Red and Pi Web API. The Node-Red software is installed in Ubuntu. The two PCs (Node-Red and PI system) are under the same network. In Node-Red, I install the node of Osisoft Web API (Please see links below). Then I followed the tutorial (Tutorial: Using the OSIsoft PI Web API node with FRED (Cloud Node-RED) | Sensetecnic Developer )  and tried to test the connection. I always get an error message, "Error: getaddrinfo ENOTFOUND desktop-tc061b4 desktop-tc061b4:443". The "desktop-tc061b4" is my Server Name.

       

                What's the Server URL? It seems like the Node-Red cannot locate the PI Web API. What's the correct Server URL? Could you please give me some suggestions? thanks

              

      Node-Red Osisoft Web API Node: https://flows.nodered.org/node/node-red-contrib-osisoft-web-api

          

                PI Web API is setup:

             

       

      Write Data to API Server Error Message and Configuration Setting:

       

       

          

        • Re: Cloud Node-Red connect to Pi Web Api
          Lal_Babu_Shaik

          Hi Ron

           

          Issue is related to DNS and nslookup. Could you please check if your server is reachable over the network and check the host name and ip address from the system you are trying to call?

            • Re: Cloud Node-Red connect to Pi Web Api
              RonChen

              Hi Lal

                   Thanks for your comment.

                   The Node-Red PC is not able to Ping PI System PC, 100% packet loss. However, the PI System PC can ping the Node-Red PC and get response. Please help.

                • Re: Cloud Node-Red connect to Pi Web Api
                  Lal_Babu_Shaik

                  Hi Ron

                   

                  Please can you check firewall settings if port is blocked from Node-Red PC to PI server?

                    • Re: Cloud Node-Red connect to Pi Web Api
                      RonChen

                      Hi Lal

                            I close the firewall on PI System PC and I can ping it from the Node-Red PC. But, i still get the same error message. Please see screenshot below.

                       

                       

                           Then I tired to change the server URL to 192.168.0.152\piwebapi , then I got a new error message (Error Code: 401). I am not sure what it is now, but I am checking it online. Thanks.

                       

                        • Re: Cloud Node-Red connect to Pi Web Api
                          smehrens

                          Hi Ron.

                           

                          A 401 HTTP status code means unauthorized. From the screenshot, I see that you are attempting to authenticate with the PI Web API using Basic authentication. On installation, the only authentication method that the Web API supports is Kerberos. Can you please add an authentication method of Basic to the Web API's System Configuration element? You can do this by opening up PI System explorer > Configuration database >  PI Web API > [name_of_config_element] > System Configuration. The attribute you need to modify is called AuthenticationMethods.

                           

                          On another note, I think it's odd that your server url contains a backslash in it. Generally, when forming the base address of a url, forwardslashes are used.

                           

                          Stuart

                          3 of 3 people found this helpful