Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用mongodb ini hyperledger composer使用持久数据源时出错_Mongodb_Hyperledger Fabric_Hyperledger_Blockchain_Hyperledger Composer - Fatal编程技术网

使用mongodb ini hyperledger composer使用持久数据源时出错

使用mongodb ini hyperledger composer使用持久数据源时出错,mongodb,hyperledger-fabric,hyperledger,blockchain,hyperledger-composer,Mongodb,Hyperledger Fabric,Hyperledger,Blockchain,Hyperledger Composer,webuser@ubuntu16:~$docker日志-f rest [2018-08-29T12:38:31.278Z]PM2日志:在无守护程序模式下启动 [2018-08-29T12:38:31.351Z]PM2日志:在-分叉模式下启动执行序列-对于应用程序名称:composer rest服务器id:0 [2018-08-29T12:38:31.359Z]PM2日志:应用程序名称:composer rest服务器id:0在线 警告:“0”的节点\应用\实例值与任何实例配置文件名都不匹配。 警

webuser@ubuntu16:~$docker日志-f rest
[2018-08-29T12:38:31.278Z]PM2日志:在无守护程序模式下启动
[2018-08-29T12:38:31.351Z]PM2日志:在-分叉模式下启动执行序列-对于应用程序名称:composer rest服务器id:0
[2018-08-29T12:38:31.359Z]PM2日志:应用程序名称:composer rest服务器id:0在线
警告:“0”的节点\应用\实例值与任何实例配置文件名都不匹配。
警告:请参阅https://github.com/lorenwest/node-config/wiki/Strict-Mode
正在从业务网络定义中发现类型。。。
(节点:15)弃用警告:当前URL字符串解析器已弃用,将在未来版本中删除。要使用新的解析器,请将选项{useNewUrlParser:true}传递给MongoClient.connect。
连接失败:错误:尝试ping时出错。错误:未能在截止日期之前连接
将为下一个请求重试。
异常:错误:尝试ping时出错。错误:未能在截止日期之前连接
错误:尝试ping时出错。错误:未能在截止日期之前连接
在_checkRuntimeVersions.then.catch(/home/composer/.npm global/lib/node_modules/composer rest server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:806:34)
在
但是我使用的不是谷歌认证,而是github认证。
另外,我在connection.json文件和这个命令中将我的本地主机更改为我的ubuntu droplet的ip

sed-e's/localhost:7051/peer0.org1.example.com:7051/'-e's/localhost:7053/peer0.org1.example.com:7053/'-e's/localhost:7054/ca.org1.example.com:7054/'-e's/localhost:7050/order.example.com:7050/'<$HOME/.composer/cards/restadmin@trade-network/connection.json>/tmp/connection.json&&cp-p/tmp/connection.json$HOME/.composer/卡片/restadmin@trade-网络/

但是没有成功!我现在得到以下错误

webuser@ubuntu16:~$docker记录rest [2018-08-30T05:03:02.916Z]PM2日志:在无守护程序模式下启动 [2018-08-30T05:03:02.989Z]PM2日志:在-分叉模式下启动执行序列-对于应用程序名称:composer rest服务器id:0 [2018-08-30T05:03:02.997Z]PM2日志:应用程序名称:composer rest服务器id:0在线 警告:“0”的节点\应用\实例值与任何实例配置文件名都不匹配。 警告:请参阅 正在从业务网络定义中发现类型。。。 (节点:15)弃用警告:当前URL字符串解析器已弃用,将在未来版本中删除。要使用新的解析器,请将选项{useNewUrlParser:true}传递给MongoClient.connect。 正在发现返回的事务。。 从业务网络定义中发现的类型 正在为业务网络定义中的所有类型生成架构。。。 为业务网络定义中的所有类型生成的架构 正在将所有类型的架构添加到环回。。。 将所有类型的架构添加到环回 SyntaxError:JSON中位置92处的意外字符串 在JSON.parse()处 at Promise.then(/home/composer/.npm global/lib/node_modules/composer rest server/server/server.js:141:34) 在 在进程中。_tickDomainCallback(internal/process/next_tick.js:228:7)
[2018-08-30T05:03:09.942Z]PM2日志:id为[0]且pid为[15]的应用程序[composer rest server],已通过信号[SIGINT]与代码一起退出此错误
尝试ping时出错。错误:未能在截止日期之前连接
表示容器中的composer rest服务器无法在用于启动rest服务器的卡的connection.json中的URL处查看/连接到基础结构

原因有很多:

  • 织物未启动
  • 您使用的是在connection.json的URL中包含localhost的业务网卡,而localhost只是重新定向回rest容器中
  • rest容器在与结构容器不同的Docker网桥上启动,无法连接到结构

您是否遵循了Composer文档中的说明?如果完全遵循,它将避免上述3个问题。

嘿,即使将本地主机更改为我的ubuntu droplet地址,我也会收到一个错误,请参阅我编辑的帖子。提前谢谢@撒切尔夫人
webuser@ubuntu16:~$ docker logs -f rest
    [2018-08-29T12:38:31.278Z] PM2 log: Launching in no daemon mode
    [2018-08-29T12:38:31.351Z] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
    [2018-08-29T12:38:31.359Z] PM2 log: App name:composer-rest-server id:0 online
    WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
    WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
    Discovering types from business network definition ...
    (node:15) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
    Connection fails: Error: Error trying to ping. Error: Failed to connect before the deadline
    It will be retried for the next request.
    Exception: Error: Error trying to ping. Error: Failed to connect before the deadline
    Error: Error trying to ping. Error: Failed to connect before the deadline
        at _checkRuntimeVersions.then.catch (/home/composer/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:806:34)
        at <anonymous>
    [2018-08-29T12:38:41.021Z] PM2 log: App [composer-rest-server] with id [0] and pid [15], exited with code [1] via signal [SIGINT]
    [2018-08-29T12:38:41.024Z] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
    [2018-08-29T12:38:41.028Z] PM2 log: App name:composer-rest-server id:0 online
    WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
    WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
    Discovering types from business network definition ...
    (node:40) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
    Connection fails: Error: Error trying to ping. Error: Failed to connect before the deadline

    It will be retried for the next request.