Developer forum

Forum » Integration » OData error reporting

OData error reporting

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

(Reposting this; I originally posted this in the Development category)

Hi there,

I have a site with 7 jobs that connect using the OData provider (prices, products, orders, order lines and more). Every now and then (roughly every other day) all 7 jobs fail and I get an error report like this by email:

Activity BC Orders - 3. Update order fields on site http://domain.com was executed with an error.
Activity log information:
2024-01-06 19:50:10.369: Starting OData export.
2024-01-06 19:50:10.369: Begin synchronizing 'EcomOrders' to 'SalesOrder'.
2024-01-06 19:50:11.443: Job failed.

After some digging into monitoring, I found this:

2024-01-06 19:50:11.443: Integration job failed: 'BC Orders - 3. Update order fields'; logfile: /Files/System/Log/DataIntegration/BC Orders - 3. Update order fields20240106-1950102753913.log. System.AggregateException: One or more errors occurred. 
System.Net.Http.HttpRequestException: An error occurred while sending the request. 
System.Net.WebException: Unable to connect to the remote server 
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 12.34.56.78:7048
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)

This looks like a connectivity issue to the BC API.

Two questions:

1. Can the error that is logged into monitoring also be added to the job output and therefore error email? I know we talked about this before but we could really use it. These emails often get sent to the customer's IT department and without further info there are pretty useless. Explaining them how to relate timestamps in emails to certain items under monitoring to find the root cause of the error is just a bit too much. Having the actual error message in the log would solve a lot of issues.

2. Would a retry be helpful here? The next time the jobs run they work just fine so it seems to be an intermittent issue.

Imar


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Imar

It should be more clear.

This bug should fix 2 things - among them logging what has happened:

https://dev.azure.com/dynamicwebsoftware/Dynamicweb/_workitems/edit/17148/ 

I think that should cover this.

BR Nicolai

 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply

Hi Imar,

For your first suggestion, all our providers has their own "custom way" of adding informations to their logs, but there is a "standard way" of doing it into the Event Viewer. So we can solve it by adding another log with the same informations that is sent to the Event Viewer, but we have to add this inside all providers.

For your second suggestion, at the current state of the OData Provider, i don't think it would be a good idea to put a retry on this response from the ERP.. maybe at a later state we could try and think about it.

 

BR

Matthias Sort

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> I think that should cover this.

Is that DW 10 only?

>> So we can solve it by adding another log with the same informations that is sent to the Event Viewer, but we have to add this inside all providers.

That would be great. Thanks!

 
Matthias Sebastian Sort Dynamicweb Employee
Matthias Sebastian Sort
Reply

Hi Imar,

It has now been released in our providers, in these versions:

CSV v. 5.0.1

Dynamicweb v 4.0.2

Ecom v. 6.0.1

Excel v. 5.0.1

OData v. 3.0.6

Order v. 3.0.4

Sql v. 4.0.1

User v. 4.0.1

XML v. 4.0.1

and into our DW10 providers too

BR

Matthias Sort

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

That looks great. Thanks Matthias: I'll give this a try next time I have an upgraded solution.

 

You must be logged in to post in the forum