Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unimplemented desc = unknown service protos.ChaincodeSupport

When I start orderer、peer node , then I start the example01.go to instantiate the chaincode , and specify :

peer.address 192.168.120.189:7051 
chaincode.id.name simple-token:1.0.0

the main code from example01.go is:

func main() {
    viper.Set("chaincode.id.name","simple-token:1.0.0")
    err := shim.Start(new(SimpleChaincode))
    if err != nil {
        fmt.Printf("Error starting Simple chaincode: %s", err)
    }
}

in method shim.Start() the error occurs in following sentence:

err = chatWithPeer(chaincodename, stream, cc)//causes the error

but it show error: Unimplemented desc = unknown service protos.ChaincodeSupport Process finished with exit code 0

GOROOT=/usr/local/Cellar/go/1.9/libexec #gosetup
GOPATH=/Users/friends/Documents/VirtualMachine/share/gopath #gosetup
/usr/local/Cellar/go/1.9/libexec/bin/go build -i "-ldflags=-linkmode internal" -o /private/var/folders/cg/mwzlhrjs5y55ny553g6xz9tr0000gn/T/___chaincode_example01_cc /Users/friends/Documents/VirtualMachine/share/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example01/chaincode_example01.go #gosetup
/private/var/folders/cg/mwzlhrjs5y55ny553g6xz9tr0000gn/T/___chaincode_example01_cc -peer.address 192.168.120.189:7051 #gosetup
2017-12-28 20:14:30.124 CST [shim] SetupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO
2017-12-28 20:14:30.124 CST [shim] SetupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ...
2017-12-28 20:14:30.126 CST [shim] func1 -> ERRO 003 Received error from server, ending chaincode stream: rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport
Error starting Simple chaincode: rpc error: code = Unimplemented desc = unknown service protos.ChaincodeSupport
Process finished with exit code 0
like image 551
Jim Green Avatar asked Dec 03 '22 11:12

Jim Green


1 Answers

You're using the wrong port. In v1.1 the port is 7052 and not 7051 like it was in v1.0

like image 108
yacovm Avatar answered Jan 21 '23 10:01

yacovm