错误:Composer运行时与客户端不兼容

启动REST服务器的问题,启动composer-rest-server时出现错误 作曲者的版本是v0.20.9 composer-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>
duxinlang 回答:错误:Composer运行时与客户端不兼容

出现此问题是因为您的作曲家和composer-rest-server不兼容,意味着方式不一样。因此,您必须升级您的结构环境。运行以下命令以升级composer-rest-server

  1. npm uninstall -g composer-cli composer-rest-server generator-hyperledger-composer。要卸载您已经安装的工具。

安装0.20.9 composer-cli

  1. npm install -g composer-cli@0.20.9
  2. npm install -g composer-rest-server@0.20.9
  3. npm install -g generator-hyperledger-composer@0.20.9

如果您需要本地作曲家游乐场,请运行npm install -g composer-playground@0.20.9

希望它会为您提供帮助:)

本文链接:https://www.f2er.com/3096391.html

大家都在问