Deep Dive SCCM Application Model Troubleshooting

0
SCCM Application Model Troubleshooting

Hello, I’m Nitin Chhabra I worked for several years as a Microsoft support engineer specialized in SCCM Application Deployment technology. I am SME in Application deployment, Software Update deployment & OSD. In this post, you will dive deep into SCCM Application Model Troubleshooting.

Subscribe to This Blog via Email

Join 16,192 other subscribers

Introduction

Application Model is used extensively these days for Software Distribution from SCCM. However, troubleshooting Application deployment using this model is not an easy task due to the number of components involved. This post will help you in learning following pointers.

  • Understanding the role of various components involved in creation of an Application on SCCM Console
  • How the control is passed from one component to another
  • Troubleshooting the server-side issues while creation and deployment of newly created Application

Major Components Involved in SCCM Application Model Troubleshooting

  • SMS Admin UI
  • SMS Provider
  • SMS Database Monitor
  • Hierarchy Manager
  • Object Repl Mgr
  • Collection Evaluator
  • Policy PV

To discuss these components in detail, let us create a sample application say “Notepad++“. I have not included steps for creation of this application as the intend of this post is to understand the background process.

SCCM Application Model Troubleshooting
Sample Application: Notepad++
Deep Dive SCCM Application Model Troubleshooting 1
Deployment Type of app Notepad++

SMS Admin UI

This component captures all the activity done on the SCCM Console like creation of an application, collection, deployment etc. The location of the log file associated with this component is

<OS Drive>\Program Files (x86)\Microsoft Configuration Manager\AdminUILog\SMSAdminUI.log. 

SMS Provider

This component is connector between the SCCM Admin Console and the SCCM database. The configuration which is created on console is translated by SMS provider from WQL to SQL queries. When an Application is created below WMI classes is updated by SMS Provider.

  • SMS_Application
  • SMS_ApplicationTechnology

Connect to Root\SMS\Site_<site code> namespace of the WMI on the site server and check the new entries added in above classes. We can observe that a new instance in SMS_Application class is being created and fields like CI_ID, CI_UniqueID, LocalizedDisplayName etc are populated with Application details.

Deep Dive SCCM Application Model Troubleshooting 2
Snip from WMI Explorer showing details for SMS_Application class
SCCM Application Model Troubleshooting
SCCM Application Model Troubleshooting
SCCM Application Model Troubleshooting
Snip from WMI Explorer showing details from SMS_ApplicationTechnology class

Smsprov.log located at <Install Path>\Logs or SMS_CCM\Logs folder, it will show following details.

ExecQueryAsync: START select CI_ID from SMS_Application where IsLatest=1 and IsHidden=0 and LocalizedDisplayName='Notepad++' SMS Provider 
Adding Handle 60808272 to async call map SMS Provider 
IExtClassManager::ValidateAuthenticationLevel... SMS Provider 
CExtProviderClassObject::DoCreateInstanceEnumAsync (SMS_Application) SMS Provider 
CSspQueryForObject :: Execute... SMS Provider 
Execute WQL  =select CI_ID from SMS_Application where IsLatest=1 and IsHidden=0 and LocalizedDisplayName='Notepad++' SMS Provider 
Execute SQL =select  all SMS_Application.CI_ID from fn_ListApplicationCIs_List(1033) AS SMS_Application  where ((SMS_Application.IsLatest = 1 AND SMS_Application.IsHidden = 0) AND SMS_Application.DisplayName = N'Notepad++') SMS Provider 
Results returned : 0 of 1 SMS Provider 
Removing Handle 60808272 from async call map SMS Provider 
ExecQueryAsync: COMPLETE select CI_ID from SMS_Application where IsLatest=1 and IsHidden=0 and LocalizedDisplayName='Notepad++' SMS Provider 
Execute WQL  =SELECT CI_ID, ModelName FROM SMS_ApplicationTechnology WHERE CIType_ID = 25 AND IsLatest = 1 SMS Provider 
Execute SQL =select  all SMS_ApplicationTechnology.CI_ID,SMS_ApplicationTechnology.ModelName from fn_ListAppTechnologyCIs(1033) AS SMS_ApplicationTechnology  where (SMS_ApplicationTechnology.CIType_ID = 25 AND SMS_ApplicationTechnology.IsLatest = 1) SMS Provider 
.
.
Added Content 631 to package : 'TTT0000D'. SMS Provider 

