首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用Rest请求信道创建

问无法使用Rest请求信道创建
EN

Stack Overflow用户
提问于 2018-02-19 15:46:37
回答 1查看 360关注 0票数 0

我是跟踪从这里的超分类账织物样品的平衡转移。我对它做了一点修改。我增加了第三个组织。一切都很顺利,直到我尝试用

curl -s -X POST \ http://localhost:4000/channels \ -H授权:承载“\ -H”内容-类型: application/json“\ -d '{ "channelName":"mychannel",-X }‘

我得到了下面的错误:

错误:(/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:255:19)\n : Orderer.js: sendBroadcast - on错误:“错误:连接失败\n在ClientDuplexStream._readsDone (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:221:8)\n的ClientDuplexStream._emitStatusIfDone上在(/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:283:12)“2018-02-19 15:40:04.991创建-通道-错误: SERVICE_UNAVAILABLE在ClientDuplexStream.(/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:141:21) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:258:12)在(/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:221:8) at readCallback (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:283:12) (节点:79777) UnhandledPromiseRejectionWarning:未处理的承诺拒绝(拒绝id: 2):错误:失败初始化通道: Error: SERVICE_UNAVAILABLE (节点:79777) DEP0018 DeprecationWarning:未处理的承诺拒绝被取消。在未来,承诺不处理的拒绝将使用非零退出代码终止Node.js进程。

EN

回答 1

Stack Overflow用户

发布于 2018-05-01 20:54:39

我建议看一看订购服务常见问题。当订购服务返回错误为:

SERVICE_UNAVAILABLE

这几乎总是显示出订购者和卡夫卡之间的连接问题。这通常是由于以下两个原因之一:

  1. 订购服务还没有足够长的时间来启动,卡夫卡还在进行领导人选举。
  2. 卡夫卡集群配置错误。

我总是鼓励用户首先熟悉Kafka。让集群启动并运行,并将接收消息发送到/从它发送,包括来自其他主机或容器的消息,就像您的orderer流程一样。只有这样,你才能尝试在卡夫卡之上部署织物。卡夫卡提供了一个快速启动指南,这是一个很好的起点。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48869557

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档