I am using Ubuntu 16.04.2 LTS as VM, and composer v0.19.1. I have installed all the prerequisites as well as hyperledger composer and fabric by folowing the documents at hyperledger composer playgroung. I have followed the tutorial line by line to make a business network. When I want to install the business network by the following command:
composer network install --card PeerAdmin#hlfv1 --archiveFile tutorial-network#0.0.1.bna
It gives me the following error:
No connection type provided, probably because the connection profile has no 'x-type' property defined.
The screen shot of the error is provided as well.
I have checked and made sure that PeerAdminCard exists by
composer card list
And of course Fabric is started. I highly appreciate if someone mentions what I am doing wrong. Thank you.
The 2nd problem you are having is with the createPeerAdminCard.sh script - you are using an 'old' version of the where the default is Fabric v1.0.
The default is assuming hlfv1 because the environment variable FABRIC_VERSION is not set. So the createPeerAdminCard.sh script assumes you want a hlfv1 card and creates the files, but Composer v0.19 can't import that old card at the end of the script.
The fast solution is to export FABRIC_VERSION="hlfv11" then run the createPeerAdminCard.sh
I suspect that you may also have a problem with hlfv1 / v11 with the Fabric. You can check the Fabric version by running docker ps or docker images - if they have 1.0 at the end you need to remove them all and run downloadFabric.sh in the same window as you exported the FABRIC_VERSION variable, then run startFabric.sh
You need to remember to export that environment variable everytime you run one of those Fabric Tools scripts - so the better answer might be to delete the Fabric Tools folder and all docker Images and Containers - then download a new version of Fabric tools which includes the new default for Fabric 1.0
I was getting exactly the same error as you. Turns out if you update the Composer from version 0.16 or earlier, the card store still has the old PeerAdmin card which is now not compatible with version 0.19. Even deleting the card using composer card delete --card <CARD_NAME_HERE> doesn't work. The quick and dirty solution is to manually delete the card store. It is normally in ${HOME}/.composer, so to deleting this directory should work.
rm -fr ${HOME}/.composer
For your other problems, the easiest solution is to replace your older version of Hyperledger and do a new install from scratch. That means removing composer as well as killing and removing all previous Docker containers:
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images dev-* -q)
Basically start from a clean slate if you can!
When you upgrade the composer modules from an earlier version to the latest version connection profile will not be compatible with the system. An ideal solution is to remove and delete the composer folder and create the .composer folder from the home directory and try creating PeerAdmin card again. Once that is done you are good to go for installing the starting the new business network application.
Related
I have already installed and worked in hyperledger fabric in ubuntu 16.04 and somehow i deleted the packages. I want to reinstall it again and working but it always showing up the error in first-network itself.
So can anyone suggest me how to start over it from the first?
Make sure you add the go.mod and go.sum for the vendored packages, chaincode in 2.0.0 does not include the packages, follow the chaincode structure of go.mod and go.sum like here
https://github.com/hyperledger/fabric-samples/tree/master/chaincode/marbles02/go
, then execute the following command to vendor the packages,
go mod download
try pruning the docker volumes and system. Use docker volume prune -f and docker system prune -f
I created a network (.BNA) and this installs and starts successfully under hlfv12 using composer v20.9 network install and composer network start commands).
All other components (e.g. composer-rest-server and composer-playground) work fine.
I have successfully installed hlf 1.4 and can get the sample, first-network, generated, up and down.
How can I install and start my old network (.BNA) under hlf 1.4? I understand Composer v20.9 does still work under hlf1.4.
Thanks.
I am trying to add 1 column to my mode.cto file. Once I added and apply the following commands, I was not able to see previous data:
composer archive create -t dir -n .
composer network install -a hash-health\#0.0.3.bna -c peerAdmin#hlfv1
composer network upgrade -c peerAdmin#hlfv1 -n hash-health -V 0.0.3
But, I noticed every time there is a new docker instance running.
I want to see my old data.
This link should provide you with help around your issue https://hyperledger.github.io/composer/latest/reference/model-compatibility
Please be aware that Hyperledger Composer is now deprecated and you should focus on using the hyperledger fabric programming models. Of course you can continue to use hyperledger composer for education purposes if you wish
I have been trying to install hyperledger fabric on raspberry PI and i have installed all the prerequisites for running up the sample byfn using fabcar samples but there's an error saying that "Docker composer is not able to pull the images" when i am trying to generate using the command ./byfn.sh generateDocker-compose is causing an
There are no pre-built docker images for ARM on docker hub, neither are there any pre-built binaries for the ARM architecture either.
To run BYFN I needed a 4Gb system, I just cannot see a raspberry pi ever being able to run BYFN.
I believe other people have successfully compiled (from source) and run a single peer on a raspberry pi in the past, but as more capability is added to the Peer, it's system requirements will increase and it also requires storage to hold the complete blockchain.
I am facing some issues with my network proxy, so I am trying hit and trial sort of approach to try different proxies. I need to give the proxy configuration during composer network install command within npmConfig file, now once I have given one proxy, how can I change it, as I cannot use composer network install again for same business network.
The npmrcFile option is available on the composer network install command and once the install is done - the npmrcFile is bundled with that install package on the peers.
Because you cannot build a chaincode container due to proxy issues (ie your issues stated), start will not be successful and so thus you cannot use composer network upgrade with -o <options> to upgrade the business network with new npmrcFile changes via 'options'. This is why its best to try it out your proxy configs in a simple Dev Fabric environment - you can blow away the peer each time and install a new Fabric - once it is working (its a one-off task), then you have the correct npmrcFile to install as appropriate etc.
If need be you could use wget http://npmregistry:4873/ from a test docker container (where you do a test npm install) to see if you can connect via your network proxy - then once you know, your config file should be read when it (re-)tries the docker build.
Hope this helps.