Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Error when trying to create DataMiner Element programmatically

Solved927 views14th July 2023
2
Alexander Hewitson 25th April 2022 0 Comments

Hello,

I'm getting the following error when trying to programmatically create element in DataMiner.

2022/04/25 14:51:25.291|SLManagedScripting.exe|ManagedInterop|ERR|1|28|NMLOG|[GetNumberOfElements]|Exception => System.ArgumentException DataMiner agent ID in "4294967295/4294967295" is not an integer value
Parameter name: id ( [GetNumberOfElements] )
at Skyline.DataMiner.Library.Common.DmsElementId..ctor(String id)
at Skyline.DataMiner.Library.Common.ReplicationSettings.Load(ElementInfoEventMessage elementInfo)
at Skyline.DataMiner.Library.Common.DmsElement.ParseElementInfo(ElementInfoEventMessage elementInfo)
at Skyline.DataMiner.Library.Common.DmsElement.Parse(ElementInfoEventMessage elementInfo)
at Skyline.DataMiner.Library.Common.DmsElement..ctor(IDms dms, ElementInfoEventMessage elementInfo)
at Skyline.DataMiner.Library.Common.Dma.GetElements()
at OneWeb.SkylineClassCommon.GetNumberOfElements(ISLProtocolWrapper protocol, Int32 agentId)

This previously worked without issue so can't understand why I'm having trouble with this now.

I'm currently running DataMiner Version (10.2.4.0-11608)

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 14th July 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Blake Smethers [SLC] [DevOps Advocate]980 Posted 25th April 2022 0 Comments

Hi Alexander, I believe this is because "4294967295" is larger than the expected integer value. The maximum value an integer can have is 2147483647. It looks like you're actually at the maximum unsigned integer value (4,294,967,295).

I'd try creating the elements at a lower value and see if that works. My guess is DataMiner expects a number less than the maximum (signed) integer value.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 14th July 2023
1
Gellynck Jens [SLC]2.71K Posted 25th April 2022 2 Comments

Hi Alexander,

This looks to be a combination of 2 issues:

  1. DataMiner is returning an element with an invalid DataMiner / Element ID.
  2. The class library is failing to parse this invalid ID when retrieving the Number of Elements, while it should probably handle this invalid ID better and return the number of valid elements.

You can likely fix this issue by deleting the element with the invalid ID. To find this element you can check the alarm console for errors/notices or looking for related errors in the DataMiner logging (most likely SLDataMiner.txt, SLErrors.txt, SLNet.txt). You may also be able to find this element by opening the root view card, selecting "elements" (below this view), then sorting on the "ID" column (look for an element that has ID 0).

Alexander Hewitson Posted new comment 26th April 2022
Alexander Hewitson commented 26th April 2022

I wasn’t able to find any elements with an ID of 0.
We’re using the following methods to call this:

public static string GetElementFullId(ISLProtocolWrapper protocol, int agentId, string elementName)
{
string elementId = null;

protocol.Log(string.Format(“[GetElementFullId] From Agent agentId={0} elementName = {1}”, agentId, elementName), Severity.DEBUG);

try
{
IDms dms = protocol.getDms();

IDma agent = dms.GetAgent(agentId);

IDmsElement dmsElement = agent.GetElement(elementName);

elementId = GetElementFullId(dmsElement);

protocol.Log(string.Format(“[GetElementFullId] From Agent elementId = {0} for {1}”, elementId, elementName), Severity.DEBUG);
}
catch (Exception e)
{
protocol.Log(e, “[GetElementFullId] From Agent id=” + agentId, Severity.DEBUG);
}

return elementId;
}

public static string GetElementFullId(IDmsElement dmsElement)
{
string fullId = null;

if (dmsElement != null)
{
fullId = dmsElement.DmsElementId.AgentId + “/” + dmsElement.DmsElementId.ElementId;
}

return fullId;
}

Alexander Hewitson commented 26th April 2022

It’s also worth noting that we’re in a 4 agent cluster, with a CNMA having a failover pair.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin