问题
Executing:
composer network ping -n calma-network -p hlfv1 -i admin -s adminpw
I receive the following error:
Error: Error trying to ping. Error: Composer runtime (0.8.0) is not compatible with client (0.11.0)
Command failed
The versions look the same:
composer -v
composer-cli v0.11.0
composer-admin v0.11.0
composer-client v0.11.0
composer-common v0.11.0
composer-runtime-hlf v0.11.0
composer-runtime-hlfv1 v0.11.0
回答1:
Rebooting Hyperledger Fabric (stopFabric.sh, teardownFabric.sh and startFabric.sh) solves the error.
回答2:
I encountered the same problem. The fix for me was to first find the location of composer by typing which composer
in the terminal. Then I manually deleted the directory containing it rm -rf /PATH/OF/COMPOSER
. Then run npm install -g composer-cli@latest
. After type composer -v
to verify new version.
回答3:
I got a similar error but differently:
Error: Error trying to ping. Error: Composer runtime (0.11.1) is not compatible with client (0.10.1)
OP had old runtime and new client, but in my case, I had new runtime and old client. I was not able to solve the problem by Rebooting Hyperledger fabric. Instead, I updated composer-rest-server and it worked.
sudo npm install -g composer-rest-server
Note: After rebooting hyperledger fabric, you need to re-deploy the chaincode or say bna
file in my case.
回答4:
Ran into a similar issue
trying to ping. Error: Composer runtime (0.16.5) is not compatible with client (0.16.3)
This was because composure had newer version than composure-playground. To fix this
- Shutdown the composer
npm install -g composer-playground
回答5:
I also faced the same problem and found an issue ..
Problem
while executing below command got an error composer-rest-server -c admin@airlinev8 -p 3000
Nitishs-MacBook-Pro:fabric-dev-servers nitishbhushan$ composer-rest-server -c admin@airlinev8 -p 3000 Discovering types from business network definition ... Connection fails: Error: Error trying to ping. Error: Composer runtime (0.19.9) is not compatible with client (0.19.8) It will be retried for the next request. Exception: Error: Error trying to ping. Error: Composer runtime (0.19.9) is not compatible with client (0.19.8) Error: Error trying to ping. Error: Composer runtime (0.19.9) is not compatible with client (0.19.8)
solution
step 1: check version of composer-cli and composer-rest-server composer-cli - 0.19.9 composer-rest-server - 0.19.8
step2: install latest version of composer-rest-server npm install composer-rest-server -g
After this step, I ran the command again and it worked :-)
回答6:
You need to install the same version everywhere.In your case if it is 0.8.0 then make everything same with the command as below.
npm install -g composer-cli@0.8.0 --save
npm install -g composer-admin@0.8.0 --save
npm install -g composer-common@0.8.0 --save
...like wise.
You can also try with the following.
sudo npm install -g composer-rest-server@0.8.0
cheers!
来源:https://stackoverflow.com/questions/45565506/hyperledger-composer-incompatible-versions-error-and-the-versions-are-the-same