Hyperledger Composer:未为此连接指定业务网络 [英] Hyperledger Composer : No business network has been specified for this connection

查看:146
本文介绍了Hyperledger Composer:未为此连接指定业务网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在本地安装了hyperledger composer.但是在本地主机上,它会给出错误:

I have installed hyperledger composer locally. But on localhost it gives error :

错误:尝试ping错误.

Error : Error trying to ping.

错误:尚未建立任何业务网络 为此连接指定

Error: No business network has been specified for this connection.

我也无法添加模型和脚本文件.

I am not able to add model and script file as well.

这是终端中显示的错误

error: [Hyperledger-Composer] undefined:HLFConnection            :ping()                    Error: Error trying to ping. Error: No business network has been specified for this connection
at _checkRuntimeVersions.then.catch (/usr/local/lib/node_modules/composer-playground/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:787:34)
at <anonymous>
at runMicrotasksCallback (internal/process/next_tick.js:121:5)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9) error: [Hyperledger-Composer] undefined:ConnectorServer          :Error: Error trying to pi

推荐答案

我想我解决了这个问题.

I think I solved this problem.

错误原因是No business network has been specified for this connection.,当您第一次运行composer-playground时不会发生这种情况,因为那一次,您确实没有网络,也没有也是如此,因此有一个模式弹出Let's blockchain.

The error reason is No business network has been specified for this connection., this does not happen when you first time to run composer-playground, because that time, you truly do not have a network and you either do not have card too, so there is a modal pop up Let's blockchain.

这仅在您停止/删除您的业务网络网时发生,或者没有业务网络在运行,但是您还拥有与该网络链接的名片.

This only happened when you stop/delete your business network net, or there is no business network running but you also have the business card linked to the network.

  1. 按照该教程在本地创建一个新的business network
  2. 通过stopFabric.shstartFabric.sh重新启动Farbric工具,(*这不是启动业务网络,而是启动结构)
  3. 再次运行您的游乐场composer-playground
  4. 可能您还会再次看到该错误(error trying to ping),但不用担心
  5. 在右上角找到一个折叠的按钮My Business Networks
  6. delete the card without connectiondeploy a new network
  1. Follow the tutorial to create a new business network locally
  2. restart your farbric tool by stopFabric.sh and startFabric.sh, (* this is not to start your business network but your fabric)
  3. run your playground again composer-playground
  4. probably you will also see the error again (error trying to ping), but no worry
  5. find a button at top right corner which is folded My Business Networks
  6. delete the card without connection or deploy a new network

这对我有用,希望它也对您有用.这种过程设计的局限性,即使您删除网络,或者即使您没有启动网络,也要尝试启动游乐场,该卡仍然存在.这就是我认为发生此错误的原因.

This worked for me, hope it will work for you too. This kind of process design limitation, the card is still there even you delete your network or your are trying to start your playground even you did not start your network. This is why this error happened I think.

Hyperledger Composer Playground(即现在的Playground)使用您的 浏览器的本地存储以模拟区块链网络的状态 存储,这意味着您无需运行真正的验证对等方 网络以使用Playground.

Hyperledger Composer Playground (Playground from now on) uses your browser's local storage to simulate the blockchain network's state storage, which means you don't need to run a real validating peer network to use Playground.

使用仅浏览器模式,您可以对业务网络进行建模和测试 使用驻留在浏览器本地的模拟区块链分类帐 存储.

Using browser-only mode, you can model and test the business network using a mock blockchain ledger that resides in your browser's local storage.

如何在浏览器Chrome中删除缓存

这可能可以解决许多错误.

How to delete cache in browser Chrome

This probably can solve many errors.

例如,在Chrome中,在设置">高级">内容设置"> Cookies>所有cookie和站点数据> localhost,单击垃圾箱 图标删除本地存储.如果您使用其他浏览器, 按照特定于该浏览器的说明进行操作,并删除所有本地 存储.

In Chrome, for example, under Settings > Advanced > Content Settings > Cookies > All cookies and site data > localhost, click the trashcan icon to remove local storage. If you're using a different browser, follow the instructions specific to that browser, and delete all local storage.

参考文献

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