PowerProtect Cyber Recovery 数据避风港:安装失败,并显示错误“Failed to Set MongoDB Credential:无法更改管理员数据库凭据:无法连接到管理员数据库

概要: 添加新的 MongoDB 密码并显示错误消息“Failed to change admin DB credential”后,Crsetup 安装脚本失败。

この記事は次に適用されます: この記事は次には適用されません: この記事は、特定の製品に関連付けられていません。 すべての製品パージョンがこの記事に記載されているわけではありません。

現象

“/crsetup --install”脚本在输入 MongoDB 密码后结束,并显示以下错误:
Failed to set MongoDB credential:Failed to change admin DB credential:Unable to connect to theadmindatabase :server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: localhost:17112, Type: Unknown, Last error: connection() error occurred during connection handshake: dial tcp 127.0.0.1:17112: connect: connection refused }, ] }

查看以下知识库文章 212531 PowerProtect Cyber Recovery:Cyber Recovery 19.13 或更高版本的新安装失败 — 无法设置 MongoDB 凭据,以确保 v8.7 物理服务器或虚拟机上的 CPU 上的 AVX 功能可用。

命令“docker ps -a”显示 MongoDB docker 实例处于退出状态,如下所示:

[root@cradmin]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c3fe3dc5959f localhost:14779/cr_mongo:6.0.5 "/bin/bash /usr/loca" 4 minutes ago Exited (1) 4 minutes ago cr_mongo-auth_1 
3fbf3db0c71d localhost:14779/cr_registry:2.8.1.7 "/entrypoint.sh /etc" 4 minutes ago Up 4 minutes 127.0.0.1:14779->5000/tcp cr_registry

运行“docker logs cr_mongo-auth_1”显示它无法读取证书:

[root@crm-cradmin]# cat mongo.txt
=> Waiting for confirmation of MongoDB service startup...
{"t":{"$date":"2023-08-17T15:25:23.384Z"},"s":"I",  "c":"CONTROL",  "id":5760901, "ctx":"-","msg":"Applied --setParameter options","attr":{"serverParameters":{"opensslCipherConfig":{"default":"HIGH:!EXPORT:!aNULL@STRENGTH","value":"ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES128-SHA"}}}}
about to fork child process, waiting until server is ready for connections.
forked process: 23

{"t":{"$date":"2023-08-17T10:25:23.386-05:00"},"s":"I",  "c":"CONTROL",  "id":20698,   "ctx":"-","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2023-08-17T10:25:23.392-05:00"},"s":"I",  "c":"NETWORK",  "id":4915701, "ctx":"main","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":17},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":17},"outgoing":{"minWireVersion":6,"maxWireVersion":17},"isInternalClient":true}}}
{"t":{"$date":"2023-08-17T10:25:23.394-05:00"},"s":"E",  "c":"NETWORK",  "id":23248,   "ctx":"main","msg":"Cannot read certificate file","attr":{"keyFile":"/cr/ssl/certs/CRSERVICE.pem","error":"error:FFFFFFFF8000000D:system library::Permission denied"}}
{"t":{"$date":"2023-08-17T10:25:23.394-05:00"},"s":"D1", "c":"ASSERT",   "id":23074,   "ctx":"main","msg":"User assertion","attr":{"error":"InvalidSSLConfiguration: Can not set up PEM key file.","file":"src/mongo/util/net/ssl_manager_openssl.cpp","line":2643}}
{"t":{"$date":"2023-08-17T10:25:23.395-05:00"},"s":"F",  "c":"CONTROL",  "id":20574,   "ctx":"main","msg":"Error during global initialization","attr":{"error":{"code":140,"codeName":"InvalidSSLConfiguration","errmsg":"Can not set up PEM key file."}}}
ERROR: child process failed, exited with 1
To see additional information in this output, start without the "--fork" option.

证书在 cr/etc/ssl/certs 下没有 644 个权限: 

cr:/opt/dellemc/cr/etc/certs/ssl # ls -al
total 116
drwxrwxrwx 2 cyber-recovery-admin 14999 4096 Aug 30 15:10 .
drwx------ 3 root                 root  4096 Apr  7 17:52 ..
-rw------- 1 root                 root  1716 May 30 11:17 CRSERVICE.crt
-rw------- 1 root                 root  1766 May 30 11:17 CRSERVICE.key
-rw------- 1 root                 root  3482 May 30 11:17 CRSERVICE.pem

原因

crsetup 脚本创建 Docker 实例所需的文件,这些实例必须具有 644 (rw- r-- r----) 的权限。在此情况下,强制执行的 umask 077 将文件的权限覆盖为 600 (rw- --- ---)。MongoDB 无法读取配置的证书和其他文件。

解決方法

  1. 使用以下命令将用户 root 设置为使用 umask 022:
# umask 022
  1. 通过运行以下命令验证当前 umask: 
# umask
  1. 运行命令:
# ./crsetup --deploy. 
  1. 确保 root 即使在重新启动后仍保留 022 的 umask,否则 MongoDB docker 实例在重新启动后无法启动。
cd ~ (for root home directory)
vi .bashrc (do not forget the Dot before bashrc).
Add the following line:
umask 022
Save the file. 

请联系戴尔技术支持,了解更多信息。

対象製品

PowerProtect Cyber Recovery
文書のプロパティ
文書番号: 000217057
文書の種類: Solution
最終更新: 08 9月 2023
バージョン:  2
質問に対する他のDellユーザーからの回答を見つける
サポート サービス
お使いのデバイスがサポート サービスの対象かどうかを確認してください。