IP SANS 的 Hyper Ledger Fabric CA 服务器设置错误

发布于 2025-01-12 00:05:44 字数 2251 浏览 1 评论 0原文

我正在尝试与两个组织建立区块链网络,每个组织中有两个对等点。在为 org1、org2 和排序者组织设置单独的 CA 后,我使用 Fabric-ca-server-client 命令生成了加密材料。所有节点和排序节点都在单个虚拟机的不同容器中运行。问题与 IP SAN 相关。

# Register peer0 certificates now
fabric-ca-client register --caname ca.org1.example.com --csr.cn peer0.org1.example.com --csr.names 'O=org1,OU=peer,C=IN,ST=Telangana' --id.name peer0 --id.secret peer0pw --id.type peer --id.attrs '"hf.Registrar.Roles=peer"' --tls.certfiles ${FABRIC_CA_CLIENT_HOME}/ca/tls-ca-org1-example-com-cert.pem

# Enroll peer0 certificates now which stores crypto material for peer0 in msp folder
fabric-ca-client enroll -u https://peer0:peer0pw@localhost:7060 --caname ca.org1.example.com --csr.cn peer0.org1.example.com --csr.names 'O=org1,OU=peer,C=IN,ST=Telangana' -M ${FABRIC_CA_CLIENT_HOME}/peers/peer0.org1.example.com/msp --csr.hosts peer0.org1.example.com --tls.certfiles ${FABRIC_CA_CLIENT_HOME}/ca/tls-ca-org1-example-com-cert.pem

我在执行 docker logs peer0.org1.example.com 时遇到以下错误

2022-03-05 08:49:11.635 UTC [grpc] Warningf -> DEBU 04f grpc: addrConn.createTransport failed to connect to {127.0.0.1:7051  <nil> 0 <nil>}. Err: connection error: desc = "transport: authentication handshake failed: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs". Reconnecting...
2022-03-05 08:49:11.636 UTC [grpc] Infof -> DEBU 052 Subchannel Connectivity change to TRANSIENT_FAILURE
2022-03-05 08:49:11.636 UTC [grpc] UpdateSubConnState -> DEBU 053 pickfirstBalancer: HandleSubConnStateChange: 0xc002ae4e40, {TRANSIENT_FAILURE connection error: desc = "transport: authentication handshake failed: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"}
2022-03-05 08:49:11.636 UTC [grpc] Infof -> DEBU 054 Channel Connectivity change to TRANSIENT_FAILURE
2022-03-05 08:49:11.635 UTC [core.comm] ServerHandshake -> ERRO 050 Server TLS handshake failed in 945.487µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=127.0.0.1:38460
2022-03-05 08:49:11.637 UTC [grpc] Warningf -> DEBU 055 grpc: Server.Serve failed to complete security handshake from "127.0.0.1:38460": remote error: tls: bad certificate

I am trying to setup blockchain network with two organizations having two peers in each organization. I generated crypto material using fabric-ca-server-client command after setting up separate CAs for org1, org2 and orderer organizations. All peers and orderers are running in different containers in a single VM. Issue is about IP SANS.

# Register peer0 certificates now
fabric-ca-client register --caname ca.org1.example.com --csr.cn peer0.org1.example.com --csr.names 'O=org1,OU=peer,C=IN,ST=Telangana' --id.name peer0 --id.secret peer0pw --id.type peer --id.attrs '"hf.Registrar.Roles=peer"' --tls.certfiles ${FABRIC_CA_CLIENT_HOME}/ca/tls-ca-org1-example-com-cert.pem

# Enroll peer0 certificates now which stores crypto material for peer0 in msp folder
fabric-ca-client enroll -u https://peer0:peer0pw@localhost:7060 --caname ca.org1.example.com --csr.cn peer0.org1.example.com --csr.names 'O=org1,OU=peer,C=IN,ST=Telangana' -M ${FABRIC_CA_CLIENT_HOME}/peers/peer0.org1.example.com/msp --csr.hosts peer0.org1.example.com --tls.certfiles ${FABRIC_CA_CLIENT_HOME}/ca/tls-ca-org1-example-com-cert.pem

I am getting below error while executing docker logs peer0.org1.example.com

2022-03-05 08:49:11.635 UTC [grpc] Warningf -> DEBU 04f grpc: addrConn.createTransport failed to connect to {127.0.0.1:7051  <nil> 0 <nil>}. Err: connection error: desc = "transport: authentication handshake failed: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs". Reconnecting...
2022-03-05 08:49:11.636 UTC [grpc] Infof -> DEBU 052 Subchannel Connectivity change to TRANSIENT_FAILURE
2022-03-05 08:49:11.636 UTC [grpc] UpdateSubConnState -> DEBU 053 pickfirstBalancer: HandleSubConnStateChange: 0xc002ae4e40, {TRANSIENT_FAILURE connection error: desc = "transport: authentication handshake failed: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"}
2022-03-05 08:49:11.636 UTC [grpc] Infof -> DEBU 054 Channel Connectivity change to TRANSIENT_FAILURE
2022-03-05 08:49:11.635 UTC [core.comm] ServerHandshake -> ERRO 050 Server TLS handshake failed in 945.487µs with error remote error: tls: bad certificate server=PeerServer remoteaddress=127.0.0.1:38460
2022-03-05 08:49:11.637 UTC [grpc] Warningf -> DEBU 055 grpc: Server.Serve failed to complete security handshake from "127.0.0.1:38460": remote error: tls: bad certificate

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文