NetWorker : java.io.IOException : Format de magasin de clés non valide
Summary: Impossible de répertorier ou de modifier les fichiers de magasin de clés NetWorker AUTHC ou NetWorker Web User Interface (NWUI) à l’aide de Java KeyTool.
Symptoms
Le serveur NetWorker Authentication (AUTHC) ou le serveur NetWorker Web User Interface (NWUI) incluent Java Runtime Environment (JRE). En général, cette opération est facilitée par l’utilisation de NetWorker Runtime Environment (NRE).
Linux : /opt/nre/java/latest
Windows. : C:\Program Files\NRE\java\jre#.#.#_###
Lors de l’utilisation de la commande keytool pour passer en revue les fichiers du magasin de clés NetWorker authc/NWUI, une erreur java s’affiche :
[root@nsr bin]# keytool -list -keystore /nsr/authc/conf/authc.keystore Enter keystore password: keytool error: java.io.IOException: Invalid keystore format
Cette erreur s’affiche même lors de l’exécution de la commande keytool directement à partir du répertoire bin java NRE.
Fichiers du magasin de clés du NetWorker Server :
-
/nsr/authc/conf/authc.keystore/nsr/authc/conf/authc.truststore/opt/nsr/authc-server/conf/authc.truststore/opt/nre/java/latest/lib/security/cacerts
-
C:\Program Files\EMC NetWorker\nsr\authc-server\conf\authc.truststoreC:\Program Files\EMC NetWorker\nsr\authc-server\tomcat\conf\authc.keystoreC:\Program Files\NRE\java\jre##.#_###\lib\security\cacerts
-
/nsr/nwui/monitoring/app/conf/nwui.keystore/opt/nre/java/latest/cacerts
-
C:\Program Files\EMC NetWorker\nwui\monitoring\app\conf\nwui.keystoreC:\Program Files\NRE\java\jre#.#.#_###\lib\security\cacerts
Cause
Une autre version d’Oracle Java Runtime Environment (JRE) est installée sur l’hôte. L’installation d’Oracle JRE interfère avec NRE.
Resolution
Il est recommandé d’utiliser NetWorker Runtime Environment (NRE) avec les applications NetWorker. Le journal d’installation AUTHC du serveur NetWorker identifie le « chemin Java » utilisé :
/opt/nsr/authc-server/logs/install.log
[root@nsr ~]# cat /opt/nsr/authc-server/logs/install.log | grep "Java Path" Java Path Yes /opt/nre/java/latest Java Path Yes /opt/nre/java/latest Java Path Yes /opt/nre/java/latestWindows. :
%LOCALAPPDATA%\Temp\NetWorker_YYYYMMDDHHmmSS_#_AuthC.log
JAVAHOME = C:\Program Files\NRE\java\jre1.8.0_471Sinon, à partir d’une invite de commande d’administration, exécutez :
echo %NSR_JAVA_HOME%
$env:NSR_JAVA_HOME
C:\Users\Administrator.NETWORKER>echo %NSR_JAVA_HOME% C:\Program Files\NRE\java\jre1.8.0_471 PS C:\Users\Administrator.NETWORKER> $env:NSR_JAVA_HOME C:\Program Files\NRE\java\jre1.8.0_471
Utilisation d’une variable de ligne de commande pour forcer keytool utilisation à partir de NRE :
Linux :
keytool=/opt/nre/java/latest/bin/keytool
Exemple :
[root@nsr ~]# keytool=/opt/nre/java/latest/bin/keytool
Exécutez toutes les commandes keytool à l’aide de la variable :
[root@nsr ~]# $keytool Key and Certificate Management Tool Commands: -certreq Generates a certificate request -changealias Changes an entry's alias -delete Deletes an entry -exportcert Exports certificate -genkeypair Generates a key pair -genseckey Generates a secret key -gencert Generates certificate from a certificate request -importcert Imports a certificate or a certificate chain -importpass Imports a password -importkeystore Imports one or all entries from another keystore -keypasswd Changes the key password of an entry -list Lists entries in a keystore -printcert Prints the content of a certificate -printcertreq Prints the content of a certificate request -printcrl Prints the content of a CRL file -storepasswd Changes the store password of a keystore Use "keytool -command_name -help" for usage of command_name
Windows. :
Utilisez la commande NSR_JAVA_HOME pour exécuter des commandes à partir du NRE bin Répertoire.
Exemple d’invite de commande :
"%NSR_JAVA_HOME%\bin\keytool.exe" OPTIONS
Exemple PowerShell :
& "$env:NSR_JAVA_HOME\bin\keytool.exe" OPTIONS
C:\Users\Administrator.NETWORKER>"%NSR_JAVA_HOME%\bin\keytool.exe" Key and Certificate Management Tool Commands: -certreq Generates a certificate request -changealias Changes an entry's alias -delete Deletes an entry -exportcert Exports certificate -genkeypair Generates a key pair -genseckey Generates a secret key -gencert Generates certificate from a certificate request -importcert Imports a certificate or a certificate chain -importpass Imports a password -importkeystore Imports one or all entries from another keystore -keypasswd Changes the key password of an entry -list Lists entries in a keystore -printcert Prints the content of a certificate -printcertreq Prints the content of a certificate request -printcrl Prints the content of a CRL file -storepasswd Changes the store password of a keystore Use "keytool -command_name -help" for usage of command_name ............................................................................................................................................................................. PS C:\Users\Administrator.NETWORKER> & "$env:NSR_JAVA_HOME\bin\keytool.exe" Key and Certificate Management Tool Commands: -certreq Generates a certificate request -changealias Changes an entry's alias -delete Deletes an entry -exportcert Exports certificate -genkeypair Generates a key pair -genseckey Generates a secret key -gencert Generates certificate from a certificate request -importcert Imports a certificate or a certificate chain -importpass Imports a password -importkeystore Imports one or all entries from another keystore -keypasswd Changes the key password of an entry -list Lists entries in a keystore -printcert Prints the content of a certificate -printcertreq Prints the content of a certificate request -printcrl Prints the content of a CRL file -storepasswd Changes the store password of a keystore Use "keytool -command_name -help" for usage of command_name
Si NetWorker utilise NetWorker Runtime Environment (NRE) et qu’un autre environnement d’exécution Oracle Java (JRE) est installé, supprimez le package Oracle JRE.
Linux :
- Recherchez une autre installation de JRE. Les commandes suivantes peuvent être utilisées : Toutefois, consultez votre administrateur système Linux :
rpm -qa --last | grep jre find / -name java -type f
/etc/alternatives /usr/bin/java /usr/lib/jreX
- Si un autre package JRE est installé, consultez l’administrateur système Linux pour savoir s’il peut être retiré.
rpm -e package_name
Windows. :
- Ouvrez le Panneau de configuration Windows -> Programmes et fonctionnalités.
- Consultez la liste des packages Oracle Java Runtime Environment (à l’exception de NetWorker Runtime Environment).
- Si Oracle Java Runtime Environment est installé, consultez l’administrateur système Windows pour savoir s’il peut le supprimer.
- Désinstallez l’environnement d’exécution Oracle Java du système.
- Ouvrez une nouvelle session d’invite de commande pour exécuter les commandes keytool une fois qu’Oracle JRE a été supprimé.
Additional Information
- NetWorker : Identification du serveur d’authentification utilisé par NMC et NWUI
- NetWorker : Configuration de l’authentification LDAPS
- NetWorker : comment importer ou remplacer les certificats signés par l’autorité de certification pour « AUTHC » et « NWUI » (Linux) (en anglais)
- NetWorker : comment importer ou remplacer les certificats signés par l’autorité de certification pour « AUTHC » et « NWUI » (Windows) (en anglais)