I am following the guide and use local network I create the admin cert by fabric-sample/fabcar's 3 scripts and it works right. But when I try to install chain code, it gives me below error message.
info: [fcw] Going to enroll with admin cert! peer_urls=[grpc://localhost:7051], channel_id=mychannel, uuid=marblesDockerComposeNetworkmychannelOrg1MSPfabricpeerorg1, orderer_url=grpc://localhost:7050, msp_id=Org1MSP
debug: added peer grpc://localhost:7051
debug: [fcw] Successfully got enrollment marblesDockerComposeNetworkmychannelOrg1MSPfabricpeerorg1
---------------------------------------
info: Now we install
---------------------------------------
debug: [fcw] Installing Chaincode
debug: [fcw] Sending install req targets=[grpc.http2.keepalive_time=300, grpc.keepalive_time_ms=300000, grpc.http2.keepalive_timeout=35, grpc.keepalive_timeout_ms=3500, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.primary_user_agent=grpc-node/1.10.0, _url=grpc://localhost:7051, addr=localhost:7051, , _request_timeout=90000, , _name=null], chaincodePath=marbles, chaincodeId=marbles, chaincodeVersion=v4
info: [packager/Golang.js]: packaging GOLANG from marbles
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))
at new createStatusError (/Volumes/dev/qukuailian/marbles-master/node_modules/grpc/src/client.js:64:15)
at /Volumes/dev/qukuailian/marbles-master/node_modules/grpc/src/client.js:583:15
error: [fcw] Failed to obtain endorsement for transaction. code=2, , details=chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))
error: [fcw] Error in install catch block object code=2, , details=chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))
---------------------------------------
info: Install done. Errors: parsed=Blockchain network error - [This identity is not an admin])), raw=[code=2, , details=chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))]
connection_profile_local.json configuration is as follows
{
"name": "Docker Compose Network",
"x-networkId": "not-important",
"x-type": "hlfv1",
"description": "Connection Profile for an Hyperledger Fabric network on a local machine",
"version": "1.0.0",
"client": {
"organization": "Org1MSP",
"credentialStore": {
"path": "/Volumes/dev/qukuailian2/fabric-samples/fabcar/hfc-key-store"
}
},
"channels": {
"mychannel": {
"orderers": [
"fabric-orderer"
],
"peers": {
"fabric-peer-org1": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
}
},
"chaincodes": [
"marbles:v4"
],
"x-blockDelay": 10000
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"peers": [
"fabric-peer-org1"
],
"certificateAuthorities": [
"fabric-ca"
],
"x-certJson": {
"path": "/Volumes/dev/qukuailian2/fabric-samples/fabcar/hfc-key-store/user1"
}
}
},
"orderers": {
"fabric-orderer": {
"url": "grpc://localhost:7050"
}
},
"peers": {
"fabric-peer-org1": {
"url": "grpc://localhost:7051",
"eventUrl": "grpc://localhost:7053"
}
},
"certificateAuthorities": {
"fabric-ca": {
"url": "http://localhost:7054",
"httpOptions": {
"verify": true
},
"registrar": [
{
"enrollId": "admin",
"enrollSecret": "adminpw"
}
],
"caName": null
}
}
}
My frbric sample version is v1.0.4,marbles version is 4.0
本地对等方的msp文件夹中的admincerts文件夹应包含您的一个管理员成员的证书(通常为msp / signcerts / cert.pem)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.