AnsweredAssumed Answered

PI Web Api channel for multiple streamsets fails

Question asked by ckarras on Oct 9, 2018
Latest reply on Oct 10, 2018 by ckarras

I'm trying to subscribe to data updates for multiple AF elements using PI Web API.

I can successfully subscribe to updates for a single element, using streamsets/{webId}/channel.

 

But if I want to subscribe to updates for multiple elements, I try using streamsets/channel?webId={webId1}&webId={webId2}&...

 

On the client side, this fails with the following exception:

System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server

   at System.Net.WebSockets.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)

   at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken)

 

On the server, I enabled logs with the procedure described on: https://livelibrary.osisoft.com/LiveLibrary/content/en/web-api-v9/GUID-0C1B5AC4-7BCE-4221-BF00-CBD34BD4A0CD#addHistory=true&filename=GUID-E78A3385-33DA-443F-AA6D-D01AA7C858CA.xml&docid=GUID-0C1B5AC4-7BCE-4221-BF00-CBD34BD4A0CD&inner_id=&tid=&query=&scope=&resource=&toc=false&eventType=lcContent.loadDocGUID-0C1B5AC4-7BCE-4221-BF00-CBD34BD4A0CD

 

I then get this message in the PIWebAPI/Debug log:

[Controllers] {dc3fbcbe-7d57-425e-9f10-1a976c89d4ae}: OSIsoft.REST.PIWebException: Exception of type 'OSIsoft.REST.PIWebException' was thrown.

   at OSIsoft.REST.Filters.ValidationFilterAttribute.OnActionExecuting(HttpActionContext actionContext)

   at System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutingAsync(HttpActionContext actionContext, CancellationToken cancellationToken)

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at System.Web.Http.Controllers.ActionFilterResult.<Execut

 

 

It seems there was a validation error but I don't see any message about the reason, how can I investigate more?

Outcomes