ArPhil / HLF-21-2Org-1Ord-CG

0 stars 1 forks source link

error trying to instal chaincode #1

Open chebyte opened 4 years ago

chebyte commented 4 years ago

hello there, thanks for nice article, very nice explanation, but I'm getting some problem trying to install some chaincode example

after run start.sh I was trying to install fabcar chaincode example but I’m getting some problems

#peer lifecycle chaincode package fabcar.tar.gz --path fabric-samples/chaincode/fabcar/javascript/ --lang node --label fabcar_1
export CORE_PEER_TLS_ENABLED=true
export ORDERER_CA=${PWD}/crypto-material/ordererOrganizations/ap.com/orderers/orderer0.ap.com/msp/tlscacerts/tlsca.ap.com-cert.pem
export CORE_PEER_LOCALMSPID=Org1MSP
export CORE_PEER_TLS_ROOTCERT_FILE=${PWD}/crypto-material/peerOrganizations/org1.ap.com/peers/peer0.org1.ap.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=${PWD}/crypto-material/peerOrganizations/org1.ap.com/users/Admin@org1.ap.com/msp
export CORE_PEER_ADDRESS=localhost:7051
#peer lifecycle chaincode install fabcar.tar.gz
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image inspection failed: Get "http://unix.sock/images/dev-peer0.org1.ap.com-fabcar_1-f084b8952a3c8180c7a151a50c477affe930c4678ec8621c298922de235d6a84-2105c63fdf7b92f77de68869eb07e9965e34940f800195df79df5cc6bfe5a373/json": dial unix /var/run/docker.sock: connect: no such file or directory

do you know why?

thanks for advance

victor-ccab commented 4 years ago

@chebyte Hey Mauro!

Seems to be an open issue on Hyperledger Fabric since version 2.0 apparently caused by dev mode.

Stackoverflow: https://stackoverflow.com/questions/59919240/hyperledger-fabric-2-0-beta-javascript-dev-mode Jira Issue: https://jira.hyperledger.org/browse/FAB-17584

I'm gonna try to work around it, since my need is to deploy a sample smart contract, just like you.

How have you been progressing so far? any update or work around?

Cheers,

victor-ccab commented 4 years ago

@chebyte Somehow i made it work by just parsing the diffs against the test-network fabric sample =)

Basically i changed both docker-composer-org1.yaml and docker-composer-org2.yaml as follows :

image

Hope it helps!!