THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric . pull requests not accepted
I start memberservice and one vp.
memberservice configure is reference the asset.xml in the asset management 02 sample project as below
alice: 1 CMS10pEQlB16 bank_a 00001
bob: 1 NOE63pEQbL25 bank_a 00002
admin: 1 Tc43PeqBl11 bank_a 00003
aca:
Attributes is a list of the valid attributes to each user, attribute certificate authority is emulated temporarily using this file entries.
# In the future an external attribute certificate authority will be invoked. The format to each entry is:
#
# attribute-entry-#:{userid};{affiliation};{attributeName};{attributeValue};{valid from};{valid to}
#
# If valid to is empty the attribute never expire, if the valid from is empty the attribute is valid from the time zero.
attributes:
attribute-entry-0: assigner;bank_a;role;issuer;2015-01-01T00:00:00-03:00;;
attribute-entry-1: alice;bank_a;role;client;2016-01-01T00:00:00-03:00;;
attribute-entry-2: alice;bank_a;account1;22222-00001;2016-01-01T00:00:00-03:00;;
attribute-entry-3: alice;bank_a;account2;22222-00002;2016-01-01T00:00:00-03:00;;
attribute-entry-4: alice;bank_a;account3;22222-00003;2016-01-01T00:00:00-03:00;;
attribute-entry-5: alice;bank_a;account4;22222-00004;2016-01-01T00:00:00-03:00;;
attribute-entry-6: alice;bank_a;contactInfo;alice@gmail.com;2016-01-01T00:00:00-03:00;;
attribute-entry-7: bob;bank_a;role;client;2015-02-02T00:00:00-03:00;;
attribute-entry-8: bob;bank_a;account1;11111-00001;2016-01-01T00:00:00-03:00;;
attribute-entry-9: bob;bank_a;account2;11111-00002;2015-02-02T00:00:00-03:00;;
attribute-entry-10: bob;bank_a;account3;11111-00003;2015-02-02T00:00:00-03:00;;
attribute-entry-11: bob;bank_a;contactInfo;bob@yahoo.com;2015-02-02T00:00:00-03:00;;
address: localhost:50051
server-name: acap
Enabling/disabling Attribute Certificate Authority, if ACA is enabled attributes will be added into the TCert.
enabled: true
While I deploy the chaincode using rest
http://localhost:5000/chaincode
{
"jsonrpc": "2.0",
"method": "deploy",
"params": {
"type": 1,
"chaincodeID": {
"path": "github.com/hyperledger/fabric/examples/chaincode/go/asset_management02/"
},
"ctorMsg": {
"function": "init",
"args": []
},
"secureContext": "admin"
},
"id": 1
}
Occurs Error as below
06:13:58.422 [crypto] InitClient -> INFO 03d Initializing client [admin]...
06:13:58.431 [crypto] Error -> ERRO 03e [client.admin] Failed loading TCertOwnerKDFKey. Key is missing.
06:13:58.433 [crypto] InitClient -> INFO 03f Initializing client [admin]...done!
06:13:58.673 [crypto] closeClientInternal -> INFO 040 Closing client [admin]...
While I invoke the chaincode, occur error as below.
http://localhost:5000/chaincode
{
"jsonrpc": "2.0",
"method": "invoke",
"params": {
"type": 1,
"chaincodeID": {
"name": "328f4be6cbd53df358fa3eb432c39b1ec8eacab4779513426e2bad2cfa66d25e325095d2e3f80b45d981412f2ba4ff5362c47ce5fc4e1dd53f281842ac3c6e81"
},
"ctorMsg": {
"function": "assignOwnership",
"args": [
"alice","account1","1000"
]
},
"secureContext": "admin"
},
"id": 2
}
06:20:13.595 [crypto] closeClientInternal -> INFO 047 Closing client [admin]...
06:20:13.604 [rest] processChaincodeInvokeOrQuery -> INFO 048 Successfully submitted invoke transaction with txuuid (2c8fe51e-c929-4ff8-806b-4d90af341d00)
06:20:13.604 [rest] ProcessChaincode -> INFO 049 REST successfully submitted invoke transaction: {"jsonrpc":"2.0","result":{"status":"OK","message":"2c8fe51e-c929-4ff8-806b-4d90af341d00"},"id":2}
06:20:14.600 [chaincode] processStream -> ERRO 04a Got error: user is not aurthorized to assign assets
06:20:14.655 [peer] ensureConnected -> INFO 04b Touch service indicates no dropped connections
06:20:20.655 [peer] ensureConnected -> INFO 04c Touch service indicates no dropped connections
@mingjinc Thanks for submitting this issue. However, we have transitioned issue tracking to Jira https://jira.hyperledger.org/ Please transfer this issue there and then close this one. Thanks!
Description
I start memberservice and one vp. memberservice configure is reference the asset.xml in the asset management 02 sample project as below alice: 1 CMS10pEQlB16 bank_a 00001 bob: 1 NOE63pEQbL25 bank_a 00002 admin: 1 Tc43PeqBl11 bank_a 00003
aca:
Attributes is a list of the valid attributes to each user, attribute certificate authority is emulated temporarily using this file entries.
address: localhost:50051 server-name: acap
Enabling/disabling Attribute Certificate Authority, if ACA is enabled attributes will be added into the TCert.
While I deploy the chaincode using rest http://localhost:5000/chaincode { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": "github.com/hyperledger/fabric/examples/chaincode/go/asset_management02/" }, "ctorMsg": { "function": "init", "args": [] }, "secureContext": "admin" }, "id": 1 }
Occurs Error as below 06:13:58.422 [crypto] InitClient -> INFO 03d Initializing client [admin]... 06:13:58.431 [crypto] Error -> ERRO 03e [client.admin] Failed loading TCertOwnerKDFKey. Key is missing. 06:13:58.433 [crypto] InitClient -> INFO 03f Initializing client [admin]...done! 06:13:58.673 [crypto] closeClientInternal -> INFO 040 Closing client [admin]...
While I invoke the chaincode, occur error as below. http://localhost:5000/chaincode { "jsonrpc": "2.0", "method": "invoke", "params": { "type": 1, "chaincodeID": { "name": "328f4be6cbd53df358fa3eb432c39b1ec8eacab4779513426e2bad2cfa66d25e325095d2e3f80b45d981412f2ba4ff5362c47ce5fc4e1dd53f281842ac3c6e81" }, "ctorMsg": { "function": "assignOwnership", "args": [ "alice","account1","1000" ] }, "secureContext": "admin" }, "id": 2 }
06:20:13.595 [crypto] closeClientInternal -> INFO 047 Closing client [admin]... 06:20:13.604 [rest] processChaincodeInvokeOrQuery -> INFO 048 Successfully submitted invoke transaction with txuuid (2c8fe51e-c929-4ff8-806b-4d90af341d00) 06:20:13.604 [rest] ProcessChaincode -> INFO 049 REST successfully submitted invoke transaction: {"jsonrpc":"2.0","result":{"status":"OK","message":"2c8fe51e-c929-4ff8-806b-4d90af341d00"},"id":2} 06:20:14.600 [chaincode] processStream -> ERRO 04a Got error: user is not aurthorized to assign assets 06:20:14.655 [peer] ensureConnected -> INFO 04b Touch service indicates no dropped connections 06:20:20.655 [peer] ensureConnected -> INFO 04c Touch service indicates no dropped connections
How to resolve it?
Describe How to Reproduce