2 Replies Latest reply on Mar 30, 2017 10:12 AM by cwinning

    Incomplete scan when certain server present in list due to timeout.

    galex Rookie

      Hi,

       

      Symptoms: during scan, number of scanned 'freezes' at some point (e.g. 73 of 100 completed) for some minutes. Finally it shows 'Close (scan completed)'
      When viewing results of that scan, under 'Scan summary' it shows "Warning: Incomplete results".

      Attempts to scan the same group(s) of servers every time produces new random number of completed.

       

      Investigation: i've found that the reason is one certain server, scanning become OK when i excluded this server from group. It seems like number of 'incompleted' depends on when scanning engine started working with this 'problem' server.

       

      Server is not new, last months it was present in group but scans were OK. I also tried to perform all DB maintenance tasks, storing just last 10 days and performed backup\shrink, lowering it's size from 6 to 1 Gb, but that not helped.

       

      Checking logs, i found:

      All problem scans ending with result file in '...Arrivals\Patch\Xml\BadFiles' folder (cleaning the folder not helped)


      I cleaned log folders, then tried to scan single 'normal' server, then single 'bad' and find the difference in logs.

      part of logs related to 'bad' server scan:

       

      St.protect.managed log
      .....
      2017-03-30T08:47:24.9843750Z 0006 I PatchAndAssetResolver.cs:119|Scan id = e253b035-6631-4df8-9f30-10679b52465a, Total = 1, Duplicates = 0, Filtered = 0, Excluded = 0

      2017-03-30T08:47:24.9843750Z 0006 V AddressTester.cs:114|AddressTesterInternal disposed

      2017-03-30T08:48:02.6093750Z 0016 S WorkItemScanPatch.cs:276|InitializeScanAndStartAsync|Leaving.

      2017-03-30T08:58:02.7968750Z 0018 V ScanItemsController.cs:146|Scan 'e253b035-6631-4df8-9f30-10679b52465a' isn't complete, finished waiting due to timeout.

      2017-03-30T08:58:02.7968750Z 0018 W WorkItemScanPatch.cs:351|Timed out waiting for scan completion event.

      2017-03-30T08:58:02.8125000Z 0025 S WorkItemScanPatch.cs:92|RunAsync|Leaving.

      2017-03-30T08:58:02.8125000Z 0025 I WorkItemController.cs:410|Patch scan ended with status: 'Completed'

      2017-03-30T08:58:02.8593750Z 0018 I OperationPresenter.cs:273|Completed ST.UI.Controllers.Scheduling.PatchScan operation: Not_patched

      .........

       

      ST.ServiceHost.managed
      ...............................
      2017-03-30T08:46:48.2500000Z 0005 I ComponentManager.cs:386|Component 'PowerShellEngine' started.

      2017-03-30T08:46:55.6406250Z 0009 V TaskHandler.cs:107|Executing task: <task version="1.0"><method type="ST.Services.Administration.LicenseRefresh,ST.Services.Administration" name="RunAsync" /></task>

      2017-03-30T08:46:55.6875000Z 0009 I LicenseRefresh.cs:49|Starting license refresh.

      2017-03-30T08:46:57.2031250Z 0011 V SupportManagementComponent.cs:95|Configuration changed.

      2017-03-30T08:46:57.3593750Z 0011 I CloudSynchronization.cs:172|Not activated, leave off.

      2017-03-30T08:46:58.3750000Z 0007 I LicenseRefresh.cs:93|Finished license refresh.

      2017-03-30T08:47:47.7968750Z 0004 V RescanManager.cs:546|No more rescan items, shutting down rescan task.

      2017-03-30T08:48:28.2968750Z 0016 E PersistResultPipeline.cs:198|System.ArgumentException: An item with the same key has already been added.

         at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)

         at ST.Data.Protect.Patches.Results.PatchProductLevel.<BulkMergeAsync>d__19.MoveNext()

      --- End of stack trace from previous location where exception was thrown ---

         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

         at ST.Data.Protect.Patches.Results.PatchResultBatch.<SaveResultsAsync>d__18.MoveNext()

      --- End of stack trace from previous location where exception was thrown ---

         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

         at ST.Data.Protect.Results.ScanResultBatch.<SaveRelatedResultBatchAsync>d__37.MoveNext()

      --- End of stack trace from previous location where exception was thrown ---

         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

         at ST.Data.Protect.Results.ScanResultBatch.<SaveAsync>d__0.MoveNext()

      --- End of stack trace from previous location where exception was thrown ---

         at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

         at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

         at ST.Services.Import.BatchImporter.PersistResultPipeline.<AttemptSaveAsync>d__1.MoveNext()

      2017-03-30T08:48:28.2968750Z 0016 W ResultFileQueueManager.cs:148|Result file 'C:\ProgramData\LANDESK\Shavlik Protect\Console\Arrivals\Patch\Xml\eb7c0d89-74ae-49df-aacd-0387e1921ffb' is duplicate or invalid. Moving to bad files.

      2017-03-30T08:48:47.7968750Z 0005 V RescanManager.cs:546|No more rescan items, shutting down rescan task.

      2017-03-30T08:49:47.7968750Z 0017 V RescanManager.cs:546|No more rescan items, shutting down rescan task.

      2017-03-30T08:50:47.7968750Z 0013 V RescanManager.cs:546|No more rescan items, shutting down rescan task.

      2017-03-30T08:51:47.7968750Z 0019 V RescanManager.cs:546|No more rescan items, shutting down rescan task.

      2017-03-30T08:52:47.7968750Z 0022 V RescanManager.cs:546|No more rescan items, shutting down rescan task.

      2017-03-30T08:53:47.1718750Z 0024 V TaskHandler.cs:107|Executing task: <task version="1.0"><method type="ST.Services.Scheduler.ScheduleMaintenance,ST.Services.Scheduler" name="RunAsync" /></task>

      2017-03-30T08:53:47.7968750Z 0023 V RescanManager.cs:546|No more rescan items, shutting down rescan task.

      2017-03-30T08:54:47.7968750Z 0022 V RescanManager.cs:546|No more rescan items, shutting down rescan task.
      .................................

       

      That happens every time when i scan group containing 'bad' server, just scan number (''e253b....') different every time.
      It seems like i have to clean some value in particular table in 'ShavlikScans' DB, but i don't know where and whether it breaks program logic.