启动链码报rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport start error
启动链码时报错如下:
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px “Meslo LG M for Powerline”; color: #f4f4f4; background-color: rgba(0, 0, 0, 0.85) }
span.s1 { }
span.s2 { color: #c33720 }
root@95a911a49341:/opt/gopath/src/chaincode/chaincode002# CORE_PEER_ADDRESS=peer:7051 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode002
2018-05-28 01:15:24.369 UTC [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO
2018-05-28 01:15:24.369 UTC [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up …
2018-05-28 01:15:24.374 UTC [shim] func1 -> ERRO 003 Received error from server, ending chaincode stream: rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport
start error
主要原因是版本问题v1.1.0,7051端口应该使用在v1.0.0
所以在v1.1.0正确的启动chaincode命令为:
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px “Meslo LG M for Powerline”; color: #f4f4f4; background-color: rgba(0, 0, 0, 0.85) }
span.s1 { }
CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode002
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px “Meslo LG M for Powerline”; color: #f4f4f4; background-color: rgba(0, 0, 0, 0.85) }
span.s1 { }