I believe I have an orderer
, two peer
's and a cli
running on Kubernetes.
Trying to issue peer
commands within cli
results in errors.
Update: I've tried running the same crypto-config under docker-compose
and receive the same error from peer channel create
. This suggests either something is incorrect with my cli
command or with the crypto-config itself.
I would appreciate some guidance on debugging steps that would help me.
Probably related to the issues summarized in my earlier question:
Received AliveMessage from a peer with the same PKI-ID as myself
Within cli
:
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com CORE_PEER_LOCALMSPID="OrdererMSP" \
peer channel create \
--orderer orderer.default.svc.cluster.local:7050 \
--chain ch01 \
--file channel.170511.tx
Results in:
2017-05-22 17:36:52.235 UTC [logging] InitFromViper -> DEBU 001 Setting default logging level to DEBUG for command 'channel'
2017-05-22 17:36:52.235 UTC [msp] GetLocalMSP -> DEBU 002 Returning existing local MSP
2017-05-22 17:36:52.236 UTC [msp] GetDefaultSigningIdentity -> DEBU 003 Obtaining default signing identity
Error: Got unexpected status: BAD_REQUEST
Usage:
peer channel create [flags]
and coincidentally on orderer
:
2017-05-22 17:36:52.326 UTC [orderer/main] Deliver -> DEBU 11f Starting new Deliver handler
2017-05-22 17:36:52.326 UTC [orderer/common/deliver] Handle -> DEBU 120 Starting new deliver loop
2017-05-22 17:36:52.326 UTC [orderer/common/deliver] Handle -> DEBU 121 Attempting to read seek info message
2017-05-22 17:36:52.332 UTC [orderer/main] Broadcast -> DEBU 122 Starting new Broadcast handler
2017-05-22 17:36:52.333 UTC [orderer/common/broadcast] Handle -> DEBU 123 Preprocessing CONFIG_UPDATE
2017-05-22 17:36:52.333 UTC [orderer/multichain] Process -> DEBU 124 Processing channel creation request for channel ch01
2017-05-22 17:36:52.333 UTC [msp] GetLocalMSP -> DEBU 125 Returning existing local MSP
2017-05-22 17:36:52.333 UTC [msp] GetDefaultSigningIdentity -> DEBU 126 Obtaining default signing identity
2017-05-22 17:36:52.333 UTC [msp] GetLocalMSP -> DEBU 127 Returning existing local MSP
2017-05-22 17:36:52.333 UTC [msp] GetDefaultSigningIdentity -> DEBU 128 Obtaining default signing identity
2017-05-22 17:36:52.333 UTC [msp] Sign -> DEBU 129 Sign: plaintext: [[REDACTED]]...[[REDACTED]]
2017-05-22 17:36:52.333 UTC [msp] Sign -> DEBU 12a Sign: digest: [[REDACTED]]
2017-05-22 17:36:52.333 UTC [msp] GetLocalMSP -> DEBU 12b Returning existing local MSP
2017-05-22 17:36:52.333 UTC [msp] GetDefaultSigningIdentity -> DEBU 12c Obtaining default signing identity
2017-05-22 17:36:52.333 UTC [msp] GetLocalMSP -> DEBU 12d Returning existing local MSP
2017-05-22 17:36:52.333 UTC [msp] GetDefaultSigningIdentity -> DEBU 12e Obtaining default signing identity
2017-05-22 17:36:52.333 UTC [msp] Sign -> DEBU 12f Sign: plaintext: [[REDACTED]]...[[REDACTED]]
2017-05-22 17:36:52.333 UTC [msp] Sign -> DEBU 130 Sign: digest: [[REDACTED]]
2017-05-22 17:36:52.334 UTC [orderer/common/broadcast] Handle -> DEBU 131 Broadcast is filtering message of type 4 for channel testchainid
2017-05-22 17:36:52.334 UTC [common/policies] GetPolicy -> DEBU 132 Returning policy Writers for evaluation
2017-05-22 17:36:52.334 UTC [cauthdsl] func1 -> DEBU 133 Gate evaluation starts: (&{N:1 policies:<signed_by:0 > })
2017-05-22 17:36:52.334 UTC [cauthdsl] func2 -> DEBU 134 Principal evaluation starts: (&{%!s(int32=0)}) (used [%!s(bool=false)])
2017-05-22 17:36:52.334 UTC [msp] newIdentity -> DEBU 135 Creating identity instance for ID &{OrdererMSP DEFAULT}
2017-05-22 17:36:52.334 UTC [msp] Validate -> INFO 136 MSP OrdererMSP validating identity
2017-05-22 17:36:52.334 UTC [cauthdsl] func2 -> DEBU 137 Principal evaluation fails: (&{%!s(int32=0)})%!(EXTRA []bool=[false])
2017-05-22 17:36:52.334 UTC [cauthdsl] func1 -> DEBU 138 Gate evaluation fails: (&{N:1 policies:<signed_by:0 > })
2017-05-22 17:36:52.334 UTC [cauthdsl] func1 -> DEBU 139 Gate evaluation starts: (&{N:1 policies:<signed_by:0 > })
2017-05-22 17:36:52.334 UTC [cauthdsl] func2 -> DEBU 13a Principal evaluation starts: (&{%!s(int32=0)}) (used [%!s(bool=false)])
2017-05-22 17:36:52.334 UTC [msp] newIdentity -> DEBU 13b Creating identity instance for ID &{OrdererMSP DEFAULT}
2017-05-22 17:36:52.334 UTC [cauthdsl] func2 -> DEBU 13c Principal evaluation fails: (&{%!s(int32=0)})%!(EXTRA []bool=[false])
2017-05-22 17:36:52.334 UTC [cauthdsl] func1 -> DEBU 13d Gate evaluation fails: (&{N:1 policies:<signed_by:0 > })
2017-05-22 17:36:52.334 UTC [cauthdsl] func1 -> DEBU 13e Gate evaluation starts: (&{N:1 policies:<signed_by:0 > })
2017-05-22 17:36:52.334 UTC [cauthdsl] func2 -> DEBU 13f Principal evaluation starts: (&{%!s(int32=0)}) (used [%!s(bool=false)])
2017-05-22 17:36:52.334 UTC [msp] newIdentity -> DEBU 140 Creating identity instance for ID &{OrdererMSP DEFAULT}
2017-05-22 17:36:52.334 UTC [cauthdsl] func2 -> DEBU 141 Principal evaluation fails: (&{%!s(int32=0)})%!(EXTRA []bool=[false])
2017-05-22 17:36:52.334 UTC [cauthdsl] func1 -> DEBU 142 Gate evaluation fails: (&{N:1 policies:<signed_by:0 > })
2017-05-22 17:36:52.334 UTC [orderer/common/broadcast] Handle -> WARN 143 Rejecting broadcast message because of filter error: Rejected by rule: *sigfilter.sigFilter
2017-05-22 17:36:52.336 UTC [orderer/common/deliver] Handle -> WARN 144 Error reading from stream: stream error: code = 1 desc = "context canceled"
crypto-config:
OrdererOrgs:
- Name: Orderer
Domain: default.svc.cluster.local
Specs:
- Hostname: orderer
PeerOrgs:
- Name: Org1
Domain: org1.svc.cluster.local
Template:
Count: 2
Users:
Count: 2
- Name: Org2
Domain: org2.svc.cluster.local
Template:
Count: 2
Users:
Count: 2
Use "peer channel list" to see a list of existing channels. You cannot create a new channel with the same name as existing channels.
Please keep the channel name all small case only. This solved the problem for me.
Before creating the channel artifact set the channel name to small letters like below: export CHANNEL_NAME=casesensitivechannelname
Use the same channel name while creating channel.
I think that you haven't especified well the MSP directory and the MSP identities.
The CORE_PEER_MSPCONFIGPATH should coincide with your certificates directories. As the same as the CORE_PEER_LOCALMSPID. In my opinios, that is the issue.
Make sure that the configuration of the crypto-config file, the configtx file and the docker-compose file coincide.
In your case, you define it here:
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com CORE_PEER_LOCALMSPID="OrdererMSP"