Home > Blockchain >  Hyperledger chaincode installation error, scour entire network without solution
Hyperledger chaincode installation error, scour entire network without solution

Time:09-21

Environment: Hyperledger V1.1

1. The first compiled given official chaincode
CD github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
Go build
And then generate the following file:
Chaincode_example02 *

2. Perform chaincode
CORE_PEER_ADDRESS=peer0.org1.qklszzn.com: 7051 CORE_CHAINCODE_ID_NAME=r_test_cc6:1.0/chaincode_example02
Failure, find out why the port number 7051 to 7052705 1 is in V1.0, V1.1 should be changed to 7052, the modified normal operation is as follows:
Code_example02
The 2018-11-09 22:47:34. 977 CST [shim] SetupChaincodeLogging - & gt; INFO 001 Chaincode log level not provided; Defaulting, INFO
The 2018-11-09 22:47:34. 977 CST [shim] SetupChaincodeLogging - & gt; INFO 002 Chaincode (build level:) starting up...

3. In another console to perform the following:
Export set CORE_PEER_LOCALMSPID=Org1MSP
Export set CORE_PEER_ADDRESS=peer0.org1.qklszzn.com: 7051
Export set CORE_PEER_MSPCONFIGPATH=/opt/hyperledger/fabricconfig/crypto-config/peerOrganizations/org1.qklszzn.com/users/[email protected]/msp
Install chaincode:
Peer chaincode install - n r_test_cc6-1.0 p v github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

Quote us the following error:
The 2018-11-09 22:50:13. 028 CST [chaincodeCmd] checkChaincodeCmdParams - & gt; INFO 001 Using the default escc
The 2018-11-09 22:50:13. 029 CST [chaincodeCmd] checkChaincodeCmdParams - & gt; INFO 002 Using the default VSCC
Error: Error endorsing chaincode: RPC Error: code=Unknown desc=chaincode Error (EOF) status: 500 message:

4. Modify the export set CORE_PEER_ADDRESS=peer0.org1.qklszzn.com: 7052
Then peer chaincode install - n r_test_cc6-1.0 p v github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

Quote us the following error:
The 2018-11-09 22:51:41. 370 CST [chaincodeCmd] checkChaincodeCmdParams - & gt; INFO 001 Using the default escc
The 2018-11-09 22:51:41. 370 CST [chaincodeCmd] checkChaincodeCmdParams - & gt; INFO 002 Using the default VSCC
Error: Error endorsing chaincode: RPC Error: code=Unimplemented desc=unknown service protos. The Endorser


Finally:
No matter how to modify, install chaincode is wrong, so can't continue the following chaincode instantiation testing work, such as tech-oriented unsolved at present, hope Hyperledger Fabric professionals out help,


CodePudding user response:

First, to see your orderer running whether normally, configuration is normal
Second, you change the port number to 7052 in the beginning, this step is wrong, should not modify the port number, 7051 is a node communication port, communication port of 7052 is intelligent contracts

CodePudding user response:

First of all, peer and orderer nodes are normal operation, otherwise can't normal to create the channel,
Now have successfully created a channel, then success will peer node join into the channel, and successfully updated the Anchor node information,
Using peer channel list can show I create channel names,

The question now is not successfully installed chaincode, using peer chaincode install... Fail, and quote us the mistake I've posted above,
Also should not port Settings problems, because use the export environment variables set CORE_PEER_ADDRESS=peer0.org1.qklszzn.com: 7051, to 7051 or 7052 are not successfully installed chaincode,

CodePudding user response:

A friend you solved? I also met the same problem, I see a explained that need to start the peer and orderer separately with the docker container can add intelligent contracts to peer

CodePudding user response:

The same problem

CodePudding user response:

I also met the same problem, the way to solve the error below,
CD $GOPATH/SRC
Peer chaincode install - n r_test_cc6-1.0 p v github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

CodePudding user response:

What you say when I study the fabric v2.0 also met, to give you a few trying to identify the direction of the
1. To determine whether to deploy on multiple machines;
2. If it is multiple machines, it is needed to build the docker network, for the order, peer communication between chaincode, I encountered because no build docker network, and finally build the docker swarm network;
3. Because the docker - compose peer0 are used in the domain name, peer1, etc., so if there is no networking, remove the networks need, and specify the peer0 for IP
  • Related