Server Configuration
Servers should be activated, running, configured for queue processing and have non zero values for MaxQueueLength
and MaxActiveJobs.
select ServerID, convert(nvarchar(50), Hostname) as Hostname, ss.Name as ServerState, MaxQueueLength, MaxActiveJobs, IsQueueProcessingEnabled from config.t_Server s inner join config.t_ServerState ss on s.StateID = ss.ServerStateID
.
Location Configuration
Each location must be enabled and linked to to a scanning server. The MaxScanningCount
dictates how many targets in the location can be scanned at one time.
select l.Name as Location, l.IsEnabled, l.MaxScanningCount, s.ServerId, s.Version, s.Hostname from config.t_Location l left join config.t__Location_Server ls on l.LocationId = ls.LocationID left join config.t_Server s on ls.ServerID = s.ServerID left join config.t_ServerState ss on s.StateID = ss.ServerStateID
If there is a scan window for the location, jobs will only be served during this time. If the scan window is an exclusion, there needs to be a non-exclusion scan window for jobs to be served.
select sw.*, swwd.WeeklyDays, l.LocationId, l.Name from config.t_ScanWindow sw left join config.t_ScanWindowWeeklyDays swwd on sw.ScanWindowID = swwd.ScanWindowID left join config.t_Location l on sw.LocationID = l.LocationID
.
Project Configuration
The project should be running...
select p.Name as Project, ps.Name as [Status] from config.t_Project p inner join config.t_ProjectState ps on p.ProjectStateID = ps.ProjectStateID
.
Current Snapshot of Incomplete Jobs
select s.ServerID, convert(nvarchar(50), s.Hostname) as Hostname, tp.Name as JobPhase, ts.Name as JobStatus, j.JobId, ParentJobID, convert(nvarchar(50), j.Hostname) as Hostname, j.IPAddressBinary, IsComplete, StartDate, EndDate, DATEDIFF(hh, StartDate, getDate()) as 'Duration {Hours)', q.JobStatusID, ' QUEUE DATA --> ', js.name as QueueStatus, DisabledUntil, [Priority], Source, QueueId, IgnoreConfiguredIPs from jobs.t_Job j inner join config.t_Server s on j.ServerID = s.ServerID inner join jobs.t_TargetStatus ts on j.TargetStatusID= ts.TargetStatusID inner join jobs.t_TargetPhase tp on ts.TargetPhaseID = tp.TargetPhaseID inner join jobs.t_Queue q on j.JobId = q.JobID inner join jobs.t_JobStatus js on q.JobStatusID = js.JobStatusID where tp.TargetPhaseID = @PHASE_IN_PROGRESS or IsComplete = 0
.
Confirm Job Serving Threads are Running
- Open SQL Profiler
- Select the File > New Trace menu option and login to the server. There are some specific permissions/securables (ALTER TRACE maybe). A sys admin user will definitely have access.
- In the Trace Properties dialog which appears, select the Events Selection tab.
- Click the Show all events and Show all columns checkboxes.
- In the event list, ensure only the following items are ticked..
- Stored Prodedures
- RPC: Completed
- RPC: Starting
- SP: Completed
- SP: Starting
- Stored Prodedures
- Click the Column Filters button.
- Add Like filters for the following properties (if there is a pre-existing filter on ApplicationName, leave it there)…
- DatabaseName: Name of iQSonar database. (Normally iQSonarSE)
- HostName: Hostname of the scanning server
- TextData: %jobs%
- Start the trace
Let it run for about 5 minutes. You should see repeated entries for jobs.QueueStep2_SetJobStatus and
If you don't see this, it's likely the threads have fallen over and a service re-start may be required.jobs.Targets_Serve
.
.
What about 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.