DoCreateInstanceEnumAsync (highlighted above) is the method that specifically is used to create a new instance in a WMI class, in this case the class is SMS_Application. The configuration item (CI) 1369 in the SMS_Application class represents the application we created. We can also notice that WQL queries is being converted to SQL queries. After this handle is passed to SMS Database Monitor.

SMS Database Monitor

The role of this component is to monitor the changes in key tables of database and take necessary action. In the below log snip, we can observe that database tables having Application CI information has been updated and notification is sent to objmgr, hman & distmgr components to take further actions. Following tables will be updated.

  • CI_ConfigurationItems
  • CI_ConfigurationItemsRelations_Flat
  • RBAC_ChangeNotification
RCV: UPDATE on CI_ConfigurationItems for CINotify_iud [1369  ][7322]   SMS_DATABASE_NOTIFICATION_MONITOR                                     RCV: UPDATE on CI_ConfigurationItems for CINotify_iud [1370  ][7347]   SMS_DATABASE_NOTIFICATION_MONITOR                
SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\1369.CIN  [7322]                SMS_DATABASE_NOTIFICATION_MONITOR                                    SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\1370.CIN  [7330]                SMS_DATABASE_NOTIFICATION_MONITOR         
RCV: INSERT on CI_ConfigurationItemRelations_Flat for CI_ConfigurationItemRelations_Flat_From_iud [1373  ][7326]                SMS_DATABASE_NOTIFICATION_MONITOR                                            RCV: INSERT on CI_ConfigurationItemRelations_Flat for CI_ConfigurationItemRelations_Flat_From_iud [1374  ][7327]                SMS_DATABASE_NOTIFICATION_MONITOR         
Modified trigger definition for Object Replication Manager[CINotify_iud]: table CI_ConfigurationItems(CI_ID) on insert,update, file CIN in dir C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\                SMS_DATABASE_NOTIFICATION_MONITOR                                                                             SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\hman.box\493.RBC  [7103] 

Below are details of the notification files dropped by SMS DB Mon.

  • CIN File: This file is dropped in Objmgr.box (\inboxes\objmgr.box\<CI_ID>.CIN). This file trigger Object Replication Manager to process new application.
  • RBC File: This file is dropped in hman.box (inboxes\hman.box\*.RBC). This file trigger Hierarchy Manager to process RBAC permissions for new application.
  • PKN File: This file is dropped in distmgr.box (inboxes\distmgr.box\<Pkg_ID>.PKN). This will trigger Distribution Manager to process newly created application.

SQL Query CI Details

If you want to get further details for the CI’s which got created earlier, run the following SQL select query after connecting to database.

Select * from CI_ConfigurationItems where CI_ID in (‘1369’, ‘1370’,
‘1371’, ‘1372’); here 1369-1372 were the CI's created for the notepad++ application
Deep Dive SCCM Application Model Troubleshooting 3
SCCM Application Model Troubleshooting

Click on SDMPackageDigest to get details CI’s in XML format. The version listed in CIVersion tab will be updated when you change/update the application.

Now let us distribute this application to a distribution point and study what changes happens in background. The SMS Database Monitor component send notification to Distribution Manager to start the distribution using the “<Pkg_ID>.PKN” file. We will see the following in SMSDBMon.log.

SND: Dropped C:\Program
Files\Microsoft Configuration Manager\inboxes\distmgr.box\TTT0000D.PKN  [7393] SMS_DATABASE_NOTIFICATION_MONITOR

The Distribution Manager keep on monitoring the inbox for such notifications and will start processing the new application distribution once .PKN file is dropped. We will observe the same in Distmgr.log.

