Reputation: 63
The issue with starting the REST server, I got the error while starting composer-rest-server composer version is v0.20.9 composer-rest-server version v0.19.20
Here is the log :
nithin@:~/fabric-tools/fabric-dev-servers$ composer-rest-server
? Enter the name of the business network card to use: admin@test-bna
? Specify if you want namespaces in the generated REST API: always use namespaces
? Specify if you want to use an API key to secure the REST API: No
? Specify if you want to enable authentication for the REST API using Passport: No
? Specify if you want to enable the explorer test interface: No
? Specify a key if you want to enable dynamic logging:
? Specify if you want to enable event publication over WebSockets: No
? Specify if you want to enable TLS security for the REST API: No
To restart the REST server using the same options, issue the following command:
composer-rest-server -c admin@test-bna -n always
Discovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Composer runtime (0.20.9) is not
compatible with client (0.19.20)
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Composer runtime (0.20.9) is not compatible with client (0.19.20)
Error: Error trying to ping. Error: Composer runtime (0.20.9) is not compatible with client (0.19.20)
at _checkRuntimeVersions.then.catch (/home/nithin/.nvm/versions/node/v8.16.2/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:842:34)
at <anonymous>
Upvotes: 2
Views: 478
Reputation: 1222
Here issue occurs because your composer and composer-rest-server are not compatible means does not same. So you have to upgrade your fabric environment. Run the following a command to upgrade composer-rest-server
.
npm uninstall -g composer-cli composer-rest-server generator-hyperledger-composer
. For uninstalling your already installed tools.Install 0.20.9 composer-cli
npm install -g [email protected]
npm install -g [email protected]
npm install -g [email protected]
If you need locally composer-playground then run npm install -g [email protected]
Hope it will help you:)
Upvotes: 1