NetWorker: java.io.IOException: Nieprawidłowy format magazynu kluczy
Summary: Nie można wyświetlić lub zmodyfikować plików NetWorker AUTHC lub magazynu kluczy sieciowego interfejsu użytkownika NetWorker (NWUI) za pomocą narzędzia Java keytool.
Symptoms
Serwer uwierzytelniania NetWorker (AUTHC) lub serwer sieciowego interfejsu użytkownika NetWorker (NWUI) zawiera środowisko Java Runtime Environment (JRE). Zazwyczaj jest to możliwe przy użyciu środowiska NetWorker Runtime Environment (NRE).
Linux: /opt/nre/java/latest
Windows: C:\Program Files\NRE\java\jre#.#.#_###
W przypadku korzystania z keytool poleceniem do przejrzenia plików magazynu kluczy NetWorker authc/NWUI, pojawia się błąd Java:
[root@nsr bin]# keytool -list -keystore /nsr/authc/conf/authc.keystore Enter keystore password: keytool error: java.io.IOException: Invalid keystore format
Ten błąd pojawia się nawet podczas uruchamiania keytool bezpośrednio z katalogu bin java NRE.
Pliki magazynu kluczy serwera 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
Na hoście zainstalowana jest inna wersja środowiska Oracle Java Runtime Environment (JRE). Instalacja Oracle JRE zakłóca działanie NRE.
Resolution
Z aplikacjami NetWorker zaleca się korzystanie ze środowiska NetWorker Runtime Environment (NRE). Dziennik instalacji AUTHC serwera NetWorker wskazuje, jaka ścieżka Java została użyta:
/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_471Alternatywnie z poziomu wiersza poleceń administratora uruchom:
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
Użyj zmiennej wiersza polecenia, aby wymusić keytool użycie z NRE:
Linux:
keytool=/opt/nre/java/latest/bin/keytool
Przykład:
[root@nsr ~]# keytool=/opt/nre/java/latest/bin/keytool
Uruchom wszystkie polecenia narzędzia keytool za pomocą zmiennej:
[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:
Użyj polecenia NSR_JAVA_HOME do uruchamiania poleceń z NRE bin Katalogu.
Przykład wiersza polecenia:
"%NSR_JAVA_HOME%\bin\keytool.exe" OPTIONS
Przykład z programem 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
Jeśli NetWorker korzysta ze środowiska NetWorker Runtime Environment (NRE) i jest zainstalowane inne środowisko Oracle Java Runtime Environment (JRE), usuń pakiet Oracle JRE.
Linux:
- Sprawdź, czy jest zainstalowana inna wersja środowiska JRE, można użyć następujących poleceń; jednak skonsultuj się z administratorem systemu Linux:
rpm -qa --last | grep jre find / -name java -type f
/etc/alternatives /usr/bin/java /usr/lib/jreX
- Jeśli jest zainstalowany inny pakiet JRE, skonsultuj się z administratorem systemu Linux, czy można go usunąć.
rpm -e package_name
Windows:
- Otwórz Panel sterowania systemu Windows —> Programy i funkcje.
- Zapoznaj się z listą pakietu Oracle Java Runtime Environment (z wyłączeniem środowiska wykonawczego NetWorker).
- Jeśli zainstalowano środowisko Oracle Java Runtime Environment, należy skonsultować się z administratorem systemu Windows, jeśli można je usunąć.
- Odinstaluj środowisko Oracle Java Runtime Environment z systemu.
- Otwórz nową sesję wiersza poleceń, aby uruchamiać polecenia narzędzia keytool po usunięciu środowiska Oracle JRE.
Additional Information
- NetWorker: Jak zidentyfikować, który serwer jest serwerem uwierzytelniania używanym przez NMC i NWUI
- NetWorker: Konfigurowanie uwierzytelniania LDAPS
- NetWorker: Jak zaimportować lub zastąpić certyfikaty podpisane przez instytucję certyfikującą dla „AUTHC” i „NWUI” (Linux)
- NetWorker: Jak zaimportować lub zastąpić certyfikaty podpisane przez instytucję certyfikującą dla „AUTHC” i „NWUI” (Windows)