启动REST服务器的问题,启动composer-rest-server时出现错误作曲者的版本是v0.20.9composer-rest-server版本v0.19.20
这里是日志:
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>
这里出现问题,因为您的作曲家和作曲家休息服务器不兼容,意味着方式不相同。因此,您必须升级您的结构环境。运行以下命令以升级composer-rest-server
。
npm uninstall -g composer-cli composer-rest-server generator-hyperledger-composer
。对于卸载您已安装的工具。安装0.20.9 composer-cli
npm install -g [email protected]
npm install -g [email protected]
npm install -g [email protected]
如果您需要本地作曲家游乐场,请运行npm install -g [email protected]
希望它将为您提供帮助:)