Report Scheduler

Timezone difference in OCM SMS host transaction report

Issue:

SMS Host transaction report shows timezone of the server (SGT) not the client(Thailand)

Resolution:

In Report scheduler tempate.config configure the key TimeZoneOffset to relevant time zone.

Ex:  For Thailand set "TimeZoneOffset"="1.0"

The offset must be from the server timezone.

OCM Schedular upgrading the build

SlSteps to identify.
1Look for the report name we are trying to find the issue in OCMreportSchedular Log.
2Once report name is  identified check the for the “AddedDate” or “NextEndDate” in logs.
Sample log  “DEBUG IPTListingReport.IPTListingReport - AddedDate for IPTListingReport: 1/17/2020 12:10:15 AM”.
3Check for the latest Scheduled job and identify the EndDate.
4Once identified check if the JobRunner for this Job is CRON or Recurring.

 

SlSteps to implement.
1Check the inputEndDate of the report you are going to backlog.
2Change the report type from CRON to Recurring.
3Then use the below script where frequencyInMinutes should be calculated from the time of InputEndDate and current time in minutes.Report type 1 is Reccuring and 0 is CRON
update ExportReportScheduler set FrequencyInMinutes = '101415', STATUSDATETIME = '2019-10-01 19:00:00', Status = 'COMPLETEDWITHSUCCESS', ReportType='1', StatusJob='3' where id = 5
4Once the changes is done change back Report type from Recurring to CRON.
update ExportReportScheduler set ReportType='0', where id = 5

 

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