Started package processing thread for package 'TTT0000D', thread ID = 0x335C (13148)    SMS_DISTRIBUTION_MANAGER    

Sleeping for 60 minutes before content cleanup task starts.    SMS_DISTRIBUTION_MANAGER    

Sleep 3600 seconds…    SMS_DISTRIBUTION_MANAGER    

STATMSG: ID=2300 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=1702-CAS.QA.COM SITE=TTT PID=13616 TID=13148 GMTDATE=Sat Nov 18 21:02:12.644 2017 ISTR0="Notepad++" ISTR1="TTT0000D" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=400 AVAL0="TTT0000D"    SMS_DISTRIBUTION_MANAGER    

Processing package TTT0000D (SourceVersion:1;StoredVersion:1)    SMS_DISTRIBUTION_MANAGER    

No action specified for the package TTT0000D, however there may be package server changes for this package.    SMS_DISTRIBUTION_MANAGER    

All DP threads have completed for package TTT0000D processing thread.    SMS_DISTRIBUTION_MANAGER    

Package TTT0000D does not have a preferred sender.    SMS_DISTRIBUTION_MANAGER    

STATMSG: ID=2333 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=1702-CAS.QA.COM SITE=TTT PID=13616 TID=13148 GMTDATE=Sat Nov 18 21:02:13.449 2017 ISTR0="TTT0000D" ISTR1="PPP" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=400 AVAL0="TTT0000D"    SMS_DISTRIBUTION_MANAGER    

Needs to send the compressed package for package TTT0000D to site PPP    SMS_DISTRIBUTION_MANAGER    

Sending a copy of package TTT0000D to site PPP    SMS_DISTRIBUTION_MANAGER

Here TTT0000D is the package id, every application has associated package id for its content. The compressed copy of the content is sent to destination site using legacy file distribution method in SCCM.

Distribution Components

Below listed components are involved in distribution of content.

  • Distribution Manager
  • Replmgr
  • Scheduler
  • Sender
  • Despooler
  • Status Message

Distribution manager creates the compressed copy of the content and notifies Replmgr which further trigger Scheduler component to schedule the sending job. Sender is the component which keep on polling the schedule set by Scheduler and make a connection to the destination site to send the actual data.

On the destination site the data is received by Despooler and it extract the compressed data. The instruction for extraction, reach destination via DRS (that’s why the package distribution stuck if the DRS is not working).

Once the instruction for extraction is received, package is extracted and added in the content library. Then the status message is sent to the sending site, which is an acknowledgement for distribution completion.

Application Deployment – SCCM Application Model Troubleshooting

Till now we have learned the background dynamics for creation and distribution of the application. Now we will focus on the deployment both machine and user based.

Once you deploy an application to a user or a machine based collection, policies are created which are then mapped to the PADBID (machine or user ID). Below are the major components involved for creation and mapping of deployments.

  • SMS Admin UI
  • SMS Database Monitor
  • HMan (Hierarchy Manager)
  • Object Repl Mgr
  • Collection Eval
  • Policy Provider

SMS Admin UI

For reference we have deployed our application to all user collection as an available deployment.

Deep Dive SCCM Application Model Troubleshooting 4
Deep Dive SCCM Application Model Troubleshooting 5

Once we complete the deployment window (on SCCM Admin Console), we will notice new entry in SMS_ApplicationAssignment class.

SCCM Application Model Troubleshooting
SCCM Application Model Troubleshooting

SMS Database Monitor

SMS DB Mon will now be triggered as it keeps monitoring such changes happening in database. SMS DB Mon will perform the following major jobs.

  • Insert Data in CI_AssignmentTargetedCIs
  • Send notification PolicyPV to create policy
  • Notifies HMan for setting up RBAC
  • Send notification to Objreplmgr

Below is the snip from SMSDBMon.log performing these tasks.

