NetWorker: java.io.IOException:密钥库格式无效

Summary: 无法使用 java keytool 列出或修改 NetWorker AUTHC 或 NetWorker Web 用户界面 (NWUI) 密钥库文件。

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

NetWorker 身份验证 (AUTHC) 服务器或 NetWorker Web 用户界面 (NWUI) 服务器包括 Java Runtime Environment (JRE)。通常,这可使用 NetWorker Runtime Environment (NRE) 来实现。

Linux: /opt/nre/java/latest
Windows: C:\Program Files\NRE\java\jre#.#.#_###

提醒:Windows 主机上没有“latest”符号链接。根据安装的 NRE 版本,JRE 路径包括 NRE 版本附带的 JRE 版本。

使用 keytool 命令来检查 NetWorker authc/NWUI 密钥库文件,将显示 java 错误:

[root@nsr bin]# keytool -list -keystore /nsr/authc/conf/authc.keystore
 Enter keystore password:
 keytool error: java.io.IOException: Invalid keystore format

即使在运行 keytool 命令直接从 NRE java bin 目录发出。

NetWorker 服务器密钥库文件:

Linux: 
    • /nsr/authc/conf/authc.keystore
    • /nsr/authc/conf/authc.truststore
    • /opt/nsr/authc-server/conf/authc.truststore
    • /opt/nre/java/latest/lib/security/cacerts
Windows:
    • C:\Program Files\EMC NetWorker\nsr\authc-server\conf\authc.truststore
    • C:\Program Files\EMC NetWorker\nsr\authc-server\tomcat\conf\authc.keystore
    • C:\Program Files\NRE\java\jre##.#_###\lib\security\cacerts
NetWorker Web 用户界面 (NWUI) 文件:
Linux:
    • /nsr/nwui/monitoring/app/conf/nwui.keystore
    • /opt/nre/java/latest/cacerts
Windows:
    • C:\Program Files\EMC NetWorker\nwui\monitoring\app\conf\nwui.keystore
    • C:\Program Files\NRE\java\jre#.#.#_###\lib\security\cacerts

Cause

主机上安装了另一个版本的 Oracle Java Runtime Environment (JRE)。Oracle JRE 安装会干扰 NRE。

Resolution

建议将 NetWorker Runtime Environment (NRE) 与 NetWorker 应用程序配合使用。NetWorker 服务器的 AUTHC 安装日志标识了所使用的“Java 路径”:

Linux: /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/latest
Windows: %LOCALAPPDATA%\Temp\NetWorker_YYYYMMDDHHmmSS_#_AuthC.log
JAVAHOME = C:\Program Files\NRE\java\jre1.8.0_471
或者,从管理命令提示符运行:
echo %NSR_JAVA_HOME%
或管理 PowerShell 提示符:
$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


使用命令行变量强制 keytool NRE 中的用法:

提醒:这些变量仅适用于当前 shell 或提示符。会话关闭后,它们将被清除。

Linux:

keytool=/opt/nre/java/latest/bin/keytool

示例:

[root@nsr ~]# keytool=/opt/nre/java/latest/bin/keytool

使用变量运行所有 keytool 命令:

[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:

使用 NSR_JAVA_HOME 从 NRE 运行命令 bin 目录。

命令提示符示例:

"%NSR_JAVA_HOME%\bin\keytool.exe" OPTIONS

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

 

如果 NetWorker 使用 NetWorker Runtime Environment (NRE),并且安装了另一个 Oracle Java Runtime Environment (JRE),则删除 Oracle JRE 软件包。

Linux:

警告:如果服务器是 NetWorker Virtual Edition (NVE) 服务器,请勿删除 Oracle JRE 软件包。
  1. 检查另一个 JRE 安装,可以使用以下命令;但是,请咨询 Linux 系统管理员:
rpm -qa --last | grep jre
find / -name java -type f
/opt/nre/java/jreX 是 NetWorker Runtime Environment;但是,可能会出现其他软件包:
/etc/alternatives
/usr/bin/java
/usr/lib/jreX
  1. 如果安装了其他 JRE 软件包,请咨询 Linux 系统管理员是否可以将其删除。
rpm -e package_name

Windows: 

  1. 打开 Windows 控制面板 -> 程序和功能
  2. 查看 Oracle Java Runtime Environment 软件包(不包括 NetWorker Runtime Environment)的列表。
  3. 如果安装了 Oracle Java Runtime Environment,请咨询 Windows 系统管理员(如果可以将其删除)。
  4. 从系统中卸载 Oracle Java Runtime Environment。
  5. 删除 Oracle JRE 后,打开新的命令提示符会话以运行 keytool 命令。

Additional Information

Affected Products

NetWorker

Products

NetWorker Family
Article Properties
Article Number: 000297934
Article Type: Solution
Last Modified: 05 Mar 2026
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.