composer - No business network has been specified for this connection 解决方案

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

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.

This is the errors showing in terminal

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
  •  
    There is not enough information here to be able to help you. Please can you provide details of what you are trying to do and how you are doing it, for example the commands you have entered. Otherwise it is impossible to provide answers
  •  
    Did you ever find out what the problem was and if so what did you do to resolve it? I'm running into this and I'm not sure why it's wrong. Steps followed as given here hyperledger.github.io/composer/installing/… 

I think I solved this problem.

About the error

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.

Solution

  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.

Addition, More about 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.

How to delete cache in browser Chrome

This probably can solve many errors.

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.

References

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值