Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
select '/* Server: ' + s.HostName + ' */   exec [config].[Performance_Check] ''' + convert(nvarchar(50), InstallationID) + '''   -- Server: ' + s.Hostname
  from config.t_Server s


...


Anything in the logs?

Search the Service logs for the text iQSonar Job Poll. How much information you see here will depend on the level of logging (configuration for this not in scope here). Look for errors or warnings - but also look for messages similar to any of the following...

  • No queue capacity.
  • Queue processing is suspended
  • Polled N new targets
  • No new targets available
  • Failed to process target
  • Job acquisition stopped
  • iQSonar license has expired - scanning is suspended
  • iQSonar Server not activated - scanning is suspended.

.

Is Anything Blocking the Queue?

Some builds (pre Brendan R3 RC2) have an issue where targets from non-running projects are allowed to remain in the Queued state. These targets will never be picked up by job serving so they block the addition of new items to the queue.

Code Block
declare @PROJ_STATE_RUNNING int             = (select ProjectStateID from config.t_ProjectState where Name = 'Running')
declare @JOB_STATUS_QUEUED  int             = (select JobStatusID from jobs.t_JobStatus js where Constant = 'JOB_STATUS_QUEUED')

select * 
  from jobs.t_Queue q
 inner join config.t_Project p on q.ProjectId = p.ProjectId
 inner join config.t_ProjectState ps on p.ProjectStateID = ps.ProjectStateID
 where JobStatusID       = @JOB_STATUS_QUEUED
   and p.ProjectStateID != @PROJ_STATE_RUNNING


To fix this, run:

Code Block
declare @PROJ_STATE_RUNNING int             = (select ProjectStateID from config.t_ProjectState where Name = 'Running')
declare @JOB_STATUS_QUEUED  int             = (select JobStatusID from jobs.t_JobStatus js where Constant = 'JOB_STATUS_QUEUED')
declare @JOB_STATUS_PROJECT_NOT_RUNNING int = (select JobStatusID from jobs.t_JobStatus js where Constant = 'JOB_STATUS_PROJECT_NOT_RUNNING')

update q
   set q.JobStatusID = @JOB_STATUS_PROJECT_NOT_RUNNING
  from jobs.t_Queue q
 inner join config.t_Project p on q.ProjectId = p.ProjectId
 inner join config.t_ProjectState ps on p.ProjectStateID = ps.ProjectStateID
 where JobStatusID       = @JOB_STATUS_QUEUED
   and p.ProjectStateID != @PROJ_STATE_RUNNING


There was also an issue where targets in the queue can not be linked back to Targets. The root cause is still under investigation. Th e following statement identifies queue items affected by this problem - again they block spaces in the queue as job serving will not pick them up.

Code Block
    declare @JOB_STATUS_QUEUED  int             = (select JobStatusID from jobs.t_JobStatus js where Constant = 'JOB_STATUS_QUEUED')

    select *
      from jobs.t_Queue q
      left join ( 
                  select p.projectID, ipar.StartIPAddressBinary, ipar.EndIPAddressBinary, ipar.Hostname, ipar.IPAddressRangeID
                    from config.t_Project p
                   inner join config.t__Project_Location pl ON p.ProjectID   = pl.ProjectID
                   inner join config.t_Location l           ON pl.LocationID = l.LocationID
                   inner join config.t_IPAddressRange ipar  ON l.LocationID  = ipar.LocationID
                   where ipar.IsExclusion = 0
                ) projectTargets on q.ProjectId = projectTargets.ProjectID
                                AND ( ( q.IPAddressBinary BETWEEN projectTargets.StartIPAddressBinary AND EndIPAddressBinary ) 
                                          OR 
                                      ( q.IPAddressBinary = projectTargets.StartIPAddressBinary AND EndIPAddressBinary IS NULL) 
                                          OR 
                                      ( q.Hostname = projectTargets.Hostname ) 
                                          OR 
                                      ( q.IgnoreConfiguredIPs = 1 ) )
     WHERE q.JobStatusID = @JOB_STATUS_QUEUED
       and projectTargets.IPAddressRangeID is null