Dear Dojo,
I have created this part of a script which will scan for duplicates and report the outcome via e-mail. In the staging is working perfectly (DataMiner (10.2.0.0-11517)) and when I transferred it on the production it does no work any more (DataMiner (10.1.0.0-11319-CU11)).
The code is the following:
public class Script
{
public void Run(Engine engine)
{
engine.GenerateInformation("Collecting duplicate elements: Started");
Element[] elements = engine.FindElementsInView(-1);
var List = elements.Where(x => x.IsActive);
var duplicateKeys = List.GroupBy(x => x.PollingIP)
.Where(group => group.Count() > 1)
.SelectMany(group => group.Select(gg => gg))
.Where(x => !string.IsNullOrEmpty(x.PollingIP))
.ToList();
}
}
After this I am using a foreach loop to gather the info I need and send-it via email.
This is the part in which I think I have the problem.
The error from the production is the following:
2022/04/06 12:33:13.162|SLAutomation.exe 10.1.2046.9494|29308|38336|CSharp|DBG|-1|(Script Element Duplication Notification Live Test/2) (Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Create Dummy Failed: 0x80004005
at CManagedAutomation.RunWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* pvarReturn, String scriptName)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn) (CSharp; 0x80131500h):
2022/04/06 12:33:13.645|SLAutomation.exe
Can you point me in the right direction ?
Thank you
Catalin
Hi,
You might be able to find out more info about the error in the Automation log file (Cube > System Center > Logging > DataMiner > Automation. Or SLAutomation.txt on the server)
An error "Create Dummy Failed: 0x80004005" typically indicates that the automation module doesn't know about a specific element, which might indicate an incorrect in-memory state of that module. Restarting the DataMiner agent could help if this is the case.
I suspect the internal dummy instance gets created implicitly on the x.IsActive call. Using try/catch around this call could be a workaround.
The above error is directly from SLAutomation.txt