Schedules not shown in OC: Exception caught while maintenance schedules
search cancel

Schedules not shown in OC: Exception caught while maintenance schedules

book

Article ID: 265696

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

We noticed that we are not able to see any maintenance windows in the OC after applying UIM 20.4 CU6.

Maintenance schedules exist, but we get the message "No schedules are defined."

In the browser dev tools the getMaintenanceSchedules fails with 500 error
 
Extract of the devtools browser sesssion HAR File
 
    "content": {
            "size": 108,
            "mimeType": "application/json",
            "compression": -34,
            "text": "{\"statusCode\":500,\"statusPhrase\":\"Internal Server Error\",\"error\":\"Failed to retrieve Maintenance Schedules\"}"
 
The following error is reoccurring in loop in the operatorconsole.log:
2023-04-21 22:54:48.382 [https-jsse-nio-443-exec-30]  ERROR com.firehunter.operatorconsole.controller.MaintenanceScheduleController:getComputerSystemMaintenanceSchedules:324 controller.MaintenanceScheduleController - Exception caught while maintenance schedules 
java.lang.RuntimeException: java.lang.NumberFormatException: For input string: ""
    at com.firehunter.operatorconsole.service.MaintenanceScheduleService.getComputerSystemMaintenanceSchedules(MaintenanceScheduleService.java:978) ~[operatorconsole-api-20.4.9.jar:?]
    at
Additional issue info: 
 
•  New Created Maintenance Schedules are also NOT Visible
•  The Schedules appear correctly in the DB.
•  When executing probe utility, The callback get_all_maintenance_schedules returns the schedules correctly
•  The maintenance Schedules are working fine (are suppressing alarms on currently active maintenance) 
•  This occurs with the Administrator's Account 
•  Everything else is working fine in the OC

Environment

Release: UIM 20.4 CU6
Component: Operator Console

Cause

This appears to happen when an existing schedule is updated that had more than one day selected for when it would repeat and a day or days was/were removed. It will remove the day, but leave an unwanted comma at the beginning of the day that is remaining.

<maintenance_schedule>

  <id>4145</id>

<name>weekly offline backup</name>

  <description>#56907</description>

  <recurrenceDayOfTheMonth>0</recurrenceDayOfTheMonth>

  <recurrencePeriod>1</recurrencePeriod>

  <recurrencePattern>2</recurrencePattern>

  <timeZone>Europe/London</timeZone>

  <duration>2880</duration>

  <accountId>109</accountId>

  <recurrenceDaysOfTheWeek>,6</recurrenceDaysOfTheWeek>

  <startTime>2023-04-28</startTime>

  <recurrenceInstance>0</recurrenceInstance>

</maintenance_schedule>

Resolution

This issue is resolved in DX UIM 20.4 CU8 and later. It is recommended to update, but it may not be practical in the short term.

A temporary workaround is available by first running the following query to determine the problem entries:

select * from maintenance_schedule where RECURRENCE_DAYS_OF_THE_WEEK in (',1',',2',',3',',4',',5',',6',',7')

This will give you a list of shedules that need to be updated. So for instance lets say it returned several IDs that had ',7' we could then formulate the following to resolve the issue:

update MAINTENANCE_SCHEDULE set RECURRENCE_DAYS_OF_THE_WEEK = 7 where SCHEDULE_ID in (10841,10842,10844,10845,10846,10847,10987)

Additional Information