RCV: INSERT on CI_CIAssignments for CIAssignmentNotify_iu [2  ][12569]    SMS_DATABASE_NOTIFICATION_MONITOR   
 RCV: INSERT on CrpChange_Notify for CrpChange_Notify_ins [3  ][12570]    SMS_DATABASE_NOTIFICATION_MONITOR   
 RCV: INSERT on PfxAssignment_Notify for PfxAssignment_Notify [3  ][12571]    SMS_DATABASE_NOTIFICATION_MONITOR   
 RCV: INSERT on RBAC_ChangeNotification for Rbac_Sync_ChangeNotification [232  ][12572]    SMS_DATABASE_NOTIFICATION_MONITOR   
 RCV: INSERT on RBAC_ChangeNotification for Rbac_Sync_ChangeNotification [233  ][12573]    SMS_DATABASE_NOTIFICATION_MONITOR   
 RCV: INSERT on CI_AssignmentTargetedCIs for CI_AssignmentTargetedCIs_CIAMGR [2  ][12574]    SMS_DATABASE_NOTIFICATION_MONITOR    
SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\policypv.box\policytargeteval\3.CRP  [12570]    SMS_DATABASE_NOTIFICATION_MONITOR   
 SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\policypv.box\policytargeteval\3.PFXCREATE  [12571]    SMS_DATABASE_NOTIFICATION_MONITOR   
 SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\hman.box\232.RBC  [12572]    SMS_DATABASE_NOTIFICATION_MONITOR   
 SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\hman.box\233.RBC  [12573]    SMS_DATABASE_NOTIFICATION_MONITOR   
 SND: Dropped C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\2.CIA  [12574]    SMS_DATABASE_NOTIFICATION_MONITOR

PolicyPV.box

Now we have noticed that a .CRP file is dropped in PolicyPV box to create the policy of deployment. These notification files are processes almost immediately, so so I have to stop this component (not recommended) to check the actual file.

SCCM Application Model Troubleshooting
SCCM Application Model Troubleshooting

Below is the snip form Policypv.log which mention the processing of these notification files and updating the “ResPolicyMap” table with new policy details.

File notification triggered.    SMS_POLICY_PROVIDER 
Found 3.CRP    SMS_POLICY_PROVIDER 
Adding to delete list: C:\Program Files\Microsoft Configuration Manager\inboxes\policypv.box\policytargeteval\3.CRP    SMS_POLICY_PROVIDER 
File notification triggered.    SMS_POLICY_PROVIDER 
File notification triggered.    SMS_POLICY_PROVIDER 
Found 3.PFXCREATE    SMS_POLICY_PROVIDER 
Adding to delete list: C:\Program Files\Microsoft Configuration Manager\inboxes\policypv.box\policytargeteval\3.PFXCREATE    SMS_POLICY_PROVIDER 
Building Collection Change List from Collection Change Notification files    SMS_POLICY_PROVIDER 
--Process Collection Member Changes    SMS_POLICY_PROVIDER 
Building Collection Change List from Collection Member Notification files    SMS_POLICY_PROVIDER 
--Trying to update effective group    SMS_POLICY_PROVIDER 
-UpdateMDMUserTargetingForUser    SMS_POLICY_PROVIDER 
Start Update MDM User Targeting For User    SMS_POLICY_PROVIDER 
--UpdatePolicyMapForPA    SMS_POLICY_PROVIDER 
Processing any pending PolicyAssignmentChg_Notify    SMS_POLICY_PROVIDER 
Found 16777389.PAC    SMS_POLICY_PROVIDER 
Adding to delete list: C:\Program Files\Microsoft Configuration Manager\inboxes\policypv.box\policytargeteval\16777389.PAC    SMS_POLICY_PROVIDER 
File notification triggered.    SMS_POLICY_PROVIDER 
Updating ResPolicyMap    SMS_POLICY_PROVIDER 
Completed batch with beginning PADBID = 16777389 ending PADBID = 16777390.    SMS_POLICY_PROVIDER

Before the newly created policy is mapped to a user or a machine, the collection on which the deployment is targeted is checked for any incremental update to its membership. Below is the log snip from colleval.log.

