locked
C# SCOM SDK agent install works fine from debug mode but disconnects when built from installer RRS feed

  • Question

  • My team is writing a C# application that installs SCOM agents on the fly. I used the code in :

    http://msdn.microsoft.com/en-us/library/hh329037.aspx

    as a template. Which works fine and will consistently install agents when I run it in debug from Visual Studio. But when I build an installer (using InstallShield), calls to:

    "AgentTaskResult results = adminServer.InstallAgents(agents, configuration);"

    always result in a Microsoft.EnterpriseManagement.Common.ServerDisconnectedException. The agent install even shows up in pending management on the SCOM server (but this sits in pending management forever and is never processed). Calling managementGroup.Reconnect(); and retrying the agent install still results in a ServerDisconnectedException. The application has no problem doing other things with the managementGroup object (from debug or running from an installer). It can create MonitorConfigurationOverrides and gets events out of an outbound connector. So it seems like the disconnect problem is localized just to agent install requests.

    I looked in the Windows Event Log and found an OpsMgr SDK Service Error: 

    An exception was thrown while processing InstallAgents for session ID uuid:71d39b19-f9a7-4d4a-82ee-5043480af635;id=41.
     Exception message: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 778.
     Full Exception: System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 778.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, StringBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
       at System.Xml.XmlTextReaderImpl.ParseCharRefInline(Int32 startPos, Int32& charCount, EntityType& entityType)
       at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
       at System.Xml.XmlTextReaderImpl.ParseText()
       at System.Xml.XmlTextReaderImpl.ParseElementContent()
       at System.Xml.XmlReader.ReadString()
       at System.Xml.XmlReader.ReadElementString(String name)
       at Microsoft.EnterpriseManagement.RuntimeService.TaskRuntimeService.CreateRemoteJobXml(JobDefinition jobDefinition, ManagementPackTask task, Guid hsId)
       at Microsoft.EnterpriseManagement.RuntimeService.TaskRuntimeService.SubmitJobs(IList`1 jobDefinitions, Guid batchId, JobCategory category)
       at Microsoft.EnterpriseManagement.RuntimeService.TaskRuntimeService.SubmitTasksInternal(IList`1 jobDefinitions, Guid batchId, JobCategory category, PrepareResultSet prepareTaskResultCallback)
       at Microsoft.EnterpriseManagement.ServiceDataLayer.AdministrationService.InstallAgents(Guid batchId, IList`1 jobDefinitions)
    • Moved by Just Karl Wednesday, June 4, 2014 2:13 PM Looking for the proper forum.
    Tuesday, June 3, 2014 7:27 PM

Answers

All replies

  • Hello,

    The TechNet Sandbox forum is designed for users to try out the new forums functionality. Please be respectful of others, and do not expect replies to questions asked here.

    As it's off-topic here, I am moving the question to the Where is the forum for... forum.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    Wednesday, June 4, 2014 2:11 PM
  • Hello,

    You might ask in the Visual C# Language forum on MSDN.

    Otherwise, perhaps the Operations Manager - Extensibility forum:

    http://social.technet.microsoft.com/Forums/systemcenter/en-US/home?forum=operationsmanagerextensibility

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    Wednesday, June 4, 2014 2:13 PM
  • So re-post the question in one of those forums? Is there any way for an author of a thread to move or delete it?
    Thursday, June 5, 2014 6:00 PM
  • An author cannot move a thread unless he or she is also a moderator.

    Dave or I (or any of the other moderators) can move your question to the proper forum, if you ask us to, and identify the forum you'd like it in.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})


    • Edited by Just Karl Tuesday, June 17, 2014 6:18 PM
    Thursday, June 5, 2014 7:00 PM