As a user we are setting multiple protocol versions as production + setting active functions using an automation script.
We're experiencing some issues when setting a function.xml as active. The code snippet we're using for it is this one:
var message = new Skyline.DataMiner.Net.Messages.SetCurrentFunctionsXmlRequestMessage
{
File = fileName,
Force = true,
ProtocolName = protocolname
};
var response = engine.SendSLNetSingleResponseMessage(message) as Skyline.DataMiner.Net.Messages.SetCurrentFunctionsXmlResponseMessage;
engine.GenerateInformation("Response: " + JsonConvert.SerializeObject(response));
Issue we're experiencing:
Sometimes the automation script gets stuck after sendind the SetCurrentFunctionsXmlRequest and eventually we'll have an RTE. As you can see we're logging the response of the call result right after it, and we naturally can't see any logging when the call gets stuck :
Checking the SLFunctionManager.txt logging we can't find anything relevant, we just see 2 entries for the 2 Set Function As Active we sent.
2021/04/14 14:32:43.934|SLLog|ApplyLogLevels|CRU|-1|Log Levels: Info: 0; Error: 0; Debug: 0 (from LogSettings.xml)
2021/04/14 14:33:34.592|SLNet.exe|Initialize|CRU|0|10|Initializing BaseFunctionManager...
2021/04/14 14:33:34.639|SLNet.exe|Initialize|CRU|0|10|Initialized BaseFunctionManager.
2021/04/14 14:35:34.467|SLNet.exe|SetCurrentProtocolFunctions|CRU|0|116|Force flag detected. Ignoring all safety checks. (WARNING: this will most likely lead to undefined behavior! Use at your own risk!) Setting protocol function version "Functions_1.0.0.6.xml" as the active version for protocol "Sony PWS-110NM1". Executed by user: "Administrator"
2021/04/14 14:35:49.042|SLNet.exe|SetCurrentProtocolFunctions|CRU|0|116|Force flag detected. Ignoring all safety checks. (WARNING: this will most likely lead to undefined behavior! Use at your own risk!) Setting protocol function version "Functions.xml" as the active version for protocol "Sony NXLK-IP50Y_51Y HDR-CCR". Executed by user: "Administrator"
**********
For the moment to recover from something like this we restart the server. We tried to manually stop/start the SLAutomation process but it didn't work. After the server is restarted we can actually see that the 2 functions we tried to set as active succeeded.
How can we debug further what is going on? What could cause the call to get stuck at the second time?
Hey Daniela,
It's not easy to know where or why the call is stuck just like that. Checking the logging as you did is often the most you can do.
To further investigate this issue, the best course of action is to take a SLNet.exe memory dump while the call is stuck. (this can be done in SLNetClientTest -> Advanced -> Request dump -> SLNet) You can then ask The Appmigos squad to investigate the dump through mail or through a task on investigation and they will hopefully be able to give you some pointers or find the root cause of the issue.
Kind regards
There’s also a helper from software that allows you do function “actions”.
It will probably send the same SLNetcall in the background and not solve the issue, but you then don’t need to compose the slnetmessage yourself.
ProtocolFunctionHelper funcHelper = new ProtocolFunctionHelper();
funcHelper.RequestResponseEvent += Helper_RequestResponseEvent;
funcHelper.SetCurrentFunctionsXml(“protocolName”, “version”);
Helper_RequestResponseEvent(object sender, Skyline.DataMiner.Net.IManager.Helper.IManagerRequestResponseEventArgs e)
{
e.responseMessage = Engine.SLNet.SendSingleResponseMessage(e.requestMessage);
}