Table of Contents
- Contents:
- Section 1 Pre-Upgrade Best Practices
- Section 2 General Troubleshooting
- Section 3 List of Known Issues and Solutions
- A. SPN issues with SQL :
- B. Time Skew between remote SQL and Site Server :
- C. Re-Registering relevant files :
- D. Deleting Temp Files, Setting Temp Environment Variables:
- E. Searching for a bad custom or duplicate report:
- F. Checking for pre-existing duplicate reports that are new to SCCM SP2:
- G. Upgrade fails due to registry setting:
- H. Site System does not have rights to remote SQL System or Clustered SQL Nodes:
This document was created to help in troubleshooting Configuration Manager Service Pack 2 (SP2) install failures. This document is not entirely specific to Service Pack 2 and can apply to Service Pack 1 installs, upgrades from SMS 2003 to SCCM, and future service pack or Configuration Manager versions that rely on .mof file compilations, SQL SPNS, provider DLLs, etc.
Contents:
Section 1 Pre-Upgrade Best Practices
Section 2 General Troubleshooting
Section 3 List of Known Issues and Solutions:
A: SPN issues with SQL
B: Time Skew between remote SQL and Site Server
C: Re-Registering relevant files / errors attempting to re-register needed files.
D. Deleting Temp Files, setting Temp variables.
E. Searching for a "bad" custom or customized report
F. Checking for pre-existing duplicate reports that are new to SCCM SP2
G. Upgrade fails due to registry setting.
H. Site System does not have rights to remote SQL System or Clustered SQL Nodes
______________________________
Section 1 Pre-Upgrade Best Practices
It is important to note that some of the problems outlined below can leave your Configuration Manager or SMS installation in an unusable state (i.e. Admin Console will not launch and connect) this is because the upgraded files have already been copied to the bin\I386 directory of your SCCM installation. In some case setup may rollback successfully and in others you *may* be able to reinitiate upgrade over the top of a failed installation however in others you may have to fully restore to your previous state; SCCM RTM, SP1, SMS 2003, etc, to begin troubleshooting.
Always insure you have a complete current and full SMS or Configuration Manager backup (performed when SMS services are disabled, all directories, SQL DB, registry settings, etc..) before upgrading your product. Always utilize the testdbupgrade setup switch on a copy(!) of the site database command to insure your database can be upgraded without error. Testdbupgrade can help you insure you are ok to upgrade however you cannot upgrade a database after you have run testdbupgrade against it.
How to Test the Site Database Upgrade Process: http://technet.microsoft.com/en-us/library/bb693648.aspx
______________________________
Section 2 General Troubleshooting
Most problems we have seen thus far have been after file copy, around step 4; registering the SMS provider, and compiling .mof files. It takes setup about 10-15 minutes to get to this step. This document primarily focuses on issues of this type.
There are several things to consider in the scenario of .MOF comp failures. First off you should not have to keep going through SP2 setup after testing solutions. Instead try to manually compile the .mof that fails. In most (not all) cases you will get an error doing this as well. Once you have implemented a solution and can manually compile the .mof file that setup was failing on, it may be safe to assume that SCCM SP2 setup can again be run and may pass this stage.
Things to look at (not necessarily in this order):
- Relevant log files: C:\ConfigMgrSetup.log, %ConfigMgrInstallDir%\Logs\Smsprov.log and SMSProv.lo_, %Windir%\System32\Wbem\Mofcomp.log
- Verify that DCOM and Windows Management Instrumentation (WMI) is enabled
- Take a SQL Profiler (yes, because we are going through the Provider we do look in SQL. Specifically at the SMS_Reports table)
- Double check WMI permissions
- Check Security Rights in the SMS Admin console for the user that is executing the mofcomp command against smsrprt.mof
- Verify permissions on the extnprov.dll file
- We write .tmp files to various locations during compile. Run a Filemon.
As stated above, the files to compile during setup should be able to compile outside of setup. it is likely that you will not be able to complete setup successfully until you can compile smsrprt.mof (or whatever mof file is failing to compile) manually successfully from a command prompt.
If you try to manually compile the SMSrprt.mof and it fails you usually get the following error:
E:\SMS\bin\i386>mofcomp smsrprt.mof
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: smsrprt.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while processing item X defined on lines X - X in file smsrprt.mof:
Compiler returned error 0x80041001
It may be worth noting that 0x80041001 = generic failure, so this is not helpful other than to let you know that you have not resolved your issue as of yet since you are not able to manually compile this file.
______________________________
ou can compile smsrprt.mof (or whatever mof file is failing to compile) manually successfully from a command prompt.
If you try to manually compile the SMSrprt.mof and it fails you usually get the following error:
E:\SMS\bin\i386>mofcomp smsrprt.mof
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: smsrprt.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while processing item X defin
Section 3 List of Known Issues and Solutions
The most common issue we see with SP2 upgrades is a failed to compile .mof error around the time that SP2 is trying to upgrade the SMS provider component:
<12-09-2009 15:17:37> CompileMOFFile: Starting to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<12-09-2009 15:18:11> CompileMOFFile: Failed to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -1
<12-09-2009 15:18:11> Setup cannot compile MOF file C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof. Do you want to continue?
<12-09-2009 15:18:11> Setup failed to install SMS Provider. For more information about this error, see Microsoft Knowledge Base at <http://microsoft.com>
or contact Microsoft Technical Support for further assistance.
A. SPN issues with SQL:
The first thing you will want to check is that the SQL SPNs are registered correct in Active Directory. In a nutshell 2 things can go wrong here:
1. Duplicate SPNs for SQL
2. SQL is running under a Domain User account and the SPNs have not been created manually.
Resolution: Use the setspn tool. You can find it online if it's not installed.
1. setspn -l nameofcomputerrunningsql > C:\ComputerSPN.txt
2. setspn -l domain\accountSQLisRunningUnder > C:\SQLaccountSPN.txt
3. setspn -x > C:\duplicates.txt
So if your SQL server is called sqlcomputer and the account SQL is running under is called SQLAccount number 1 and 2 above would be :
1. setspn -l sqlcomputer > C:\ComputerSPN.txt
2. setspn -l domain\sqlaccount C:\SQLaccountSPN.txt
Use the txt files above to insure SQL SPNs are registered correctly. You should have the entries listed as follows under the domain account running SQL or the actual SQL Servers computer account:
MSSQLSvc/sqlcomputer.domain.com:1433
MSSQLSvc/sqlcomputer:1433
If you are running a SQL cluster insure the same for all physical nodes and the virtual instance name.
To add a FQDN and NETBIOS SPN for SQL use the following syntax:
setspn -a MSSQLSvc/SQLcomputer.domain.com:1433 Domain\SQLaccount
and
setspn -a MSSQLSvc/SQLcomputer:1433 Domain\SQLaccount
To delete a duplicate SPN use the -d switch:
SETSPN -D MSSQLSvc/SQLcomputer:1433 Domain\SQLcomputer
You can also easily view SPNs (Service Principal Names) using ADSIEDIT.msc (install from a Windows Server CD, \Support Tools\Suptools.msi) right click the computer or user account object and view attributes, scroll down to ServicePrincipalName.
Note: SQL creates its OWN SPN for the computer account when SQL is running under the Local System account. Having more then one SPNs registered under different accounts with the same machine name as the one SQL is running on will cause these problems as well.
Switches for SetSPN:
-R = reset HOST ServicePrincipalName
Usage: setspn -R computername
-A = add arbitrary SPN
Usage: setspn -A SPN computername
-S = add arbitrary SPN after verifying no duplicates exist
Usage: setspn -S SPN computername
-D = delete arbitrary SPN
Usage: setspn -D SPN computername
-L = list registered SPNs
Usage: setspn [-L] computername
-Q = query for existence of SPN
Usage: setspn -Q SPN
-X = search for duplicate SPNs
Usage: setspn -X
B. Time Skew between remote SQL and Site Server:
If SQL is remote from the site server you are trying to upgrade insure there is not a time skew between the two machines. A default Windows Active Directory domain has a Kerberos policy to allow no more than a 5 minute time difference between machines for successful Kerberos authentication.
C. Re-Registering relevant files:
In some case re-registering a couple of files has resolved SP2 install issues.
Configmgrsetup.log:
<11-14-2008 23:20:11> CompileMOFFile: Starting to compile MOF
E:\SMS\bin\i386\smsRprt.mof
<11-14-2008 23:20:12> CompileMOFFile: Failed to compile MOF
E:\SMS\bin\i386\smsRprt.mof, error –2147217407
If you try to manually compile smsRprt.mof you get the following error:
E:\SMS\bin\i386>mofcomp smsrprt.mof
Microsoft (R) 32-bit MOF Compiler Version 5.2.3790.3959
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: smsrprt.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while processing item 1 defined on lines 7 - 32 in file
smsrprt.mof:
Error Number: 0x80041013, Facility: WMI
Description: Provider load failure
Compiler returned error 0x80041001
From the command prompt type the following:
- Change directory to \Program Files\Microsoft Configuration Manager\Bin\I386\
- Run regsvr32 smsprov.dll
- Run regsvr32 extnprov.dll
Similar to the above issue during the fourth step of SCCM setup you may see the following pop up error
message:
Fatal Error Setup Failed to install SMS Provider
The ConfigMgrSetup.log may read as follows:
TaskSequenceProvider.mof comp failure
Once this occurs the SCCM services will not start and the site server is not in a usable state.
Additionally, after you quit setup you are unable to manually mofcomp smsprov.mof or TaskSequenceProvider.mof. The following error occurs:
Provider Load Failure
If you try to manually regsvr32 smsprov.dll you receive the following:
LoadLibrary("D:\SMS\Bin\I386\smsprov.dll") failed - The specified module could not
be found.
The error is valid although this is *also* the default regsvr32 error when a path to a file you are trying to register cannot be found or the file you are trying to register does not exist in the defined path.
The solution is to use Depends.exe (Dependency Walker) against the file that wont re-register SMSprov.dll (Note: not all files are "registerable"!) http://www.dependencywalker.com/
In our case it was missing MSVCR80.dll and it wanted this file in the \Microsoft Configuration Manager\Bin\I386
directory. Copy the missing files that depends identifies to the \Bin\I386 directory.
Once placing the file there we were able to manually register SMSProv.dll and Extnprov.dll and complete setup.
D. Deleting Temp Files, Setting Temp Environment Variables:
The following error appeared in the ConfigMgrSetup.log:
<02-19-2008 12:52:42> VC redist is being installed from C:\DOCUME~1\customer\Local
Settings\Temp\vcredist_x86.exe.
***You may get an MSIEXEC help screen popup although no error will show up in the log.***
<02-19-2008 13:08:23> CompileMOFFile: Starting to compile MOF C:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<02-19-2008 13:08:24> CompileMOFFile: Failed to compile MOF C:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -2147217407
<02-19-2008 13:08:26> Setup cannot compile MOF file C:\Program Files\Microsoft
Configuration Manager\bin\i386\smsRprt.mof. Do you want to continue?
The .moft-decoration:underline;">D. Deleting Temp Files, Setting Temp Environment Variables:
The following error appeared in the ConfigMgrSetup.log:
<02-19-2008 12:52:42> VC redist is being installed from C:\DOCUME~1\customer\Local
Settings\Temp\vcredist_x86.exe.
***You may get an MSIEXEC help screen popup although no error will show up in the log.***
<02-19-2008 13:08:23> CompileMOFFile: Starting to compile MOF C:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<02-19-2008 13:08:24> CompileMOFFile: Failed to compile MOF C:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -2147217407
<02-19-2008 13:08:26> Setup cannot compile MOF file C:\Program Files\Microsoft
Configuration Manager\bin\i386\smsRprt.mof. Do you want to continue?
The .mof39;s referenced in the ConfigMgrSetup.log above could not be compiled manually using mofcomp.exe.
Change the TEMP folder location from %USERPROFILE%\Local Settings\Temp to C:\TEMP and deleting all temp files fixed this issue. An alternate solution and better explanation for this behavior is as follows:
In one instance, the issue was caused when the admin logged onto the server BEFORE 8.3 support was turned off and therefore his user profile was created in this manner, including the path to the temp directory. Configuration Manager does not support 8.3 and in fact, the pre-req checker will determine if 8.3 support is enabled. In this instance, however, it was off by the time the setup was run and it does NOT check the logged on user for how their profile was created.
Log on with a user who has a profile created AFTER 8.3 support was disabled or delete the current users profile and have them log back on to re-create a new profile in the proper format and run setup again
E. Searching for a bad custom or duplicate report:
Look in the C:\ConfigMgrSetup.log for something like this:
<12-27-2009 14:02:36> ***SqlError: [42S01][2714][Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'ExistingRights_Setup' in the database.
<12-27-2009 14:03:04> CompileMOFFile: Failed to compile MOF F:\Program Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -2147217407
And a corresponding entry in the SMSprov.log:
[3338][Sun 12/27/2009 14:03:03]:ERROR> SQL command failed: update Report set Category = 'Software Distribution - Packages', Comment = 'Displays all packages at a site.', DrillThroughReportID = 127,
DrillThroughURL = null, GraphCaption = '', GraphType = null, GraphXCol = 1, GraphYCol = 2, MachineDetail = 0, MachineSource = 0, Name = 'All packages', RefreshInterval = 0, ReportGUID = '{54AB50FF-A9E8-4116
-8D56-AB10B6CD66A0}', StatusMessageDetailSource = 0, UnicodeData = 0, XColLabel = '', YColLabel = '' where ReportID = 132
***Note above that the report called "All Packages" is referenced***
e:\nts_sms_fre\sms\siteserver\sdk_provider\smsprov\sspclassbase.cpp(841) : SQL command failed:
SQL Error: [23000][2627][Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'Report_AK2'. Cannot insert duplicate key in object 'dbo.Report'.
SQL command failed: [23000][2627][Microsoft][ODBC SQL Server Driver][SQL Server]Violation of UNIQUE KEY constraint 'Report_AK2'. Cannot insert duplicate key in object 'dbo.Report'.
To resolve this issue we looked at the "All Packages" report, this report is included in a default install of SCCM Sp1 and SCCM SP2. However in this customers case it was noted that the report itself had been somewhat modified. To resolve this issue we deleted this report after which, we were able to compile the smsrprt.mof manually and thus SCCM SP2 install succeeded. After the install SCCM SP2 did recreate this report with the default queries. An alternate resolution may have been to simply modify the customized query in this report back to the SCCM SP1 defaults. It is not known why the report was not able to be upgraded as that troubleshooting path was not pursued.
F. Checking for pre-existing duplicate reports that are new to SCCM SP2:
In a different case that was very similar to Item E, another issue was discovered. The customer had created a custom report in SCCM SP1 called “Computers that do not meet the minimum system requirements for Windows 7”. This report does not exist in SP1 however SCCM SP2 tries to create this very same report as part of its default install.
The customer was seeing this message in ConfigMgrSetup.log:
<12-09-2009 15:17:37> CompileMOFFile: Starting to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<12-09-2009 15:18:11> CompileMOFFile: Failed to compile MOF C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -1
<12-09-2009 15:18:11> Setup cannot compile MOF file C:\Program Files (x86)\Microsoft Configuration Manager\bin\i386\smsRprt.mof. Do you want to continue?
In the SMSProv.log there was a message similar to the following:
Violation of UNIQUE KEY constraint 'Report_AK2'. Cannot insert duplicate key in object 'dbo.Report'.
Report names can in fact be the same as long as their conditions and queries are different. For example create a new report and call it “Computers that do not meet the minimum system requirements for Windows 7” for the category type select Asset Intelligence. This report can be created without error. However if you clone an existing report and try to name it the same you get a failure in the console.
"A report with this name and category already exists. Change the Name of this report to create a unique combination."
As with item E above, the resolution is to delete the pre-existing custom report and let SP2 recreate this report for you. A few other reports that do not exist in SCCM SP1 but are created in SCCM Sp2 to look out for are:
- “Computers that meet the recommended system requirements for Windows 7”
- “Computers that do not meet the minimum system requirements for Windows 7”
- "Windows 7 Upgrade Assessment - Hardware summary for all systems in a collection"
Note: Likely there are others as well. If you feel you have this issue compare SCCM SP2 Reports with SCCM SP1 Reports.
G. Upgrade fails due to registry setting:
In the ConfigMgrSetup.LOG:
<01-14-2009 16:50:22> CompileMOFFile: Compiled MOF D:\SMS\bin\i386\smsprov.mof
<01-14-2009 16:50:22> CompileMOFFile: Starting to compile MOF
D:\SMS\bin\i386\smsRprt.mof
<01-14-2009 17:06:12> CompileMOFFile: Failed to compile MOF
D:\SMS\bin\i386\smsRprt.mof, error -2147217407
<01-14-2009 17:06:12> Setup cannot compile MOF file D:\SMS\bin\i386\smsRprt.mof.
In the MofComp.LOG file:
(Wed Jan 14 16:50:23 2009.102320sment - Hardware summary for all systems in a collection"
Note: Likely there are others as well. If you feel you have this issue compare SCCM SP2 Reports with SCCM SP1 Reports.
In the ConfigMgrSetup.LOG: <01-14-2009 16:50:22> CompileMOFFile: Compiled MOF D:\SMS\bin\i386\smsprov.mof
Cause: This can occur if the following registry value is set: HLKM\Software\Microsoft\SMS\Providers Resolution: To resolve this issue, set SQL Cache Logging=0 Note: SQl Cache Logging should be enabled only for troubleshooting purposes and should not be left "on". For more information see SMS: How to Enable SQL Cache Logging in the Systems Management Server Provider
ConfigMgrSetup.log: <05-19-2008 15:10:45> CompileMOFFile: Starting to compile MOF D:\Program
SMSPROV.log showed a log in failure for the computer account of the site server. Check the rights for the Clustered SQL instance per
http://technet.microsoft.com/en-us/library/bb680513.aspx In this case we found that the computer account for the site server was not a member of the local admin group on either node. Adding the site server computer account to the local administrators group on both nodes and installation proceeded to a successful
conclusion. Note: A special thanks goes to to those who helped in the creation of this troubleshooter:
Jason Adams, Ryan Anderson, Jeevan Bisht, Manish Raval, Steve Hornaday and
Jason Schroeder. Note: This information was originally contributed by Buz Brodin, Senior Support Escalation Engineer, on the Configuration Manager Support Team blog:
G. Upgrade fails due to registry setting:
<01-14-2009 16:50:22> CompileMOFFile: Starting to compile MOF
D:\SMS\bin\i386\smsRprt.mof
<01-14-2009 17:06:12> CompileMOFFile: Failed to compile MOF
defined on lines 7 - 32 in file D:\SMS\bin\i386\smsRprt.mof:
(Wed Jan 14 17:06:12 2009.1971546) : Error Number: 0x800706be, Facility: Win32
Description: The remote procedure call failed.
SQL Cache Logging =1
http://support.microsoft.com/kb/295040H. Site System does not have rights to remote SQL System or Clustered SQL Nodes:
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof
<05-19-2008 15:11:26> CompileMOFFile: Failed to compile MOF D:\Program
Files\Microsoft Configuration Manager\bin\i386\smsRprt.mof, error -1
<05-19-2008 15:11:26> Setup cannot compile MOF file D:\Program Files\Microsoft
Configuration Manager\bin\i386\smsRprt.mof. Do you want to continue?