4

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
J.F.
  • 307
  • 1
  • 4
  • 18
  • Please refer to [this response](https://stackoverflow.com/questions/51850195/composer-runtime-0-19-13-is-not-compatible-with-client-0-20-0/51946383#51946383) Hope this will help you – sromano Aug 21 '18 at 10:44

6 Answers6

5

Rebooting Hyperledger Fabric (stopFabric.sh, teardownFabric.sh and startFabric.sh) solves the error.

J.F.
  • 307
  • 1
  • 4
  • 18
  • Please, accept your answer as the correct one, since it helped solve the problem – neuromouse Aug 10 '17 at 14:25
  • didn't work for me Error: Error trying to ping. Error: Composer runtime (0.19.5) is not compatible with client (0.19.4) – Hem M May 23 '18 at 07:32
  • Rebooting did not work for me as it picked up from the same package file.I added the version manually with @x.x.x (x being the version number) and it worked. – nilakantha singh deo Jun 18 '18 at 11:36
3

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.

Nicholas Porter
  • 2,588
  • 2
  • 23
  • 37
  • 1
    Thanks. I had older runtime being reported (0.19.13) when I tried to run network ping, even though composer -V was reporting 0.20.0. Physically deleting all the node_modules and reinstalling fixed the issue. – womp Aug 18 '18 at 04:18
1

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.

Ayushya
  • 9,599
  • 6
  • 41
  • 57
1

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
shailesh mangal
  • 312
  • 1
  • 3
  • 12
1

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 :-)

Community
  • 1
  • 1
0

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!