NetWorker:部署在 Red Hat Pacemaker 叢集上的 NetWorker 伺服器未產生restapi.log檔案

Resumen: 部署在 Red Hat 起搏器叢集上的 NetWorker 伺服器不會產生restapi.log檔案。

Este artículo se aplica a Este artículo no se aplica a Este artículo no está vinculado a ningún producto específico. No se identifican todas las versiones del producto en este artículo.

Síntomas

  • NetWorker 伺服器部署在 Red Hat HA (起搏器) 叢集上。
  • 不會產生 /nsr/logs/restapi 記錄下的具象狀態傳輸 (REST) 應用程式發展介面 (API) 記錄。

Causa

共用磁碟機未對應至 REST API 記錄。

Resolución

  1.  以根使用者身分登入主動節點。
作用中節點可以顯示如下:
pcs resource show
範例:
root@NWrhelNodeC:~# pcs resource show
 Resource Group: NW_group
     fs (ocf::heartbeat:Filesystem):    Started NWrhelNodeC.emclab.local
     ip (ocf::heartbeat:IPaddr):        Started NWrhelNodeC.emclab.local
     nws        (ocf::EMC_NetWorker:Server):    Started NWrhelNodeC.emclab.local
  1. 確認起搏器使用的對應:
lcmap
範例:
root@NWrhelNodeC:~# lcmap
type: NSR_CLU_TYPE;
clu_type: NSR_LC_TYPE;
interface version: 1.0;

type: NSR_CLU_VIRTHOST;
hostname: 192.168.25.40;
local: TRUE;
owned paths: /nsr_share;
  1. 製作 REST API 的複本logback.xml:
cp /nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml /nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml.bak
  1. 修改logback.xml以使用 REST API 記錄目錄的絕對路徑: 
vi /nsr_share/nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml
變:
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="10 seconds">
  <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
    <resetJUL>true</resetJUL>
  </contextListener>

  <define name="logdir" class="com.emc.nw.webapi.LogDir"/>


  <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${logdir}/restapi.log</file>
    <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{15} - %msg%n</pattern>
    </encoder>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>${logdir}/restapi_%i.log.zip</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>10</maxIndex>
      <totalSizeCap>500MB</totalSizeCap>
...
至:
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="10 seconds">
  <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
    <resetJUL>true</resetJUL>
  </contextListener>

  <define name="logdir" class="com.emc.nw.webapi.LogDir"/>


  <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>/nsr_share/nsr/logs/restapi/restapi.log</file>
    <encoder>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{15} - %msg%n</pattern>
    </encoder>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>/nsr_share/nsr/logs/restapi/restapi_%i.log.zip</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>10</maxIndex>
      <totalSizeCap>500MB</totalSizeCap>
...
注意:請確定共用路徑名稱與 lcmap 命令輸出的共用資料夾名稱相符。
  1. 手動建立記錄資料夾
mkdir /nsr_share/nsr/logs/restapi
  1. 將目錄的擁有權變更為 nsrtomcat
chown nsrtomcat:nsrtomcat /nsr_share/nsr/logs/restapi
  1. 設定 REST API 目錄的權限:
chmod 755 /nsr_share/nsr/logs/restapi
  1. 重新啟動叢集 NetWorker 服務:
pcs resource restart nws
  1. 確認 nws 資源啟動後,便會產生restapi.log檔案:
root@NWrhelNodeC:~# ls -l /nsr_share/nsr/logs/restapi/
total 7428
-rw-------. 1 nsrtomcat nsrtomcat 7603829 Dec 14 11:01 restapi.log
-rw-------. 1 nsrtomcat nsrtomcat       0 Dec 14 10:46 rest_index.raw

Información adicional

Productos afectados

NetWorker

Productos

NetWorker Family, NetWorker Series
Propiedades del artículo
Número del artículo: 000206436
Tipo de artículo: Solution
Última modificación: 16 dic 2025
Versión:  4
Encuentre respuestas a sus preguntas de otros usuarios de Dell
Servicios de soporte
Compruebe si el dispositivo está cubierto por los servicios de soporte.