Avamar : Mauvaise réponse de l’interface utilisateur (AUI) d’Avamar et de la console Avamar Administrator lors de la création ou de la modification d’un groupe de sauvegarde

Summary: Cet article traite d’un problème lié à la base de données Avamar Management Console (MCDB) concernant une valeur de colonne dans la table retention_policies.

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

Une tentative de création ou de modification d’un groupe de sauvegarde n’aboutit à aucune réponse.
Rien n’est référencé dans les logs MCS (Management Console Service), mais dans les logs de l’API rest.

Vous trouverez ci-dessous le journal d’Avamar REST API.
/usr/local/avamar/var/mc/server_log/mc-rest-api.log

java.lang.IllegalArgumentException: No enum constant com.avamar.mc.api.replication.dto.DurationUnits.HOURS
  at java.lang.Enum.valueOf(Unknown Source)
  at com.avamar.mc.api.replication.dto.DurationUnits.valueOf(DurationUnits.java:3)
  at com.avamar.mc.api.retention.service.RetentionServiceImpl.convertRetentionPolicyDescriptor(RetentionServiceImpl.java:194)
  at com.avamar.mc.api.retention.service.RetentionServiceImpl.getRetentions(RetentionServiceImpl.java:65)
  at com.avamar.mc.api.retention.web.RetentionController.getRetentions(RetentionController.java:48)
  at com.avamar.mc.api.retention.web.RetentionController$$FastClassBySpringCGLIB$$5ac7ec93.invoke(<generated>)
  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
  at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
  at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
  at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
  at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
  at com.avamar.mc.api.retention.web.RetentionController$$EnhancerBySpringCGLIB$$ebae7189.getRetentions(<generated>)
  at sun.reflect.GeneratedMethodAccessor4160.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)

Attention à l’erreur :
java.lang.IllegalArgumentException: No enum constant com.avamar.mc.api.replication.dto.DurationUnits.HOURS

Cause

La MCDB a enregistré une valeur de 0 dans la colonne d’unités de la table de retention_policies. 

La valeur 0 dans cette colonne indique que la période de rétention est mesurée en heures. Toutefois, l’unité de période de rétention est définie par quatre valeurs : jours [1], semaines [2], mois [3] et années [4].

Java n’a pas de valeur constante définie pour l’unité d’heures, il ne s’agit donc pas d’une valeur constante valide lors de l’exécution de la méthode enum.valueOf().

Vous pouvez voir DurationUnits.HOURS, où il génère une erreur indiquant qu’il n’existe aucune constante d’énumération des heures.

Exemple :
MCDB avec les entrées défectueuses
admin@avamar:~/>: psql -p 5555 mcdb
psql (10.6)
Type "help" for help.

mcdb=# select id,name,duration,unit from retention_policies;
        id        |             name             | duration | unit
------------------+------------------------------+----------+------
 MONTHLY:PolicyID | Monthly Retention            |        1 |    3
 WEEKLY:PolicyID  | Weekly Retention             |        1 |    2
 Default:POLICYID | Default Retention            |       60 |    1
 EndUser:PolicyID | End User On Demand Retention |       60 |    1
 Minimal:PolicyID | Minimal Retention            |       60 |    1
 RP1652848159766  | Platinum                     |       60 |    0 <-- These 0s
 RP1652848162931  | Gold                         |       60 |    0 <-- These 0s
 RP1652848166086  | Silver                       |       60 |    0 <-- These 0s
 RP1652848169312  | Bronze                       |       60 |    0 <-- These 0s
(9 rows)

Resolution

Étape 1 :
Effectuez une sauvegarde de MCS.
mcserver.sh --flush


Étape 2 :
Arrêtez MCS.
mcserver.sh --stop --force


Étape 3 :
Activez la MCDB manuellement.
dbmaint.sh  --db=on --dbname=mcdb


Étape 4 :
Mettez à jour la valeur de l’unité Retention Policies de 0 à 1.
psql -d mcdb -p 5555 -c "update retention_policies set unit=1 where unit=0"


Étape 5 :
Démarrez MCS.
mcserver.sh --start


Étape 6 :
Assurez-vous que vous pouvez désormais ajouter ou modifier une règle de sauvegarde dans AUI ou Avamar Administrator et démarrer l’ordonnanceur de sauvegarde.

Additional Information

Voir cette vidéo :

Vous pouvez également visionner cette vidéo sur YouTube.

Affected Products

Avamar
Article Properties
Article Number: 000200096
Article Type: Solution
Last Modified: 03 Feb 2025
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.