FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
08-08-2024 08:48 AM
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().
Solved! Go to Solution.
08-08-2024 09:09 AM
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.
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.
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.
08-08-2024 10:37 AM - edited 08-08-2024 10:38 AM
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.
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)