Kubernetes 错误:获取频道的背书人客户端时出错:背书人客户端无法连接到对等政府:7051:无法创建新连接:上下文

Kubernetes 错误:获取频道的背书人客户端时出错:背书人客户端无法连接到对等政府:7051:无法创建新连接:上下文,kubernetes,hyperledger-fabric,Kubernetes,Hyperledger Fabric,我一直在尝试部署一个hyperledger结构模型,其中包含3个CAs 1个订购者和2个对等节点。我可以使用fabric的OSADMIN命令创建频道,但当我尝试使用对等节点加入频道时,我得到错误:获取频道的背书人客户端时出错:背书人客户端无法连接到对等政府:7051:无法创建新连接:上下文…… 以下是来自终端(本地主机)的日志: 这里需要注意的一点是,我正在为所有的pod使用Kubernetes和服务集群IP 以下是来自其中一个对等POD的日志(另一个相同) 为了克服这个问题,我尝试通过将COR

我一直在尝试部署一个hyperledger结构模型,其中包含3个CAs 1个订购者和2个对等节点。我可以使用fabric的OSADMIN命令创建频道,但当我尝试使用对等节点加入频道时,我得到错误:
获取频道的背书人客户端时出错:背书人客户端无法连接到对等政府:7051:无法创建新连接:上下文……

以下是来自终端(本地主机)的日志:

这里需要注意的一点是,我正在为所有的pod使用Kubernetes和服务集群IP

以下是来自其中一个对等POD的日志(另一个相同)

为了克服这个问题,我尝试通过将
CORE\u PEER\u TLS\u ENABLED
设置为
FALSE

然后提交提案,但订购方POD抛出相同的错误,即TLS握手失败……..

以下是我用于从cli pod加入频道的命令:

kubectl-n hyperledger-it exec$CLI\u POD-sh-c"export FABRIC\u CFG\u PATH=/etc/hyperledger/clipod/config&&export CORE\u PEER\u LOCALMSPID=GeneralMSP&&export CORE\u PEER\u TLS\u ROOTCERT\u FILE=/etc/hyperledger/clipod/organizations/general.example.com/peers/peer0.general.example.com/TLS/ca.crt&&exportCORE\u PEER\u MSPCONFIGPATH=/etc/hyperledger/clipod/organizations/peerOrganizations/general.example.com/users/Admin@general.example.com/msp&&export CORE_PEER_ADDRESS=对等常规:9051&&PEER channel join-b/etc/hyperledger/clipod/channel artifacts/$channel_NAME.block-o order:7050--tls--cafile/etc/hyperledger/clipod/organizations/OrderOrganizations/example.com/orders/order.example.com/msp/tlscacerts/tlsca.example.com-cert.pem“

我被困在这个问题上,任何帮助都将不胜感激。
谢谢

我已经修复了它。我面临的问题是因为没有为CLI pod设置
CORE\u PEER\u TLS\u ENABLED=true

我从整个模型中学到的一件事是,每当您看到TLS问题时,首先要检查的是检查
CORE\u PEER\u TLS\u ENABLED
变量。确保您已为您尝试与之交互的所有吊舱或容器设置了它。根据您的部署,情况可能为false(无TLS)或true(使用TLS)。
其他需要记住的事情是使用正确的fabric变量,包括
fabric\u CFG\u PATH
CORE\u PEER\u LOCALMSPID
CORE\u PEER\u TLS\u ROOTCERT\u FILE
CORE\u PEER\u MSPCONFIGPATH
以及其他一些变量,具体取决于您的命令。

嘿,Kanhu,这是一篇结构良好、详细的帖子。请您将e问题作为一个问题,它将帮助其他人更有效地帮助您?谢谢。嘿,山姆,我已经找到了答案。我在回答这个问题时提到的CLI pod缺少一个标志变量。因此不再需要帮助。谢谢!
2021-06-01 06:38:54.509 UTC [common.tools.configtxgen] main -> INFO 001 Loading configuration
2021-06-01 06:38:54.522 UTC [common.tools.configtxgen.localconfig] completeInitialization -> INFO 002 orderer type: etcdraft
2021-06-01 06:38:54.522 UTC [common.tools.configtxgen.localconfig] completeInitialization -> INFO 003 Orderer.EtcdRaft.Options unset, setting to tick_interval:"500ms" election_tick:10 heartbeat_tick:1 max_inflight_blocks:5 snapshot_interval_size:16777216 
2021-06-01 06:38:54.522 UTC [common.tools.configtxgen.localconfig] Load -> INFO 004 Loaded configuration: /etc/hyperledger/clipod/configtx/configtx.yaml
2021-06-01 06:38:54.712 UTC [common.tools.configtxgen] doOutputBlock -> INFO 005 Generating genesis block
2021-06-01 06:38:54.712 UTC [common.tools.configtxgen] doOutputBlock -> INFO 006 Creating application channel genesis block
2021-06-01 06:38:54.712 UTC [common.tools.configtxgen] doOutputBlock -> INFO 007 Writing genesis block
cli-dd4cc5fbf-pdcgb
Status: 201
{
    "name": "commonchannel",
    "url": "/participation/v1/channels/commonchannel",
    "consensusRelation": "consenter",
    "status": "active",
    "height": 1
}
cli-dd4cc5fbf-pdcgb
Error: error getting endorser client for channel: endorser client failed to connect to peer-govt:7051: failed to create new connection: context deadline exceeded
command terminated with exit code 1
Error: error getting endorser client for channel: endorser client failed to connect to peer-general:9051: failed to create new connection: context deadline exceeded
command terminated with exit code 1
2021-06-01 06:38:42.180 UTC [nodeCmd] registerDiscoveryService -> INFO 01b Discovery service activated
2021-06-01 06:38:42.180 UTC [nodeCmd] serve -> INFO 01c Starting peer with ID=[peer-govt], network ID=[dev], address=[peer-govt:7051]
2021-06-01 06:38:42.180 UTC [nodeCmd] func6 -> INFO 01d Starting profiling server with listenAddress = 0.0.0.0:6060
2021-06-01 06:38:42.180 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[peer-govt], network ID=[dev], address=[peer-govt:7051]
2021-06-01 06:38:42.181 UTC [kvledger] LoadPreResetHeight -> INFO 01f Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2021-06-01 06:38:42.181 UTC [blkstorage] preResetHtFiles -> INFO 020 No active channels passed
2021-06-01 06:38:56.006 UTC [core.comm] ServerHandshake -> ERRO 021 Server TLS handshake failed in 24.669µs with error tls: first record does not look like a TLS handshake server=PeerServer remoteaddress=172.17.0.1:13258
2021-06-01 06:38:57.007 UTC [core.comm] ServerHandshake -> ERRO 022 Server TLS handshake failed in 17.772µs with error tls: first record does not look like a TLS handshake server=PeerServer remoteaddress=172.17.0.1:29568
2021-06-01 06:38:58.903 UTC [core.comm] ServerHandshake -> ERRO 023 Server TLS handshake failed in 13.581µs with error tls: first record does not look like a TLS handshake server=PeerServer remoteaddress=172.17.0.1:32615