当我运行代码peer channel fetch config config_block.pb -o orderer.example.com:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -c mychannel
时
我要去拿这个
2021-07-26 12:42:59.856 UTC cli.common readBlock -> INFO 002 Expect块,但状态:&{SERVICE_UNAVAILABLE}
在我添加了更多的订单后,我已经开始得到这个错误。我用木筏做定购服务。和用于生成证书的fabric-ca
configtx.yaml:
Orderer: &OrdererDefaults # Orderer Type: The orderer implementation to start
OrdererType: etcdraft
# Addresses used to be the list of orderer addresses that clients and peers
# could connect to. However, this does not allow clients to associate orderer
# addresses and orderer organizations which can be useful for things such
# as TLS validation. The preferred way to specify orderer addresses is now
# to include the OrdererEndpoints item in your org definition
Addresses:
- orderer.example.com:7050
- orderer2.example.com:8050
- orderer3.example.com:9050
EtcdRaft:
Consenters:
- Host: orderer.example.com
Port: 7050
ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
- Host: orderer2.example.com
Port: 8050
ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/server.crt
- Host: orderer3.example.com
Port: 9050
ClientTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
ServerTLSCert: ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt
# Options to be specified for all the etcd/raft nodes. The values here
# are the defaults for all new channels and can be modified on a
# per-channel basis via configuration updates.
Options:
# TickInterval is the time interval between two Node.Tick invocations.
TickInterval: 500ms
# ElectionTick is the number of Node.Tick invocations that must pass
# between elections. That is, if a follower does not receive any
# message from the leader of current term before ElectionTick has
# elapsed, it will become candidate and start an election.
# ElectionTick must be greater than HeartbeatTick.
ElectionTick: 10
# HeartbeatTick is the number of Node.Tick invocations that must
# pass between heartbeats. That is, a leader sends heartbeat
# messages to maintain its leadership every HeartbeatTick ticks.
HeartbeatTick: 1
# MaxInflightBlocks limits the max number of in-flight append messages
# during optimistic replication phase.
MaxInflightBlocks: 5
# SnapshotIntervalSize defines number of bytes per which a snapshot is taken
SnapshotIntervalSize: 16 MB
# Batch Timeout: The amount of time to wait before creating a batch
BatchTimeout: 2s
# Batch Size: Controls the number of messages batched into a block
BatchSize:
# Max Message Count: The maximum number of messages to permit in a batch
MaxMessageCount: 10
# Absolute Max Bytes: The absolute maximum number of bytes allowed for
# the serialized messages in a batch.
AbsoluteMaxBytes: 99 MB
# Preferred Max Bytes: The preferred maximum number of bytes allowed for
# the serialized messages in a batch. A message larger than the preferred
# max bytes will result in a batch larger than preferred max bytes.
PreferredMaxBytes: 512 KB
# Organizations is the list of orgs which are defined as participants on
# the orderer side of the network
Organizations:
# Policies defines the set of policies at this level of the config tree
# For Orderer policies, their canonical path is
# /Channel/Orderer/<PolicyName>
Policies:
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
# BlockValidation specifies what signatures must be included in the block
# from the orderer for the peer to validate it.
BlockValidation:
Type: ImplicitMeta
Rule: "ANY Writers"
码头工人-撰写文件:
services:
orderer.example.com:
container_name: orderer.example.com
image: hyperledger/fabric-orderer:latest
labels:
service: hyperledger-fabric
environment:
# - FABRIC_LOGGING_SPEC=INFO
- FABRIC_LOGGING_SPEC=DEBUG
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_GENERAL_BOOTSTRAPMETHOD=none
- ORDERER_CHANNELPARTICIPATION_ENABLED=true
- ORDERER_ADMIN_TLS_ENABLED=true
- ORDERER_ADMIN_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_ADMIN_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_ADMIN_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_ADMIN_TLS_CLIENTROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_ADMIN_LISTENADDRESS=0.0.0.0:7053
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ../system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
- ../organizations/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
- orderer.example.com:/var/hyperledger/production/orderer
ports:
- 7050:7050
- 7053:7053
networks:
- test
orderer2.example.com:
container_name: orderer2.example.com
image: hyperledger/fabric-orderer:latest
labels:
service: hyperledger-fabric
environment:
# - FABRIC_LOGGING_SPEC=INFO
- FABRIC_LOGGING_SPEC=DEBUG
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=8050
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_GENERAL_BOOTSTRAPMETHOD=none
- ORDERER_CHANNELPARTICIPATION_ENABLED=true
- ORDERER_ADMIN_TLS_ENABLED=true
- ORDERER_ADMIN_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_ADMIN_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_ADMIN_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_ADMIN_TLS_CLIENTROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_ADMIN_LISTENADDRESS=0.0.0.0:7053
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ../system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../organizations/ordererOrganizations/example.com/orderers/orderer2.example.com/msp:/var/hyperledger/orderer/msp
- ../organizations/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/:/var/hyperledger/orderer/tls
- orderer2.example.com:/var/hyperledger/production/orderer
ports:
- 8050:8050
- 8053:7053
networks:
- test
orderer3.example.com:
container_name: orderer3.example.com
image: hyperledger/fabric-orderer:latest
labels:
service: hyperledger-fabric
environment:
# - FABRIC_LOGGING_SPEC=INFO
- FABRIC_LOGGING_SPEC=DEBUG
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=9050
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_GENERAL_BOOTSTRAPMETHOD=none
- ORDERER_CHANNELPARTICIPATION_ENABLED=true
- ORDERER_ADMIN_TLS_ENABLED=true
- ORDERER_ADMIN_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_ADMIN_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_ADMIN_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_ADMIN_TLS_CLIENTROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_ADMIN_LISTENADDRESS=0.0.0.0:7053
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
volumes:
- ../system-genesis-block/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
- ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/msp:/var/hyperledger/orderer/msp
- ../organizations/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/:/var/hyperledger/orderer/tls
- orderer3.example.com:/var/hyperledger/production/orderer
ports:
- 9050:9050
- 9053:7053
networks:
- test
Orderer.example.com的码头集装箱日志:
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] Step -> INFO 7be 1 is starting a new election at term 1 channel=mychannel node=1
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 7bf 1 became pre-candidate at term 1 channel=mychannel node=1
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] poll -> INFO 7c0 1 received MsgPreVoteResp from 1 at term 1 channel=mychannel node=1
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7c1 1 [logterm: 1, index: 3] sent MsgPreVote request to 2 at term 1 channel=mychannel node=1
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7c2 1 [logterm: 1, index: 3] sent MsgPreVote request to 3 at term 1 channel=mychannel node=1
2021-07-26 21:36:40.751 UTC [orderer.common.cluster] NewStream -> DEBU 7c3 Created new stream to orderer2.example.com:8050 with ID of 26 and buffer size of 10
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7c4 Sending msg of 28 bytes to 2 on channel mychannel took 98.44µs
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] send -> INFO 7c5 Successfully sent StepRequest to 2 after failed attempt(s) channel=mychannel node=1
2021-07-26 21:36:40.751 UTC [orderer.common.cluster] NewStream -> DEBU 7c6 Created new stream to orderer3.example.com:9050 with ID of 26 and buffer size of 10
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7c7 Sending msg of 28 bytes to 3 on channel mychannel took 71.392µs
2021-07-26 21:36:40.751 UTC [orderer.consensus.etcdraft] send -> INFO 7c8 Successfully sent StepRequest to 3 after failed attempt(s) channel=mychannel node=1
2021-07-26 21:36:40.751 UTC [orderer.common.cluster.step] sendMessage -> DEBU 7c9 Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer3(orderer3.example.com:9050) took 44.832µs
2021-07-26 21:36:40.751 UTC [orderer.common.cluster.step] sendMessage -> DEBU 7ca Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer2(orderer2.example.com:8050) took 20.721µs
2021-07-26 21:36:48.403 UTC [core.comm] ServerHandshake -> DEBU 7cb Server TLS handshake completed in 2.630606ms server=Orderer remoteaddress=
2021-07-26 21:36:48.403 UTC [orderer.common.server] Deliver -> DEBU 7cc Starting new Deliver handler
2021-07-26 21:36:48.403 UTC [common.deliver] Handle -> DEBU 7cd Starting new deliver loop for
2021-07-26 21:36:48.404 UTC [common.deliver] Handle -> DEBU 7ce Attempting to read seek info message from
2021-07-26 21:36:48.404 UTC [common.deliver] deliverBlocks -> WARN 7cf [channel: mychannel] Rejecting deliver request for because of consenter error
2021-07-26 21:36:48.404 UTC [orderer.common.server] func1 -> DEBU 7d0 Closing Deliver stream
2021-07-26 21:36:48.404 UTC [comm.grpc.server] 1 -> INFO 7d1 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address= grpc.code=OK grpc.call_duration=675.251µs
2021-07-26 21:36:48.405 UTC [grpc] InfoDepth -> DEBU 7d2 [transport]transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2021-07-26 21:36:48.750 UTC [orderer.consensus.etcdraft] Step -> INFO 7d3 1 is starting a new election at term 1 channel=mychannel node=1
2021-07-26 21:36:48.750 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 7d4 1 became pre-candidate at term 1 channel=mychannel node=1
2021-07-26 21:36:48.750 UTC [orderer.consensus.etcdraft] poll -> INFO 7d5 1 received MsgPreVoteResp from 1 at term 1 channel=mychannel node=1
2021-07-26 21:36:48.750 UTC [orderer.consensus.etcdraft] campaign -> INFO 7d6 1 [logterm: 1, index: 3] sent MsgPreVote request to 2 at term 1 channel=mychannel node=1
2021-07-26 21:36:48.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7d7 1 [logterm: 1, index: 3] sent MsgPreVote request to 3 at term 1 channel=mychannel node=1
2021-07-26 21:36:48.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7d8 Sending msg of 28 bytes to 2 on channel mychannel took 4.077µs
2021-07-26 21:36:48.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7d9 Sending msg of 28 bytes to 3 on channel mychannel took 3.599µs
2021-07-26 21:36:48.751 UTC [orderer.common.cluster] 1 -> DEBU 7da Stream 26 to orderer3(orderer3.example.com:9050) is aborted
2021-07-26 21:36:48.751 UTC [orderer.common.cluster] 1 -> DEBU 7db Stream 26 to orderer2(orderer2.example.com:8050) is aborted
2021-07-26 21:36:48.751 UTC [orderer.common.cluster.step] sendMessage -> DEBU 7dc Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer3(orderer3.example.com:9050) took 61.407µs but failed due to EOF
2021-07-26 21:36:48.751 UTC [orderer.common.cluster.step] sendMessage -> DEBU 7dd Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer2(orderer2.example.com:8050) took 66.918µs but failed due to EOF
2021-07-26 21:36:48.751 UTC [orderer.common.cluster.step] serviceStream -> DEBU 7df Stream 26 to (orderer2.example.com:8050) terminated with total lifetime of 7.999445309s
2021-07-26 21:36:48.751 UTC [orderer.common.cluster.step] serviceStream -> DEBU 7de Stream 26 to (orderer3.example.com:9050) terminated with total lifetime of 7.999522414s
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] Step -> INFO 7e0 1 is starting a new election at term 1 channel=mychannel node=1
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 7e1 1 became pre-candidate at term 1 channel=mychannel node=1
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] poll -> INFO 7e2 1 received MsgPreVoteResp from 1 at term 1 channel=mychannel node=1
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7e3 1 [logterm: 1, index: 3] sent MsgPreVote request to 3 at term 1 channel=mychannel node=1
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7e4 1 [logterm: 1, index: 3] sent MsgPreVote request to 2 at term 1 channel=mychannel node=1
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7e5 Sending msg of 28 bytes to 3 on channel mychannel took 25.709µs
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] logSendFailure -> ERRO 7e6 Failed to send StepRequest to 3, because: EOF channel=mychannel node=1
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7e7 Sending msg of 28 bytes to 2 on channel mychannel took 5.017µs
2021-07-26 21:36:56.751 UTC [orderer.consensus.etcdraft] logSendFailure -> ERRO 7e8 Failed to send StepRequest to 2, because: EOF channel=mychannel node=1
2021-07-26 21:37:04.750 UTC [orderer.consensus.etcdraft] Step -> INFO 7e9 1 is starting a new election at term 1 channel=mychannel node=1
2021-07-26 21:37:04.750 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 7ea 1 became pre-candidate at term 1 channel=mychannel node=1
2021-07-26 21:37:04.751 UTC [orderer.consensus.etcdraft] poll -> INFO 7eb 1 received MsgPreVoteResp from 1 at term 1 channel=mychannel node=1
2021-07-26 21:37:04.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7ec 1 [logterm: 1, index: 3] sent MsgPreVote request to 2 at term 1 channel=mychannel node=1
2021-07-26 21:37:04.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7ed 1 [logterm: 1, index: 3] sent MsgPreVote request to 3 at term 1 channel=mychannel node=1
2021-07-26 21:37:04.751 UTC [orderer.common.cluster] NewStream -> DEBU 7ee Created new stream to orderer2.example.com:8050 with ID of 27 and buffer size of 10
2021-07-26 21:37:04.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7ef Sending msg of 28 bytes to 2 on channel mychannel took 271.523µs
2021-07-26 21:37:04.751 UTC [orderer.consensus.etcdraft] send -> INFO 7f0 Successfully sent StepRequest to 2 after failed attempt(s) channel=mychannel node=1
2021-07-26 21:37:04.751 UTC [orderer.common.cluster.step] sendMessage -> DEBU 7f1 Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer2(orderer2.example.com:8050) took 130.526µs
2021-07-26 21:37:04.752 UTC [orderer.common.cluster] NewStream -> DEBU 7f2 Created new stream to orderer3.example.com:9050 with ID of 27 and buffer size of 10
2021-07-26 21:37:04.752 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7f3 Sending msg of 28 bytes to 3 on channel mychannel took 627.237µs
2021-07-26 21:37:04.752 UTC [orderer.consensus.etcdraft] send -> INFO 7f4 Successfully sent StepRequest to 3 after failed attempt(s) channel=mychannel node=1
2021-07-26 21:37:04.752 UTC [orderer.common.cluster.step] sendMessage -> DEBU 7f5 Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer3(orderer3.example.com:9050) took 98.032µs
2021-07-26 21:37:12.751 UTC [orderer.consensus.etcdraft] Step -> INFO 7f6 1 is starting a new election at term 1 channel=mychannel node=1
2021-07-26 21:37:12.751 UTC [orderer.consensus.etcdraft] becomePreCandidate -> INFO 7f7 1 became pre-candidate at term 1 channel=mychannel node=1
2021-07-26 21:37:12.751 UTC [orderer.consensus.etcdraft] poll -> INFO 7f8 1 received MsgPreVoteResp from 1 at term 1 channel=mychannel node=1
2021-07-26 21:37:12.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7f9 1 [logterm: 1, index: 3] sent MsgPreVote request to 2 at term 1 channel=mychannel node=1
2021-07-26 21:37:12.751 UTC [orderer.consensus.etcdraft] campaign -> INFO 7fa 1 [logterm: 1, index: 3] sent MsgPreVote request to 3 at term 1 channel=mychannel node=1
2021-07-26 21:37:12.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7fb Sending msg of 28 bytes to 2 on channel mychannel took 4.668µs
2021-07-26 21:37:12.751 UTC [orderer.consensus.etcdraft] consensusSent -> DEBU 7fc Sending msg of 28 bytes to 3 on channel mychannel took 2.001µs
2021-07-26 21:37:12.751 UTC [orderer.common.cluster] 1 -> DEBU 7fd Stream 27 to orderer3(orderer3.example.com:9050) is aborted
2021-07-26 21:37:12.751 UTC [orderer.common.cluster.step] sendMessage -> DEBU 7fe Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer3(orderer3.example.com:9050) took 102.584µs but failed due to EOF
2021-07-26 21:37:12.751 UTC [orderer.common.cluster.step] serviceStream -> DEBU 7ff Stream 27 to (orderer3.example.com:9050) terminated with total lifetime of 7.999196657s
2021-07-26 21:37:12.751 UTC [orderer.common.cluster] 1 -> DEBU 800 Stream 27 to orderer2(orderer2.example.com:8050) is aborted
2021-07-26 21:37:12.751 UTC [orderer.common.cluster.step] sendMessage -> DEBU 801 Send of ConsensusRequest for channel mychannel with payload of size 28 to orderer2(orderer2.example.com:8050) took 24.421µs but failed due to EOF
2021-07-26 21:37:12.751 UTC [orderer.common.cluster.step] serviceStream -> DEBU 802 Stream 27 to (orderer2.example.com:8050) terminated with total lifetime of 7.999721572s
终端上的实际错误:
Setting anchor peer for org1...
Using organization 1
Fetching channel config for channel mychannel
Using organization 1
Fetching the most recent configuration block for the channel
+ peer channel fetch config config_block.pb -o orderer.example.com:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -c mychannel
2021-07-26 21:26:40.010 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2021-07-26 21:26:40.012 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{SERVICE_UNAVAILABLE}
Error: can't read the block: &{SERVICE_UNAVAILABLE}
Decoding config block to JSON and isolating config to Org1MSPconfig.json
+ configtxlator proto_decode --input config_block.pb --type common.Block
+ jq '.data.data[0].payload.data.config'
configtxlator: error: open config_block.pb: no such file or directory, try --help
+ jq '.channel_group.groups.Application.groups.Org1MSP.values += {"AnchorPeers":{"mod_policy": "Admins","value":{"anchor_peers": [{"host": "peer0.org1.example.com","port": 7051}]},"version": "0"}}' Org1MSPconfig.json
Generating anchor peer update transaction for Org1 on channel mychannel
+ configtxlator proto_encode --input Org1MSPconfig.json --type common.Config
configtxlator: error: Error decoding: error decoding input: error unmarshaling intermediate JSON: EOF
+ configtxlator proto_encode --input Org1MSPmodified_config.json --type common.Config
configtxlator: error: Error decoding: error decoding input: error unmarshaling intermediate JSON: EOF
+ configtxlator compute_update --channel_id mychannel --original original_config.pb --updated modified_config.pb
configtxlator: error: Error computing update: error computing config update: no channel group included for original config
+ configtxlator proto_decode --input config_update.pb --type common.ConfigUpdate
+ jq .
++ cat config_update.json
+ echo '{"payload":{"header":{"channel_header":{"channel_id":"mychannel", "type":2}},"data":{"config_update":{' '"channel_id":' '"",' '"isolated_data":' '{},' '"read_set":' null, '"write_set":' null '}}}}'
+ configtxlator proto_encode --input config_update_in_envelope.json --type common.Envelope
2021-07-26 21:26:40.664 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'mychannel': error authorizing update: ConfigUpdate for channel '' but envelope for channel 'mychannel'
Anchor peer update failed
我对这个问题的猜测之一是,订购者无法相互交谈,因为一旦我从衰老者(configtx.yaml)中移除另外两个订单,一切似乎都正常,如果有人能为我提供任何解决方案,这将是一个很大的帮助。
发布于 2021-07-28 10:10:51
如果您认为添加的订货机不起作用,您可以在这里检查订货机的木筏状态。
http://[YOUR ORDERER IP]:8443/指标
在orderer.yaml中定义的端口8443
Operations:
ListenAddress: [] < -- here
和Ctrl + F,搜索"consensus_etcdraft_is_leader“
发布于 2022-02-19 07:02:31
问题是第二和第三命令者尚未加入频道。
解决方案是使用osnadmin命令将第二和第三命令器连接到通道。您可以在示例测试网络中的createChannel.sh中找到类似的命令。下面是将命令者加入cahnnel的命令
# join orderer 2
osnadmin channel join --channelID $CHANNEL_NAME --config-block ./channel-artifacts/${CHANNEL_NAME}.block -o localhost:8053 --ca-file "$ORDERER_CA" --client-cert "$ORDERER2_ADMIN_TLS_SIGN_CERT" --client-key "$ORDERER2_ADMIN_TLS_PRIVATE_KEY" >&log.txt
# join orderer 3
osnadmin channel join --channelID $CHANNEL_NAME --config-block ./channel-artifacts/${CHANNEL_NAME}.block -o localhost:9053 --ca-file "$ORDERER_CA" --client-cert "$ORDERER3_ADMIN_TLS_SIGN_CERT" --client-key "$ORDERER3_ADMIN_TLS_PRIVATE_KEY" >&log.txt
createChannel.sh中的全部功能将是:
createChannel() {
setGlobals 1
# Poll in case the raft leader is not set yet
local rc=1
local COUNTER=1
while [ $rc -ne 0 -a $COUNTER -lt $MAX_RETRY ] ; do
sleep $DELAY
set -x
infoln "Orderer join channel"
osnadmin channel join --channelID $CHANNEL_NAME --config-block ./channel-artifacts/${CHANNEL_NAME}.block -o localhost:7053 --ca-file "$ORDERER_CA" --client-cert "$ORDERER_ADMIN_TLS_SIGN_CERT" --client-key "$ORDERER_ADMIN_TLS_PRIVATE_KEY" >&log.txt
infoln "Orderer2 join channel"
osnadmin channel join --channelID $CHANNEL_NAME --config-block ./channel-artifacts/${CHANNEL_NAME}.block -o localhost:8053 --ca-file "$ORDERER_CA" --client-cert "$ORDERER2_ADMIN_TLS_SIGN_CERT" --client-key "$ORDERER2_ADMIN_TLS_PRIVATE_KEY" >&log.txt
infoln "Orderer3 join channel"
osnadmin channel join --channelID $CHANNEL_NAME --config-block ./channel-artifacts/${CHANNEL_NAME}.block -o localhost:9053 --ca-file "$ORDERER_CA" --client-cert "$ORDERER3_ADMIN_TLS_SIGN_CERT" --client-key "$ORDERER3_ADMIN_TLS_PRIVATE_KEY" >&log.txt
res=$?
{ set +x; } 2>/dev/null
let rc=$res
COUNTER=$(expr $COUNTER + 1)
done
cat log.txt
verifyResult $res "Channel creation failed"
}
注意:确保您在Orderer2和Orderer3 TLS证书变量中添加了envVar.sh。
发布于 2022-07-15 16:02:12
我确信这个答案并不直接适用于OPs问题,但它在某种程度上适用于相同的warning
,所以我把它放在这里。也许能帮上忙。
创建应用程序通道命令(从peerOrg管理cli执行)
peer channel create \
-c mychannel \
-o orderer-org0:6050 \
++ -t 50s
-f "/pathtoartifacts/artifacts/mychannel.tx" \
--outputBlock "/pathtoartifacts/artifacts/mychannel.block" \
--tls \
--cafile "/pathtoorderer/msp/tlscacerts/ca.pem"
该命令超时,多次返回警告。
2021-07-26 12:42:59.856 UTC cli.common readBlock -> INFO 002 Expect块,但状态:&{SERVICE_UNAVAILABLE}
解决方案
在将-t
超时标志添加到更高的值后,通道块被成功地创建并存储到输出工件路径中。
我不确定原因,但我认为,由于基于kubernetes的超级分类系统结构部署,容器间的通信(订单、认可、管理-cli)比在本地主机中运行所有内容时要慢一些。
注意:警告仍然出现,但我现在在工件文件夹.
中收到一个块和预期的输出工件。
https://stackoverflow.com/questions/68536743
复制相似问题