NetWorker: java.io.IOException: Formato keystore non valido
Summary: Impossibile elencare o modificare i file del keystore NetWorker AUTHC o NetWorker Web User Interface (NWUI) utilizzando java keytool.
Symptoms
Il server NetWorker Authentication (AUTHC) o il server NetWorker Web User Interface (NWUI) includono Java Runtime Environment (JRE). In genere, ciò viene facilitato dall'utilizzo di NetWorker Runtime Environment (NRE).
Linux: /opt/nre/java/latest
Windows: C:\Program Files\NRE\java\jre#.#.#_###
Quando si utilizza il keytool per esaminare i file del keystore NetWorker authc/NWUI, viene visualizzato un errore Java:
[root@nsr bin]# keytool -list -keystore /nsr/authc/conf/authc.keystore Enter keystore password: keytool error: java.io.IOException: Invalid keystore format
Questo errore viene visualizzato anche quando si esegue keytool direttamente dalla directory bin java NRE.
File del keystore del server NetWorker:
-
/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
Sull'host è installata un'altra versione di Oracle Java Runtime Environment (JRE). L'installazione di Oracle JRE interferisce con NRE.
Resolution
Si consiglia di utilizzare NetWorker Runtime Environment (NRE) con le applicazioni NetWorker. Il log di installazione AUTHC del server NetWorker identifica il "percorso Java" utilizzato:
/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_471In alternativa, da un prompt dei comandi amministrativo eseguire:
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
Utilizzare una variabile della riga di comando per forzare keytool Utilizzo da NRE:
Linux:
keytool=/opt/nre/java/latest/bin/keytool
Esempio:
[root@nsr ~]# keytool=/opt/nre/java/latest/bin/keytool
Eseguire tutti i comandi keytool utilizzando la variabile:
[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:
Utilizzare il comando NSR_JAVA_HOME per eseguire comandi da NRE bin Directory.
Esempio di prompt dei comandi:
"%NSR_JAVA_HOME%\bin\keytool.exe" OPTIONS
Esempio di 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
Se NetWorker utilizza NetWorker Runtime Environment (NRE) e un altro ambiente di runtime Oracle Java (JRE) installato, rimuovere il pacchetto Oracle JRE.
Linux:
- Verificare la presenza di un'altra installazione JRE, è possibile utilizzare i seguenti comandi; tuttavia, consultare l'amministratore di sistema Linux:
rpm -qa --last | grep jre find / -name java -type f
/etc/alternatives /usr/bin/java /usr/lib/jreX
- Se è installato un altro pacchetto JRE, consultare l'amministratore di sistema Linux se è possibile rimuoverlo.
rpm -e package_name
Windows:
- Aprire Pannello di controllo di Windows -> Programmi e funzionalità.
- Esaminare l'elenco per un pacchetto Oracle Java Runtime Environment (escluso NetWorker Runtime Environment).
- Se è installato Oracle Java Runtime Environment, consultare il System Administrator di Windows se è possibile rimuoverlo.
- Disinstallare Oracle Java Runtime Environment dal sistema.
- Aprire una nuova sessione del prompt dei comandi per eseguire i comandi keytool una volta rimosso Oracle JRE.
Additional Information
- NetWorker: Come identificare il server di autenticazione utilizzato da NMC e NWUI
- NetWorker: come configurare l'autenticazione LDAPS
- NetWorker: come importare o sostituire i certificati firmati dall'autorità di certificazione per "AUTHC" e "NWUI" (Linux)
- NetWorker: come importare o sostituire i certificati firmati dall'autorità di certificazione per "AUTHC" e "NWUI" (Windows)