Reputation: 467
I was trying the steps mentioned for the deployment of Asset Transfer Basic Chaincode mentioned here. https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-basic
I could deploy the TypeScript and Go variants of the chaincode successfully. However the Application is not starting up due to the following error related to CA certificate. Request your help to identify this issue.
:~/Code/fabric/fabric-samples/asset-transfer-basic/application-gateway-typescript$ npm start
[email protected] start node dist/app.js
channelName: mychannel chaincodeName: basic mspId: Org1MSP cryptoPath: /home/gokulalex/Code/fabric/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com keyDirectoryPath: /home/gokulalex/Code/fabric/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore certPath: /home/gokulalex/Code/fabric/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/cert.pem tlsCertPath: /home/gokulalex/Code/fabric/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt peerEndpoint: localhost:7051 peerHostAlias: peer0.org1.example.com
******** FAILED to run the application: [Error: ENOENT: no such file or directory, open '/home/gokulalex/Code/fabric/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/cert.pem'] { errno: -2, code: 'ENOENT', syscall: 'open', path: '/home/gokulalex/Code/fabric/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts/cert.pem' }
Upvotes: 0
Views: 75
Reputation: 1684
I think this issue is related to how the network was created (using the test-network/network.sh
sample script).
If created with the -ca
option, as described in the asset-transfer-basic sample README, the client certificate for User1 is created in the filename that the sample application is trying to load.
If the network was created without the -ca
option, the cryptogen tool (rather than the CA) is used to create crypro credentials, and the certificate for User1 is written to a different filename in the same directory.
Upvotes: 0