Nodes do not show up after restart of Data Layer provider

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().

Best reply by nickH

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 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/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.

View original
2 replies