Report Scheduler

OCM Report Scheduler Reschedule Functionality - Error : "Object reference not set to an instance of object"

Issue description:

Issue from OCM (version 3.2.10.2 & above) and report scheduler (version 2.0.10.2 & above).

  1. Navigate to OCM report scheduler module in OCM UI. 
  2. Click on the "reschedule" button to execute the report scheduler at that time (on-demand report scheduler execution).
  3. UI shows notification "object reference not set to an instance of an object".

Solution:

  1. Check the "SchedulerServerList" key in OCM web.config.
  2. If the key is not present, add the key. Check if the URL format is incorrect for the values in the key "SchedulerServerList". (ex:  https://<IPAddress>:<Port>/OCMReportScheduler/api/jobs/schedule)
  3. Check the firewall for port open. If the OCM and report scheduler are in the different server then need to open the port in the firewall.

     Procedures to check if the port in opened in firewall:

    1. Open command prompt and execute the command (Report scheduler service should be running while checking for this)

telnet < server ip where report scheduler is deployed> <scheduler api port>

below is the screenshot to indicate the port is open in firewall

If firewall port is not open, then below will be result of telnet

If the port is not open, then request for firewall access to open port. 

  1. Once the port is open see if the same report scheduler is in running status. Browse the URL in OCM server - https://<IPAddress>:<Port>/OCMReportScheduler/api/jobs/. It should display as below:

          "Service is running normally..."

 

Note: Rescheduling is possible only for the "recurring" type of reports. If the report is in "sinned" status, then it need to resolve by checking audit logs mentioned table name here or logs.

OCM Report Scheduler - Error : "The Underlying connection was closed. An unexpected error occured on a send".

Issue Description:

Error displayed in OCM Report Scheduler module “The Underlying connection was closed. An unexpected error occurred on a send”.

Components to verify:

Component

What to Check

Where to Check

Report Scheduler Service

Is the Report scheduler Service Up and Running

Start -> Task Manager -> Services Tab -> OCM_ReportScheduler

Firewall

Check if Report scheduler is reachable from OCM Application Server

telnet <Report Scheduler server IP> <port>

Issue Resolution:

Component

Details

Report scheduler service

If the service is not running, go to services and start the OCM_ReportScheduler service.

Firewall

If the port is not open, then request for firewall port open.

End point in OCM

In OCM web.config file, give the correct report scheduler api URL in "SchedulerServerList" key.

Certificate binding

Bind the certificate to report scheduler, if its running in https. 

To verify certificate binding, execute the command in command prompt.
netsh http show sslcert ipport=0.0.0.0:<port>.

OCM Report Scheduler Reschedule Functionality - Error : "Index was out of range".

Issue description:

Issue from OCM (version 3.2.10.2 & above) and report scheduler (version 2.0.10.2 & above).

  1. Navigate to OCM report scheduler module in OCM.
  2. Click on the "Reschedule" button to execute the report scheduler.  (on-demand report scheduler execution).
  3. UI shows notification "Index was out of range. Must be non-negative and less than the size of the collection".

Resolution:

1.  Check the "SchedulerServerList" key in OCM web config.

2.  If the "serverid" of OCM report scheduler is 3, then 3 URL's should be present in the "SchedulerServerList" values.

Ex: Suppose 3 OCM report scheduler is deployed for a client. In OCM config, 3 API URL should be given.

<add key="SchedulerServerList" value="http://<IPAddress>:<Port>/OCMReportScheduler1/api/jobs/schedule, http://<IPAddress>:<Port>/OCMReportScheduler2/api/jobs/schedule, http://<IPAddress>:<Port>/OCMReportScheduler3/api/jobs/schedule"/>

In OCM "Report scheduler" module,  if one of the report has "serverid" as 2, then the rescheduling will be done by the 2nd scheduler API mentioned in the config key.

For the above key "http://<IPAddress>:<Port>/OCMReportScheduler2/api/jobs/schedule" will be used.

Note: Rescheduling is possible only for the "recurring" type of reports. If the report is in "sinned" status then it needs to resolved by checking audit logs mentioned table name here or logs

How to reschedule a report in OCM Report Scheuduler?

Resolution: 

  • A report executing for particular interval of time can reschedule by updating record in ExportReportScheduler table.
  • Update InputEndDate, StatusDateTime and Frequency columns in the ExportReportScheduler table to reschedule.
  • Next execution will be from configured InputEndDate (as start date) to InputEndDate + Frequency (as end date).
  • Update StatusDateTime with old date (StatusDateTime  - frequency), as current date will be verified with StatusDateTime.

For example:

  • As below screenshot for AgentLoginLogoutReport, execution completed till 20190531 000000 (InputEndDate)

  • Now, this report to be till current date, frequency difference is 89 days i.e., current date (20190828 000000) - InputEndDate(20190531 000000)
  • Update FrequencyInMinutes column with 128160 (89 days)
  • Update StatusDateTime column to any old date (current date - 89 days), say 2019-05-17 00:00:00.000
  • As we have to continue from previous InputEndDate(20190531 000000), no need to update InputEndDate column
  • update ExportReportScheduler
    set FrequencyInMinutes = 128160, STATUSDATETIME = '2019-05-17 00:00:00.000'
    where ReportName ='AgentLoginLogoutReport'

  • Logs

  • Data will update for the frequency set as below

What is "DLL file not found" error in OCM Report Scheduler?

Resolution :

  • A new report in OCM Report Scheduler must be configured accordingly  as below
    • A record in ExportReportScheduler table in database fro report
    • DLL config key in service as below
<add key="AgentInteractionReportDLL" value="E:\Products\OCM Report Scheduler Service\Source\OCM.ReportScheduler\Libs\AgentInteractionReport.dll" />
    • DLL in a specific path mentioned in the above key.
  • If specific report DLL not found in a specific path, service tries to invoke this gives the error as "DLL file not found."
  • Hence always make sure report DLL deployment done correctly in the specific service path