NetWorker: restapi.log file not generated on NetWorker server deployed on Red Hat pacemaker cluster

Zhrnutie: restapi.log files are not generated on a NetWorker server deployed on the Red Hat pacemaker cluster.

Tento článok sa vzťahuje na Tento článok sa nevzťahuje na Tento článok nie je viazaný na žiadny konkrétny produkt. V tomto článku nie sú uvedené všetky verzie produktov.

Symptómy

  • The NetWorker server is deployed on a Red Hat HA (pacemaker) cluster.
  • Representational State Transfer (REST) Application Programming Interface (API) logs under /nsr/logs/restapi logs are not being generated.

Príčina

The shared drive is not being mapped to the REST API logging.

Riešenie

  1.  Log in to the active node as root.
Active node can be shown with:
pcs resource show
Example:
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. Confirm the mapping used by pacemaker:
lcmap
Example:
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. Make a copy of the 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. Modify the logback.xml to use the absolute path of the REST API logs directory: 
vi /nsr_share/nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml
Change:
<?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>
...
To:
<?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>
...
NOTE: Ensure that the share path name matches the name of the shared folder outputted by the lcmap command.
  1. Manually create the logs folder
mkdir /nsr_share/nsr/logs/restapi
  1. Change the ownership of the directory to nsrtomcat:
chown nsrtomcat:nsrtomcat /nsr_share/nsr/logs/restapi
  1. Set permissions on the REST API directory:
chmod 755 /nsr_share/nsr/logs/restapi
  1. Restart the clustered NetWorker services:
pcs resource restart nws
  1. Confirm that the restapi.log file is being generated once nws resource starts up:
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

Ďalšie informácie

Dotknuté produkty

NetWorker

Produkty

NetWorker Family, NetWorker Series
Vlastnosti článku
Číslo článku: 000206436
Typ článku: Solution
Dátum poslednej úpravy: 16 dec 2025
Verzia:  4
Nájdite odpovede na svoje otázky od ostatných používateľov spoločnosti Dell
Služby podpory
Skontrolujte, či sa na vaše zariadenie vzťahujú služby podpory.