SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Hi,
Sometimes when our EBO OPC Server calls the NotificationCreate API, the returned status code is 500. Other calls with the same SubscriptionId returns status code 200. See below.
No Error:
=======
21:04:32,742 [CM] INFO SEEwsRestApi - NotificationsCreate, SubscriptionId = '0b06b335-c830-42c2-a030-8b3ae3c7324c'
21:04:32,754 [CM] INFO SEEwsRestApi - NotificationsCreate pass, NotificationId = 'FD633AB5836541BBB5EB6D956F105B34'
21:04:32,756 [CM] INFO SEEwsRestApi - GetNotificationItems, NotificationId = 'FD633AB5836541BBB5EB6D956F105B34'
21:04:32,766 [CM] INFO SEEwsRestApi - GetNotificationItems, status code = 200, Response = '[]'
21:04:32,766 [CM] INFO SEEwsRestApi - GetNotificationItems, # of change items 0
Error:
======
21:04:34,344 [CM] INFO SEEwsRestApi - NotificationsCreate, SubscriptionId = '0b06b335-c830-42c2-a030-8b3ae3c7324c'
21:04:34,360 [CM] ERROR SEEwsRestApi - WebRequestPostData after GetResponse(), status code = InternalServerError 500
21:04:34,360 [CM] ERROR SEEwsRestApi - NotificationsCreate fail, rc = -1, status code = 500
Can someone explain this behavior? What is the meaning of status code 500? Why are we getting this status code?
Thank you.
Mike
Link copied. Please paste this link to share this article on your social media post.
Hi Michael,
500 is an HTTP "Internal Server Error", which is basically just a catch all. I would recommend turning on REST Serve, and EWS Consume logging in Smart Connector, and see what the Smart Connector log is actually returning.
Best Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
Thank you. We'll do.
Can you see an error in the attached log file?
Thanks.
Mike
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
After adding REST Serve and EWS Consume logging in Smart Connector, this is what I see in the SmartConnector log:
2021-03-16 09:12:12.1685,Error,EwsConsume,admin,The HTTP request is unauthorized with client authentication scheme 'Digest'. The authentication header received from the server was 'Digest realm="ews@SxWBM",qop="auth",algorithm="SHA-256",nonce="E3C71D3DF7BE771B154F605D5496E0434E642B147C003B0F85BB3D1DFE2AC58ECC6A4AE352C18399A19917AF",opaque="532720"'.
The remote server returned an error: (401) Unauthorized.
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory`1 factory)
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Ews.Client.IDataExchange.GetNotification(GetNotificationRequest1 request)
at Ews.Client.DataExchangeClient.GetNotification(GetNotificationRequest request)
at Ews.Client.EwsClient.ExecuteAndLogCall[TRequest,TResponse](String methodName, TRequest request, Func`2 methodToLog)
,["GetNotification","352b0cc8-9a5e-4992-9327-2bae4a4aa440"],
See the attached SmartConnector log file.
Thank you.
Mike
Link copied. Please paste this link to share this article on your social media post.
Hi Michael,
What version of EBO is this happening on?
Best Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Hi Michael,
That looks like a Smart Connector version, do you also have the EBO version?
Best Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.