Fabric Composer quick-start failing when trying to deploy the bna file on OSX

跟風遠走 提交于 2019-12-23 01:54:57

问题


I'm having some problems trying to deploy a bna file using the fabric composer. First I tried using my own HyperLedger 0.6 instance, creating a connection profile and then using the composer-cli to deploy a bna and I got the following error during the composer network deploy command: "TypeError: Cannot read property 'fail' of undefined" Then I removed all my docker images and containers, made sure everything was updated and I tried the getting-started script and I got the exact same error. The steps I followed are the following:

  • I'm using Docker 17.03.1-ce-mac5 stable on OSX 10.12.4
  • I cloned the sample applications rep: git clone https://github.com/fabric-composer/sample-applications.git
  • Cd'ed to the getting-started folder
  • I run npm install
  • I get the following error, which is the same error I get when I create my own HyperLedger 0.6 instance and try to deploy a bna file using a connection profile and the composer-cli. Given that I got the same error using the getting started package I assume it's a more general error. Any ideas?

The docker log from the vp0 that is generated during the npm install shows no apparent connection error, after initialization it just repeats the following message:

    15:07:22.039 [peer] ensureConnected -> DEBU 31d Touch service indicates no dropped connections
    15:07:22.039 [peer] ensureConnected -> DEBU 31e Connected to: []
    15:07:22.039 [peer] ensureConnected -> DEBU 31f Discovery knows about: []

This is the log file I got after the execution:

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/local/bin/node',
    1 verbose cli   '/usr/local/bin/npm',
    1 verbose cli   'run',
    1 verbose cli   'deployNetwork' ]
    2 info using npm@4.4.4
    3 info using node@v6.10.0
    4 verbose run-script [ 'predeployNetwork', 'deployNetwork', 'postdeployNetwork' ]
    5 info lifecycle getting-started@1.0.0~predeployNetwork: getting-started@1.0.0
    6 silly lifecycle getting-started@1.0.0~predeployNetwork: no script for predeployNetwork, continuing
    7 info lifecycle getting-started@1.0.0~deployNetwork: getting-started@1.0.0
    8 verbose lifecycle getting-started@1.0.0~deployNetwork: unsafe-perm in lifecycle true
    9 verbose lifecycle getting-started@1.0.0~deployNetwork: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started/node_modules/.bin:/usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/Users/raullaprida/gospace/bin
    10 verbose lifecycle getting-started@1.0.0~deployNetwork: CWD: /Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started
    11 silly lifecycle getting-started@1.0.0~deployNetwork: Args: [ '-c',
    11 silly lifecycle   'composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d' ]
    12 silly lifecycle getting-started@1.0.0~deployNetwork: Returned: code: 1  signal: null
    13 info lifecycle getting-started@1.0.0~deployNetwork: Failed to exec deployNetwork script
    14 verbose stack Error: getting-started@1.0.0 deployNetwork: `composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d`
    14 verbose stack Exit status 1
    14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at EventEmitter.emit (events.js:191:7)
    14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
    14 verbose stack     at emitTwo (events.js:106:13)
    14 verbose stack     at ChildProcess.emit (events.js:191:7)
    14 verbose stack     at maybeClose (internal/child_process.js:877:16)
    14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    15 verbose pkgid getting-started@1.0.0
    16 verbose cwd /Users/raullaprida/newfabriccomposer/sample-applications/packages/getting-started
    17 verbose Darwin 16.5.0
    18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "deployNetwork"
    19 verbose node v6.10.0
    20 verbose npm  v4.4.4
    21 error code ELIFECYCLE
    22 error errno 1
    23 error getting-started@1.0.0 deployNetwork: `composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d`
    23 error Exit status 1
    24 error Failed at the getting-started@1.0.0 deployNetwork script 'composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d'.
    24 error Make sure you have the latest version of node.js and npm installed.
    24 error If you do, this is most likely a problem with the getting-started package,
    24 error not with npm itself.
    24 error Tell the author that this fails on your system:
    24 error     composer archive create --sourceName digitalproperty-network --sourceType module --archiveFile digitalPropertyNetwork.bna && composer network deploy --archiveFile digitalPropertyNetwork.bna  --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d && composer network list -n digitalproperty-network --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d
    24 error You can get information on how to open an issue for this project with:
    24 error     npm bugs getting-started
    24 error Or if that isn't available, you can get their info via:
    24 error     npm owner ls getting-started
    24 error There is likely additional logging output above.
    25 verbose exit [ 1, true ]

回答1:


I had the same problem but after removing all my containers and images the getting-started sample worked. I am using the same version of Docker and OSX as you, npm version is 4.4.4 and node version is 6.9.5. without the connection profile. I suggest you to do the same, remove all containers, images and the connection profile and try again.



来源:https://stackoverflow.com/questions/43349693/fabric-composer-quick-start-failing-when-trying-to-deploy-the-bna-file-on-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!