I am following this simple tutorial to set up my dev environment . Everything goes fine until I trigger ./createPeerAdminCard.sh which gives error as below
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is set to 'hlfv11'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Using composer-cli at v0.17.4
Successfully created business network card file to Output file:
/tmp/PeerAdmin#hlfv1.card
Command succeeded
Error: No connection type provided, probably because the connection
profile has no 'x-type' property defined. Command failed
I am using composer version v0.17.4 and fabric at 1.1.0 - alpha on ubuntu 16.04
You get this error because your card store still has a PeerAdmin card in it that was created using Composer 0.16 or earlier. The cards are not compatible so when the cli tries to delete the card it cannot. The quickest solution is to remove the file system card store completely. Currently the file system card store will always be at ${HOME}/.composer so to delete it you would do
rm -fr ${HOME}/.composer
Related
I'm trying to deploy the chaincode to a fabric peer using "peer lifecycle install".
It works perfectly. System can build and create the chaincode container as expected.
The images are automatically created after installing chaincode with prefix "dev-peer0.xxx"
I'd like to set the custom name like : pro-peer0.xxx.. instead of default (dev-peer0).
Can you help to advise?
Thank you.
enter image description here
It's a configurable option of a peer to change the network id see https://github.com/hyperledger/fabric/blob/8576508403cd6e3cbb5f7a2ff05dfae123de227b/sampleconfig/core.yaml#L19, you can change the core.yaml file in the peer.
If you are using docker-compose then you can change it using an env var of
CORE_PEER_NETWORKID
./createPeerAdminCard.sh
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is set to 'hlfv11'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Using composer-cli at v0.19.5
Successfully created business network card file to
Output file: /tmp/PeerAdmin#hlfv1.card
Command succeeded
Error: No connection type provided, probably because the connection profile has no 'x-type' property defined.
Command failed
You might be using an older version of the card (Source:- https://github.com/hyperledger/composer/issues/4007)
I am trying to enable JWT for hyperledger composer to my blockchain project.
However whilst following the tutorial I came accross the below error. I am not sure what it means:
Error: Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html
when running ./createPeerAdminCard.sh below is the exact output:
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is set to 'hlfv11'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Using composer-cli at v0.19.5
Successfully created business network card file to
Output file: /tmp/PeerAdmin#hlfv1.card
Command succeeded
Successfully imported business network card
Card file: /tmp/PeerAdmin#hlfv1.card
Card name: PeerAdmin#hlfv1
Command succeeded
Error: Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html
Command failed
Hyperledger Composer PeerAdmin card has been imported, host of fabric specified as 'localhost'
Are you running on a Mac ?
This problem has been seen when there is a hidden file present somewhere in the ~/.comoposer folder.
If you have cards you need to keep then try a composer card export to try and export them, then delete the folder ~/.composer and re-run the script to create the Peer Admin card.
There are a few details of the problem in this issue on github.
I am trying to deploy chaincode in devmod on my ubuntu machine. I am following this tutorial.
The issue is when I use this command : CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_ADDRESS=localhost:7052 npm start
it shows the following error:
2018-09-20T16:27:18.292Z ERROR [lib/handler.js] uncaughtException: The "peer.address" program argument must be set to a legitimate value of <host>:<port>
Full logs can be found here:
https://hastebin.com/arerozesad.sql
I am following this tutorial:
https://hyperledger-fabric.readthedocs.io/en/v1.0.6/peer-chaincode-devmode.html
First, I hope you are using Fabric v1.1 or later as Node.js chaincode is not supported in v1.0.x.
The instructions you listed are for running Go chaincode.
For Node.js chaincode, your command should look like
CORE_CHAINCODE_ID_NAME="mycc:v0" node mycc.js --peer.address grpc://localhost:7052
You should be able to replace node mycc.js with npm start as well.
See https://github.com/hyperledger/fabric-chaincode-node#test-nodejs-chaincode for more information.
Code
Currently I followed this article to develop my BNA to IBM blockchain cloud platform (started plan). Unluckily, I got the error when I try to run this line of code:
composer network start -c admin#mynetwork-fabric -A admin -C ./creds/admin-pub.pem -f delete.card -n my_network -V 0.0.4
Error
I am very sure that all parameters are good, the full errors are:
Error: Error trying to start business network. Error: No valid responses
from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN:
premature execution - chaincode (my_network:0.0.4) launched and
waiting for registration
Or sometimes the error is:
Error: Error trying to start business network. Error: No valid responses
from any peers.
Response from attempted peer comms was an error: Error:
REQUEST_TIMEOUT
I understand sometimes maybe there is a timeout, but I do not really got the launched and waiting for registration error.
P.S.
My hyperledger composer version is 0.19.
I also view this deploying tutorial, there might be some different commands, because of the different versions of Hyperledger Composer. I checked the composer hep to transfer the commands to running on composer 0.19.
Solution:
down grade composer-cli to 0.18.1
change your package.json, composer-cli to 0.18.1
npm install to create new bna
reinstall
restart
If you are using IBM Cloud Starter Plan, then you need to be using v0.18.1 of Composer not v0.19.
Also, this is the doc you should be following:
https://console.bluemix.net/docs/services/blockchain/develop_starter.html#deploying-a-business-networks-on-starter-plan