ConfigMgr 2012: SMSExec shuts down when we add the SUP role


Hi Folks,

I had an interesting issue where when we try to add the SUP role, the SMSExec used to shut down. It was initially a bit difficult to understand that it is the SUP role that is making the SMSExec to shut.

The final issue came out to be that when we try to install the SUP role and add the proxy it looks for a proxy.pac (wpad.dat)  file. The code was a 260 K of javascript which when converted into CLR IL code was causing the stack overflow.

 

The point to note here is even if we try to point the proxy to a server having no automatic scripts it will still take the WPAD preference. So we have to somehow prevent the auto proxy detection of the ConfigMgr Application without affecting the other applications that may go to WPAD for proxy.

This can be done by creating a config file smsexec.exe.config

The location where the file should be created is :

c:\program files\microsoft configuration manager\bin\X64\smsexec.exe.config

The contents of the config file should look like:
=====
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.net>
      <defaultProxy>
         <proxy usesystemdefault="False" />
      </defaultProxy>
   </system.net>
</configuration>
=====

Note: If the above file has spacing issues we can get the below errors:

Error in the WCM.log because of the spacing issues in the XML:
======
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Invalid character in the given encoding. Line 4, position 1. (C:\Program Files\Microsoft Configuration Manager\bin\x64\smsexec.exe.Config line 4) ---> System.Xml.XmlException: Invalid character in the given encoding. Line 4, position 1.~~   at System.Xml.XmlTextReaderImpl.Throw(Exception e)~~   at System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)~~   at System.Xml.XmlTextReaderImpl.GetChars(Int32 maxCharsCount)~~   at System.Xml.XmlTextReaderImpl.ReadData()~~   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)~~   at System.Xml.XmlTextReaderImpl.ParseText()~~   at System.Xml.XmlTextReaderImpl.ParseElementContent()~~   at System.Configuration.XmlUtil.StrictReadToNextElement(ExceptionAction action)~~   at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)~~   at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, OverrideModeSetting overrideMode, Boolean skipInChildApps)~~   at System.Configuration.BaseConfigurationRecord.ScanSections(XmlUtil xmlUtil)~~   at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()~~   --- End of inner exception stack trace ---~~   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)~~   at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()~~   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)~~   --- End of inner exception stack trace ---~~   at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args)~~   at Microsoft.UpdateServices.Administration.AdminProxy.GetUpdateServer(String serverName,
=======

To avoid having such issues, validate the XML in the visual studio or any other tool.

After this the service crash stopped.

But the WSUS configuration was still showing error:

WCM.log

======
Using c**p\n***1v5 credentials for network connections SMS_WSUS_CONFIGURATION_MANAGER 9/28/2012 12:12:22 PM 4676 (0x1244)
System.Net.WebException: The request failed with HTTP status 401: Unauthorized.~~   at Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer(Object[] args)~~   at Microsoft.UpdateServices.Administration.AdminProxy.GetUpdateServer(String serverName, Boolean useSecureConnection, Int32 portNumber)~~   at Microsoft.SystemsManagementServer.WSUS.WSUSServer.ConnectToWSUSServer(String ServerName, Boolean UseSSL, Int32 PortNumber) SMS_WSUS_CONFIGURATION_MANAGER 9/28/2012 12:12:27 PM 4676 (0x1244)

======

Its trying to use  c**p\n***1v5 account which not has been specified anywhere in the proxy.

Went and checked the Software update point component configuration and then removed the accounts from there.
Now restarted and WCM successfully connected to the WSUS server.
Started the sync and it went fine.

 

Hope it helps !!

Umair Khan

 Support Escalation Engineer | Microsoft System Center ConfigMgr  

Disclaimer:
This posting is provided "AS IS" with no warranties and confers no rights.

Comments (0)

Skip to main content