NetWorker: restapi.log arquivo não gerado no servidor NetWorker implementado no cluster do Red Hat Pacemaker

Summary: restapi.log arquivos não são gerados em um servidor NetWorker implementado no cluster do Red Hat Pacemaker.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

  • O servidor do NetWorker é implementado em um cluster Red Hat HA (pacemaker).
  • Os logs da interface de programação de aplicativos (API) de transferência de estado representacional (REST) em /nsr/logs/restapi logs não estão sendo gerados.

Cause

A unidade compartilhada não está sendo mapeada para o log da API REST.

Resolution

  1.  Faça log-in como root no nó ativo.
O nó ativo pode ser mostrado com:
pcs resource show
Exemplo:
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. Confirme o mapeamento usado pelo pacemaker:
lcmap
Exemplo:
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. Faça uma cópia da API REST logback.xml:
cp /nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml /nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml.bak
  1. Modifique o logback.xml para usar o caminho absoluto do diretório de logs da API REST: 
vi /nsr_share/nsr/authc/webapps/nwrestapi/WEB-INF/classes/logback.xml
Mudar:
<?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>
...
Para:
<?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>
...
Nota: Certifique-se de que o nome do caminho de compartilhamento corresponda ao nome da pasta compartilhada gerada pelo comando lcmap .
  1. Crie manualmente a pasta de logs
mkdir /nsr_share/nsr/logs/restapi
  1. Altere a propriedade do diretório para nsrtomcat:
chown nsrtomcat:nsrtomcat /nsr_share/nsr/logs/restapi
  1. Defina permissões no diretório da API REST:
chmod 755 /nsr_share/nsr/logs/restapi
  1. Reinicie os serviços do NetWorker em cluster:
pcs resource restart nws
  1. Confirme se o arquivo restapi.log está sendo gerado assim que o recurso nws for iniciado:
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

Additional Information

Affected Products

NetWorker

Products

NetWorker Family, NetWorker Series
Article Properties
Article Number: 000206436
Article Type: Solution
Last Modified: 24 Mar 2025
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.