zoukankan      html  css  js  c++  java
  • Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {"message":"network build-blockchain-insurance-app_default not found"}出错的解决方案

    错误描述:

    docker logs web

    现象:

    > blockchain-for-insurance@2.1.0 serve /app
    > cross-env NODE_ENV=production&&node ./bin/server
    
    /app/app/static/js
    Server running on port: 3000
    Default channel not found, attempting creation...
    Successfully created a new default channel.
    Joining peers to the default channel.
    Chaincode is not installed, attempting installation...
    Base container image present.
    info: [packager/Golang.js]: packaging GOLANG from bcins
    info: [packager/Golang.js]: packaging GOLANG from bcins
    info: [packager/Golang.js]: packaging GOLANG from bcins
    info: [packager/Golang.js]: packaging GOLANG from bcins
    Successfully installed chaincode on the default channel.
    error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {"message":"network build-blockchain-insurance-app_default not found"}
    
        at new createStatusError (/app/node_modules/grpc/src/client.js:64:15)
        at /app/node_modules/grpc/src/client.js:583:15
    Fatal error instantiating chaincode on some(all) peers!
    Error: Proposal rejected by some (all) of the peers: Error: 2 UNKNOWN: error starting container: API error (404): {"message":"network build-blockchain-insurance-app_default not found"}
    
        at /app/www/blockchain/utils.js:248:15
        at Generator.next (<anonymous>)
        at step (/app/bin/blockchain/utils.js:102:191)
        at /app/bin/blockchain/utils.js:102:361
        at <anonymous>
    npm ERR! code ELIFECYCLE
    npm ERR! errno 255
    npm ERR! blockchain-for-insurance@2.1.0 serve: `cross-env NODE_ENV=production&&node ./bin/server`
    npm ERR! Exit status 255
    npm ERR! 
    npm ERR! Failed at the blockchain-for-insurance@2.1.0 serve script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /root/.npm/_logs/2018-07-31T03_09_32_746Z-debug.log
    

      

    解决方案:

    i do as the following steps and it works for me:

    • input "docker network ls" to figure out the name of the network( it is "buildblockchaininsuranceapp_default" for me)

    • go to ./peer-base.yaml and change CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE to the corresponding network name.

    • input"./clean.sh" to clean the docker containers and rebuild the app again

    hope it works for u all too.

  • 相关阅读:
    Cygwin下,不让VIM自动生成~备份文件
    Cygwin下,从windows复制粘贴到vim中
    nasm汇编指令, partcopy复制指令
    如何编写自己的操作系统(1)
    已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性
    Jquery 仿手机滑屏效果 LyhucTouchSlider
    xp QQ2009无法卸载
    DataContract 添加到 DataContractSet,因为已经存在数据协定名称也为命名空间
    Jquery Slider 插件 lyhucSlider
    C# 年会抽奖程序
  • 原文地址:https://www.cnblogs.com/sddai/p/9395232.html
Copyright © 2011-2022 走看看