Git Product home page Git Product logo

hyperledger-fabric-pet-shop's Introduction

Hyperledger Fabric Pet Shop

Requirements

Setup

  1. Run ./bootstrap.sh to get hyperledger fabric binaries
  2. cd pet-shop
  3. Remove pre-existing docker containers docker rm -f $(docker ps -aq)
  4. Run ./startFabric.sh to setup network
  5. Run npm install to get node modules
  6. Run node registerAdmin.js && node registerUser.js to create admin and user
  7. Run node server.js to start client server
  8. Open http://localhost:8000

Troubleshooting

Error running startFabric.sh

ERROR: failed to register layer: rename
/var/lib/docker/image/overlay2/layerdb/tmp/write-set-091347846 /var/lib/docker/image/overlay2/layerdb/sha256/9d3227c1793b7494e598caafd0a5013900e17dcdf1d7bdd31d39c82be04fcf28: file exists

try running rm -rf ~/Library/Containers/com.docker.docker/Data/*

Error running node registerAdmin.js && node registerUser.js

Error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Connect Failed

error from query =  { Error: Connect Failed

   at /Desktop/prj/education/LFS171x/fabric-material/tuna-app/node_modules/grpc/src/node/src/client.js:554:15 code: 14, metadata: Metadata { _internal_repr: {} } }

or

Failed to register: Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]]
Authorization failures may be caused by having admin credentials from a previous CA instance.

try running rm -rf ~/.hfc-key-store/ and then registering command again.

Finishing up

To remove all Docker containers and images run following commands

  1. docker rm -f $(docker ps -aq)
  2. docker rmi -f $(docker images -a -q)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.