Skip to main content

configmgr console crashes with error “input string was not in a correct format”

i recently posted a fix to a console crashing condition with configmgr.  looks like it’s round two.  one of the configmgr admins here ran into this issue and asked me about.  this should be an entertaining post, especially when i highlight the advice from microsoft on how to fix this problem.  let’s start, shall we?

to begin with, the console crashes, from any machine, when you try to view the settings of specific active directory discovery methods.  this was occurring on two different servers and not always the same ad discovery method.  the only thing of interest that both servers had in common was that they were migrated to new hardware and had run through the site recovery wizard.

i captured the message that fires up whenever a crash condition occurs.  it looks like the likely offense is this message: Input string was not in a correct format.

image

that usually means site control configuration file corruption to me.  note that if you modify your site control file, you probably won’t get any support from microsoft.  make sure you have a good backup.

 

do not follow these steps

before we go on with how you fix this problem, let’s review how microsoft pss believes you should fix this problem.  here’s the first set of steps.

  1. Logon or RDP to SCCM Server, close mmc and console
  2. Delete the adminconsole cache file from : \document and settings\%username%\application data\microsoft\mmc  ; (NOTE: %username% is the currently logged in user ID)
  3. Start mmc and open sccm console.

hmmm.  apparently the fact that this happens on any console or machine is of no concern.  to say the least, this did not fix the problem.  so we’ll go through the action anyway because you cannot move forward without having done all steps prior and in the end having rebooted your server.  i’m sure that must be coming up…

in all fairness, these are actually good steps in capturing the problem when you’re poking around in the dark, in a very large room, with a very short stick.  after the first steps failed, this is what was sent:

  1. Close sccm console
  2. Install .net framework SP2 - if you don’t have this installed yet : http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB5-9B1D-10E506DA9D0F&displaylang=en
  3. Delete adminconsole cache file if it still exist (: \document and settings\%username%\application data\microsoft\mmc )
  4. Enable admin verbose log :
    1. Navigate to <installationpath>\adminui\bin folder
    2. Open adminui.console.dll.config using a text editor or notepad
    3. Change the line <source name="SmsAdminUISnapIn" switchValue="Error" > to <source name="SmsAdminUISnapIn" switchValue="Verbose" >
  5. From registry key : HKEY_CURRENT_USER\\CONTROL PANEL\DESKTOP\HUNGAPPTIMEOUT . The default is 5000, change this value to 10000 and reboot the machine
  6. download procmon from : http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
  7. RDP to sccm server, (mstsc/console)
  8. Run procmon and reproduce the issue
  9. Please send me :
  10. Procmon log (.pml)
  11. Event logs from event viewer (*.evt)
  12. Adminui.log, smsprov.log

this is great and all but won’t fix the problem.  in fact, it’ll only help the pss engineer eventually arrive at what the exact problem is.  “Input string was not in correct format”.  seems pretty obvious to me.

 

consider these steps

i compared a good sitectrl.ct0 against a bad one for the area with issues.  what i noticed to be the problem was pretty simple to fix, actually.  it seemed the console was expecting to read in an integer value when it ran into a string value.

Exception Type: System.FormatException

Exception Message: Input string was not in a correct format.

Server stack trace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

sure enough, in the sitectrl file, it was hitting a string.  here’s how a good file should look:

BEGIN_COMPONENT
<SMS_AD_SYSTEM_GROUP_DISCOVERY_AGENT>
<6>
<MYSMSSERVER>
PROPERTY <Run Count><><><1>
PROPERTY <SETTINGS><ACTIVE><><0>
PROPERTY <Startup Schedule><0001170000500008><><0>
BEGIN_PROPERTY_LIST
<AD Containers>
<LDAP://OU=myComputers,OU=mySite,DC=myDomain,DC=COM>
<0>
<0>
<LDAP://OU=myComputers,OU=mySite2,DC=myDomain,DC=COM>
<0>
<0>
END_PROPERTY_LIST
BEGIN_PROPERTY_LIST
<Start On Master Site Control File Changes>
<"Component","SMS_AD_SYSTEM_GROUP_DISCOVERY_AGENT|MYSMSSERVER">
END_PROPERTY_LIST
END_COMPONENT

