ZCM Handler AppModule exception during General Refresh

  • 7007722
  • 29-Jan-2011
  • 27-Apr-2012

Environment

Novell ZENworks 10 Configuration Management with Support Pack 3 - 10.3 Bundles

Situation

Many bundles (50+) running at user login.
Not all bundles successfully install / launch during the login.
Bundles install / launch most of the time.
A few devices out of hundreds may have one or two bundles fail.

Resolution

This is fixed in version 10.3.2 - see KB 7007237 "ZENworks Configuration Management 10.3.2 - update information and list of fixes" which can be found at https://www.novell.com/support

Additional Information

Error (zmd-messages.log ):
 
"[DEBUG] [11/17/2010 10:37:31.390] [1644] [ZenworksWindowsService] [4] [DE1023] [RefreshMgr] [] [(Thread=4; SessionId=1724812; RefreshType=GeneralRefresh) Handler AppModule threw an exception
Type: System.ArgumentException
Message: Item has already been added. Key in dictionary: '9716be53436f9cdb53df0ea32d2ce97c'  Key being added: '9716be53436f9cdb53df0ea32d2ce97c'
Stack Trace:
       at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
       at System.Collections.Hashtable.Add(Object key, Object value)
       at Novell.Zenworks.AppModule.AppItemManager.AppItemList.AddAppItem(Session session, AppData data, Assignment() assignments, IService service, Boolean isAssignedToDevice)
       at Novell.Zenworks.AppModule.AppRefreshHandler.GeneralRefresh(Session session, Assignment() allAssignments, IService service, Boolean bypassServerCache)
       at Novell.Zenworks.AssignmentManager.BaseItemRefreshHandler.ProcessGeneralRefresh(Session session, String refreshType, RefreshResults results, CustomRefreshData refreshData)
       at Novell.Zenworks.AssignmentManager.BaseItemRefreshHandler.Refresh(Session session, RefreshContext context, RefreshResults results)
       at Novell.Zenworks.Zmd.Refresh.RefreshManager.NotifyRefreshHandlers(Session session, RefreshContext context, RefreshSummary summary, RefreshHandlerInfo() handlers)
] [] []  [ WARN] [11/17/2010 10:37:31.390] [1644] [ZenworksWindowsService] [4] [DE1023] [RefreshMgr] [ZMD.RefreshHandlerException] [Unexpected exception received when refreshing handler AppModule(GeneralRefresh): Item has already been added. Key in dictionary: '9716be53436f9cdb53df0ea32d2ce97c'  Key being added: '9716be53436f9cdb53df0ea32d2ce97c'] [] []
[DEBUG] [11/17/2010 10:37:31.406] [1644] [ZenworksWindowsService] [35] [] [ZMD] [] [ZenNative.StartUserDaemon(0) returned 1245] [] []
 
The 'ArgumentException' is seen due to the Object key existing in hash table during a general refresh.  This should never happen since the code checks for the existence of the key.  However, it is happening due to multiple refreshes occurring at the same time for the same session.  One refresh is triggered by Refresh timer (set for 15 - 30 seconds), and other by the GINA during login time (one with the swap session ID and one with the proper session ID).
 
The workaround is to disable the Random refresh (ZCC > Configuration > Device Management > Device Refresh and Removal Schedule > Timed Refresh > Random Time to Wait ).
 
An error that might be seen:  "Object reference not set to an instance of an object ".