question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Promise is rejected: Error: 2 UNKNOWN: error starting container: API error (404): {"message":"network build-blockchain-insurance-app_default not found"}

See original GitHub issue

I’ve just download git repository and during build_ubuntu.sh, I’ve got the follow error message:


user@ubuntu:~/Insurance/build-blockchain-insurance-app$ 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-08-20T18_41_18_213Z-debug.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
parsiyacommented, Aug 27, 2018
  1. Run ./clean.sh to clean everything up.
  2. Edit build-blockchain-insurance-app/peer-base.yaml file. Search for the following: CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=build-blockchain-insurance-app_default
  3. Replace the line with: CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=buildblockchaininsuranceapp_default
  4. Run ./build_ubuntu.

The docker network name in the peer-base.yaml file is different from docker network name when setup in Ubuntu. Editing the file and renaming it will fix the problem.

1reaction
Akakandelwacommented, Dec 2, 2018

Much appreciated, @parsiya!

That sorted that fixed the issue for me and the chaincode was able to initiate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API error (404): {"message":"network build-blockchain ... - 博客园
Promise is rejected: Error: 2 UNKNOWN: error starting container: API ... build-blockchain-insurance-app_default not found"}出错的解决方案.
Read more >
error starting container: API error (404): {"message":"networ ...
Promise is rejected: Error: 2 UNKNOWN: error starting container: API error ... container: API error (404): network fabric_test not found“.
Read more >
Trying to catch UnhandledPromiseRejectionWarning: Error
reject (Error('It broke')) : resolve(name); and the resolve works but I can not seem to catch the 404 Not Found error, how can...
Read more >
Rejected shares - "Job not found" : r/NiceHash - Reddit
I get this error for about the first 30 seconds after launching while the hashrate settles in. After that I get less than...
Read more >
NiceHash Miner Troubleshooting Guide
If the riser is not working, the fans on the GPU will most likely not spin. ... are errors with GPU detection, 3rd...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found