cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Nodes do not show up after restart of Data Layer provider

Nodes do not show up after restart of Data Layer provider

nickH
Community Moderator
Community Moderator

I have a Data Layer Provider in .Net (similar to the SDK samples) running in my App Build Environment. I connect the provider via TCP to a Data Layer on a ctrlX CORE. When I terminate and restart the debugging of the provider the Nodes do not appear in the Data Layer again. Although I get "DL_OK" as a result for provider.registerNode().

2 REPLIES 2

nickH
Community Moderator
Community Moderator

When you don't shutdown your program like expected (provider.stop()) the Data Layer broker will think that your provider is still alive. In this case the broker will not allow anyone other provider to register nodes to the same Data Layer paths. And the broker will reject your nodes.

additional tip: with getRejectedNodes the provider can check if nodes he registered got rejectedadditional tip: with getRejectedNodes the provider can check if nodes he registered got rejected

 

You can confirm that the nodes got rejected, if you look in the Data Layer at "datalayer/statistics/broker/provider". Here you can see the "rejectedNodes" for your provider.

rejectedNodes for a provider at datalayer/statistics/broker/providerrejectedNodes for a provider at datalayer/statistics/broker/provider

 

But the Data Layer broker will ping each provider in an interval (default = 30 sec) to check if the provider is still alive. In case the ping does not succeed, the Data Layer will kick the provider and for new providers it will be possible to create nodes at the Data Layer paths this provider previously had.

Since Data Layer version 2.7.2 the provider will try to re-register the nodes in an interval of 10 sec, in case the nodes got rejected. In the ctrlX Data Layer API for .NET this is implemented since V4.1.1.

But keep in mind that this does only occur in case your program does not shut down correctly (for example when terminate a debugging session). If you call provider.stop() and datalayerSystem.stop() the broker will immediately free the node-addresses your provider used and a other provider is free to use them.

nickH
Community Moderator
Community Moderator

Additional information about the timeouts: 

The time interval in which the Data Layer broker will ping all the providers and the time the provider has for answering to a query is defined in the data layer settings at "datalayer/server/settings". Here the "serverIdlePingTimeout" and the "serverWaitResponseTimeout" is per default at 30 seconds. 

datalayer/server/settingsdatalayer/server/settings

 

Please be very careful if you want to change these values. Decreasing the pingTimeout will increase the load on the system. Decreasing the responseTimeout can be a problem for providers which need some time for a response (for example if they have to access some sensor in case of a read query or something similar) 

 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist