VMにハイパーレジャーファブリックを手動でセットアップしようとしています。私は、すべての成果物を生成し、設定しているorderer.yaml
とcore.yaml
。ポートで注文者を実行しています127.0.0.1:7050
。peer clichannel create
コマンドを使用してチャネルを作成しようとするとcontext deadline exceeded
、ピア端末にメッセージが表示されます。
./bin/peer channel create -o 127.0.0.1:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls --cafile /home/fabric-release/mynetwork/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
エラー:配信クライアントの作成に失敗しました:注文者クライアントが127.0.0.1:7050に接続できませんでした:新しい接続の作成に失敗しました:コンテキストの期限を超えました
注文端末で次のエラーが発生します。
2019-04-23 09:22:03.707 EDT [core.comm] ServerHandshake-> ERRO 01b TLSハンドシェイクがエラーリモートエラーで失敗しました:tls:不正な証明書server = Orderer remoteaddress = 127.0.0.1:38618
2019-04-23 09:22:04.699 EDT [core.comm] ServerHandshake-> ERRO 01c TLSハンドシェイクがエラーリモートエラーで失敗しました:tls:不正な証明書server = Orderer remoteaddress = 127.0.0.1:38620
2019-04-23 09:22:06.187 EDT [core.comm] ServerHandshake-> ERRO 01d TLSハンドシェイクがエラーリモートエラーで失敗しました:tls:不正な証明書server = Orderer remoteaddress = 127.0.0.1:38622
構成を数回実行しましたが、何かが足りないかどうかわかりません。以下は私のorderer.yaml
General:
LedgerType: file
ListenAddress: 127.0.0.1
ListenPort: 7050
TLS:
Enabled: true
PrivateKey: /home/fabric-release/mynetwork/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
Certificate: /home/fabric-release/mynetwork/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
RootCAs:
- /home/fabric-release/mynetwork/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt
ClientAuthRequired: true
Keepalive:
ServerMinInterval: 60s
ServerInterval: 7200s
ServerTimeout: 20s
GenesisMethod: file
GenesisProfile: OneOrgOrdererGenesis
GenesisFile: channel-artifacts/genesis.block
LocalMSPDIR: /home/fabric-release/mynetwork/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp
LocalMSPID: OrdererMSP
Authentication:
TimeWindow: 15m
FileLedger:
Location: /var/hyperledger/production/orderer
Prefix: hyperledger-fabric-ordererledger
問題は、注文者が使用するTLSサーバー証明書に「127.0.0.1」と一致するSANがないことです。cryptogenを使用してアーティファクトを生成するときに、カスタムcrypto-config.yamlを使用して、TLS証明書に「localhost」や「127.0.0.1」を追加できます。
# ---------------------------------------------------------------------------
# "OrdererOrgs" - Definition of organizations managing orderer nodes
# ---------------------------------------------------------------------------
OrdererOrgs:
# ---------------------------------------------------------------------------
# Orderer
# ---------------------------------------------------------------------------
- Name: Orderer
Domain: example.com
EnableNodeOUs: false
# ---------------------------------------------------------------------------
# "Specs" - See PeerOrgs below for complete description
# ---------------------------------------------------------------------------
Specs:
- Hostname: orderer
SANS:
- "localhost"
- "127.0.0.1"
# ---------------------------------------------------------------------------
# "PeerOrgs" - Definition of organizations managing peer nodes
# ---------------------------------------------------------------------------
PeerOrgs:
# ---------------------------------------------------------------------------
# Org1
# ---------------------------------------------------------------------------
- Name: org1
Domain: org1.example.com
EnableNodeOUs: true
Template:
Count: 2
SANS:
- "localhost"
- "127.0.0.1"
Users:
Count: 1
- Name: org2
Domain: org2.example.com
EnableNodeOUs: false
Template:
Count: 2
SANS:
- "localhost"
- "127.0.0.1"
Users:
Count: 1
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加