and here’s how the broken one looked:

BEGIN_COMPONENT
<SMS_AD_SYSTEM_GROUP_DISCOVERY_AGENT>
<6>
<MYSMSSERVER>
PROPERTY <Run Count><><><1>
PROPERTY <SETTINGS><ACTIVE><><0>
PROPERTY <Startup Schedule><0001170000500008><><0>
BEGIN_PROPERTY_LIST
<AD Containers>
<LDAP://OU=myComputers,OU=mySite,DC=myDomain,DC=COM>
<0>
<LDAP://OU=myComputers,OU=mySite2,DC=myDomain,DC=COM>
<0>
END_PROPERTY_LIST
BEGIN_PROPERTY_LIST
<Start On Master Site Control File Changes>
<"Component","SMS_AD_SYSTEM_GROUP_DISCOVERY_AGENT|MYSMSSERVER">
END_PROPERTY_LIST
END_COMPONENT
 
notice the difference?  yes, the good file has two integers following the ldap location.  you’re asking yourself what these values represent, right?  good.  i wanted to capture it for later reference anyway.  i’m sure you would have figured this out on your own.  turns out they’re search options.  starting with the first one…
  • <0> – Recursive
  • <0> – Include groups
if the value is checked, it’s represented as <0>.  otherwise, unchecked is represented as <1>.  i put it in graphical format… :)
 
image

Comments

Popular posts from this blog

using preloadpkgonsite.exe to stage compressed copies to child site distribution points

UPDATE: john marcum sent me a kind email to let me know about a problem he ran into with preloadpkgonsite.exe in the new SCCM Toolkit V2 where under certain conditions, packages will not uncompress.  if you are using the v2 toolkit, PLEASE read this blog post before proceeding.   here’s a scenario that came up on the mssms@lists.myitforum.com mailing list. when confronted with a situation of large packages and wan links, it’s generally best to get the data to the other location without going over the wire. in this case, 75gb. :/ the “how” you get the files there is really not the most important thing to worry about. once they’re there and moved to the appropriate location, preloadpkgonsite.exe is required to install the compressed source files. once done, a status message goes back to the parent server which should stop the upstream server from copying the package source files over the wan to the child site. anyway, if it’s a relatively small amount of packages, you can

How to Identify Applications Using Your Domain Controller

Problem Everyone has been through it. We've all had to retire or replace a domain controller at some point in our checkered collective experiences. While AD provides very intelligent high availability, some applications are just plain dumb. They do not observe site awareness or participate in locating a domain controller. All they want is the name or IP of one domain controller which gets hardcoded in a configuration file somewhere, deeply embedded in some file folder or setting that you are never going to find. How do you look at a DC and decide which applications might be doing it? Packet trace? Logs? Shut it down and wait for screaming? It seems very tedious and nearly impossible. Potential Solution Obviously I wouldn't even bother posting this if I hadn't run across something interesting. :) I ran across something in draftcalled Domain Controller Isolation. Since it's in draft, I don't know that it's published yet. HOWEVER, the concept is based off

sccm: content hash fails to match

back in 2008, I wrote up a little thing about how distribution manager fails to send a package to a distribution point . even though a lot of what I wrote that for was the failure of packages to get delivered to child sites, the result was pretty much the same. when the client tries to run the advertisement with an old package, the result was a failure because of content mismatch. I went through an ordeal recently capturing these exact kinds of failures and corrected quite a number of problems with these packages. the resulting blog post is my effort to capture how these problems were resolved. if nothing else, it's a basic checklist of things you can use.   DETECTION status messages take a look at your status messages. this has to be the easiest way to determine where these problems exist. unfortunately, it requires that a client is already experiencing problems. there are client logs you can examine as well such as cas, but I wasn't even sure I was going to have enough m