PF: Collection process starts    SMS_COLLECTION_EVALUATOR    
PF: Looking for candidates for incremental evaluation    SMS_COLLECTION_EVALUATOR    
SQL MESSAGE: spCollBeginIncEvaluation - @NCollections = 10,   @NMachines = 0    SMS_COLLECTION_EVALUATOR    
Querying for incremental changes    SMS_COLLECTION_EVALUATOR    
SQL MESSAGE: spCollBeginIncEvaluation - Originating collection number = 0    SMS_COLLECTION_EVALUATOR    
PF: Found 0 candidate collection for incremental evaluation    SMS_COLLECTION_EVALUATOR    
Checking for collections needing their extended user membership updated.    SMS_COLLECTION_EVALUATOR

ObjReplMgr (Object Replication Manager)

Finally, the ObjReplMgr component complete the mapping of the policy & application CI’s to the padbit of the user or the machine. We can observer the same in objreplmgr.log.

SCCM Application Model Troubleshooting
SCCM Application Model Troubleshooting
File notification triggered.    SMS_OBJECT_REPLICATION_MANAGER  
+++Begin processing changed CIA objects    SMS_OBJECT_REPLICATION_MANAGER  
Processing Application Assignment {4C9BC381-985B-4753-B694-11A358CD0CA6}     SMS_OBJECT_REPLICATION_MANAGER  
Deleting notification file C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\2.CIA    SMS_OBJECT_REPLICATION_MANAGER  
No file trigger for C:\Program Files\Microsoft Configuration Manager\inboxes\objmgr.box\2.ADD - status 2    SMS_OBJECT_REPLICATION_MANAGER  
Info: Unable to get New CI Added notification file 2.ADD for CI Assignment Id 2 from objmgr inbox, no new CI added to this assignment    SMS_OBJECT_REPLICATION_MANAGER  
CI Assignment {4C9BC381-985B-4753-B694-11A358CD0CA6} has 1 Targeted CI(s)    SMS_OBJECT_REPLICATION_MANAGER  
PolicyID {4C9BC381-985B-4753-B694-11A358CD0CA6} PolicyVersion 1.00 PolicyHash SHA256:09052973FE1EB9EBCCDA1C500FA993A61A441D4608726BB62C5B79BA5A88EE65    SMS_OBJECT_REPLICATION_MANAGER  
Notifying policy provider about changes in policy content/targeting    SMS_OBJECT_REPLICATION_MANAGER  
Successfully created policy for CI Assignment {4C9BC381-985B-4753-B694-11A358CD0CA6}    SMS_OBJECT_REPLICATION_MANAGER  
PolicyID {4C9BC381-985B-4753-B694-11A358CD0CA6}/RunOnce PolicyVersion 1.00 PolicyHash SHA256:870BC3FD9EA71569811DA676B1788C4E74214359DA1E7AFD527420EE9490C206    SMS_OBJECT_REPLICATION_MANAGER  
Notifying policy provider about changes in policy content/targeting    SMS_OBJECT_REPLICATION_MANAGER  
Successfully created BGB policy for CI Assignment {4C9BC381-985B-4753-B694-11A358CD0CA6}    SMS_OBJECT_REPLICATION_MANAGER  
Catalog evaluation: Getting model id for CI Assignment ID = 2    SMS_OBJECT_REPLICATION_MANAGER  
Catalog table insert/update evaluation for Model Id 1373

Policy Details – SQL DB

Below are the SCCM DB tables which you can refer to validate the policy association with padbid. I have also added snips for reference.

  • Policy: This table contains the Policy ID details
  • PolicyAssignment: This table have the policy and padbid columns
  • PolicyCollMapFlat: This table have padbid and collection id details
Deep Dive SCCM Application Model Troubleshooting 6
SCCM Application Model Troubleshooting
Deep Dive SCCM Application Model Troubleshooting 7
SCCM Application Model Troubleshooting

So, this completes the server side process to create, distribute and deploy an application from SCCM. In the next post I will be covering the installation of application on client machine.

Resources

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.