Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84584members
353853posts

NotificationsCreate fails with status code 500

SmartConnector Forum

Discussion of SmartConnector applications for integration of various other building management systems (BMS) into EcoStruxure Building Operation

mike_meirovitz
Commander
Commander
0 Likes
7
168

NotificationsCreate fails with status code 500

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

 

 

Tags (1)
7 Replies 7
JeffBowman
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
6
166

Hi Michael,500 is aRe: NotificationsCreate fails with status code 500

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

Tags (1)
mike_meirovitz
Commander
Commander
0 Likes
5
164

Hi JRe: Hi Michael,500 is aRe: NotificationsCreate fails with status code 500

Hi Jeff,

 

Thank you. We'll do.

 

Can you see an error in the attached log file?

 

Thanks.

 

Mike

Attachments
Tags (1)
mike_meirovitz
Commander
Commander
0 Likes
4
161

Re: Hi JRe: Hi Michael,500 is aRe: NotificationsCreate fails with status code 500

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

Attachments
Tags (1)
JeffBowman
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
3
157

Re: Hi JRe: Hi Michael,500 is aRe: NotificationsCreate fails with status code 500

Hi Michael,

 

What version of EBO is this happening on?

 

Best Regards,

 

-Jeff

 

Tags (1)
mike_meirovitz
Commander
Commander
0 Likes
2
154

Re: Hi JRe: Hi Michael,500 is aRe: NotificationsCreate fails with status code 500

Hi Jeff,

 

The version is 2.4.25.

 

Thank you.

 

Mike

Tags (1)
JeffBowman
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
1
151

Re: Hi JRe: Hi Michael,500 is aRe: NotificationsCreate fails with status code 500

Hi Michael,

 

That looks like a Smart Connector version, do you also have the EBO version?

 

Best Regards,

 

-Jeff

Tags (1)
mike_meirovitz
Commander
Commander
0 Likes
0
150

Re: Hi JRe: Hi Michael,500 is aRe: NotificationsCreate fails with status code 500

Hi Jeff,

 

EBO version is 3.1.

 

Thank you.

 

Mike

Tags (1)