diff --git a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm index 8514cc711..04b48ac43 100644 --- a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm +++ b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm @@ -635,8 +635,12 @@ sub setNodeStatusAttributes { xCAT::MsgUtils->message("S", "Could not read the nodelist table\n"); } - $tab->close; - $nttab->close; + if ($tab) { + $tab->close; + } + if ($nttab) { + $nttab->close; + } return 0; }