Closed rddill-IBM closed 6 years ago
I inspected the log file for composer-playground and used the certificate and key used to create PeerAdmin idCard. Using PeerAdmin as userID for network admin and admin@serotoblockchain-network for business network admin.
Still get the same error when playground attempts to deploy.
Error: Error trying login and get user Context.
- Error: Error trying to enroll user or load channel configuration.
- Error: Enrollment failed with errors [[{"code":400,"message":"Authorization failure"}]]
The last 20 lines from the log file on deployment from playground are:
0|composer | HLFConnection :constructor() <
0|composer | HLFConnectionManager :connect() < [object Object]
0|composer | ConnectorServer :connectionManagerConnect < 5c041b5e-0de5-449b-ab4e-631d519c0325
0|composer | ConnectorServer :connectionLogin() > 5c041b5e-0de5-449b-ab4e-631d519c0325, PeerAdmin, na
0|composer | HLFConnection :login() > PeerAdmin
0|composer | HLFConnectionManager :fabric-client() [FileKeyValueStore.js]: FileKeyValueStore -- getValue
0|composer | HLFConnectionManager :fabric-client() [Client.js]: Failed to load user "PeerAdmin" from local key value store
0|composer | HLFConnectionManager :fabric-client() [Client.js]: Requested user "PeerAdmin" not loaded from the state store on this Client instance: name - PeerAdmin
0|composer | HLFConnection :login() User not enrolled, submitting enrollment request
0|composer | HLFConnection :enroll() > PeerAdmin
0|composer | HLFConnection :enroll() Submitting enrollment request
0|composer | HLFConnectionManager :fabric-client() [utils.CryptoKeyStore]: This class requires a CryptoKeyStore to save keys, using the store: {"opts":{"path":"/home/composer/.composer/client-data/admin@zerotoblockchain-network"}}
0|composer | HLFConnectionManager :fabric-client() [FileKeyValueStore.js]: FileKeyValueStore.js - constructor
0|composer | HLFConnectionManager :fabric-client() [utils.CryptoKeyStore]: _getKeyStore returning ks
0|composer | HLFConnectionManager :fabric-client() [crypto_ecdsa_aes]: generateKey, store.setValue
0|composer | HLFConnectionManager :fabric-client() [ecdsa/key.js]: ECDSA curve param X: 1bec0658cf1c7be1c359b15198eee55ff7bd2e629c743e7e177484a964656de8
0|composer | HLFConnectionManager :fabric-client() [ecdsa/key.js]: ECDSA curve param Y: 87ada8ce9734fc02be3c423df4b25bfd9e0c8aa453ca45d86cf47c7fa4e028e9
0|composer | HLFConnectionManager :fabric-client() [FileKeyValueStore.js]: FileKeyValueStore -- setValue
0|composer | HLFConnection :enroll() Error: Error trying to enroll user or load channel configuration. Error: Enrollment failed with errors [[{"code":400,"message":"Authorization failure"}]]
0|composer | HLFConnection :login() Error: Error trying to enroll user or load channel configuration. Error: Enrollment failed with errors [[{"code":400,"message":"Authorization failure"}]]
Have updated to v0.16.2 to ensure bna is generated identical to expectations in composer. Same error occurs. The root cause appears to be that PeerAdmin is not found in the local key store for playground, yet the logs for playground indicate that this id is created and successfully imported during the network deploy phase. Any assistance will be greatly appreciated.
0|composer | NPM :downloadSample() >
0|composer | NPM :downloadSample() Found business network archive in package package/dist/basic-sample-network.bna
0|composer | NPM :downloadSample() <
0|composer | ConnectorServer :businessNetworkCardStore > admin@zerotoblockchain-network
0|composer | ConnectorServer :businessNetworkCardStore < false
0|composer | ConnectorServer :businessNetworkCardStore > PeerAdmin
0|composer | IdCard :fromDirectory() > /home/composer/.composer/cards/PeerAdmin, {"constants":{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":64,"O_EXCL":128,"O_NOCTTY":256,"O_TRUNC":512,"O_APPEND":1024,"O_DIRECTORY":65536,"O_NOATIME":262144,"O_NOFOLLOW":131072,"O_SYNC":1052672,"O_DSYNC":4096,"O_DIRECT":16384,"O_NONBLOCK":2048,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1,"UV_FS_COPYFILE_EXCL":1,"COPYFILE_EXCL":1},"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1}
0|composer | IdCard :constructor() >
0|composer | IdCard :constructor() <
0|composer | IdCard :setCredentials() > {"certificate":"-----BEGIN CERTIFICATE-----\nMIICGT...fs2bT1x/Stg==\n-----END CERTIFICATE-----\n","privateKey":"-----BEGIN PRIVATE KEY-----\nMIGHA...PikgHG\n-----END PRIVATE KEY-----\n"}
0|composer | IdCard :setCredentials() <
0|composer | IdCard :fromDirectory() < {"metadata":{"version":1,"userName":"PeerAdmin","roles":["PeerAdmin","ChannelAdmin"]},"connectionProfile":{"type":"hlfv1","name":"hlfv1","orderers":[{"url":"grpc://blockchain-orderer:31010"}],"ca":{"url":"http://blockchain-ca:30054","name":"CA1"},"peers":[{"requestURL":"grpc://blockchain-org1peer1:30110","eventURL":"grpc://blockchain-org1peer1:30111"}],"channel":"channel1","mspID":"Org1MSP","timeout":300},"credentials":{"certificate":"-----BEGIN CERTIFICATE-----\nMIICGT...fs2bT1x/Stg==\n-----END CERTIFICATE-----\n","privateKey":"-----BEGIN PRIVATE KEY-----\nMIGHA...PikgHG\n-----END PRIVATE KEY-----\n"}}
0|composer | ConnectorServer :businessNetworkCardStore < {"metadata":{"version":1,"userName":"PeerAdmin","roles":["PeerAdmin","ChannelAdmin"]},"connectionProfile":{"type":"hlfv1","name":"hlfv1","orderers":[{"url":"grpc://blockchain-orderer:31010"}],"ca":{"url":"http://blockchain-ca:30054","name":"CA1"},"peers":[{"requestURL":"grpc://blockchain-org1peer1:30110","eventURL":"grpc://blockchain-org1peer1:30111"}],"channel":"channel1","mspID":"Org1MSP","timeout":300},"credentials":{"certificate":"-----BEGIN CERTIFICATE-----\nMIICGT...fs2bT1x/Stg==\n-----END CERTIFICATE-----\n","privateKey":"-----BEGIN PRIVATE KEY-----\nMIGHA...PikgHG\n-----END PRIVATE KEY-----\n"}}
Any insight into what's causing this issue? Is there anything that I can do to resolve this problem?
It might be because of composer using the old credentials. Did you run delete_all.sh
script before running setting up the network?
@davidkel any insight on this?
Playground already has a "PeerAdmin" card to perform deployment of a bna, what the dialog is asking you for is an identity to bind to an initial participant. The easiest solution is to get a fresh certificate from the ca server by selecting the "id and secret" radio button and entering "admin" for the name and "adminpw" for the secret.
Thank you. the use of the id/secret worked for this deployment.
Working with latest code from this site (Feb 7, 2018) and attempting to import a bna created with hyperledger composer v0.16.0 into playground version in this service. Playground will not deploy network unless I provide PeerAdmin cert and private key; however those are created from inside the docker container used to create the PeerAdmin key. Using the cert and key provided in fabric-tools on local device does not work. Help, please.
Image follows: