It connects. I should have specified, I used this test to verify that passwords and/or user names had not changed.
Are you able to GET data from the PI Server and POST data to the PI Server? If there is nothing wrong, I would suspect there is network issue. Try to look at the Applications and Service Log in event viewer with PIWebAPI/Admin. Do you see exception there?
I see that you have an open case with OSIsoft Technical Support for your issue with PI Web API. Because troubleshooting of connection issues usually involves exchanging log files for review, Technical Support is likely the better resource to work with.
I did some Internet research since "An existing connection was forcibly closed by the remote host" looked pretty familiar to me. I was not able to find a corresponding HTTP error code which is indicating to me that the error isn't thrown by PI Web API. Hence I doubt you will see evidence what's causing this in the PI Web API logs but checking them cannot harm. Searching the internet for the error text (enclosed into double quotes) returns some discussions suggesting the issue is with the connections socket. A common reason for the message is when the Windows firewall rejects an incoming connection because of active rules. Well, this would be something to rule out when you can connect using a browser from the same client machine. On the other hand, by disabling the firewall on the server and client for a minute you would be able to quickly confirm the issue is due to firewall settings or not.
A more conservative approach is looking into some details of your setup first:
- Server OS and version?
- Client OS and version?
- PI Web API version?
- How is your client application supposed to authenticate?
- I understand your application is just reading. Is it logging the queries to a file, so you could pick them and test them in a browser? If you do so on the client application host, does the query succeed or fail in the browser?
- What are the supported authentication methods?
- What authentication method(s) is/are enabled?
- Is there a specific account used by your application e.g. for Basic authentication. Can you verify the account password is still valid?
- Are you operating in a domain environment? If so, are PI Web API host and client member of the same domain?
- Is the PI Web API server service running?
- Is PI Web API set up with a service account? If so, has the password potentially expired?
1 of 1 people found this helpful
The issue turned out to be that the certificate used by the Pi Web API server had expired. We'll improve the logging and fault tolerance in our application to better handle this in the future.