IBM-Blockchain-Archive / marbles

WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Apache License 2.0
1.02k stars 977 forks source link

Error: Orderer not found. #162

Closed git-rearden closed 7 years ago

git-rearden commented 7 years ago

Followed instructions for local

~/fabric-tools/marbles/scripts$ node install_chaincode.js info: Loaded config file /home//fabric-tools/marbles/config/marbles_local.json info: Loaded creds file /home//fabric-tools/marbles/config/blockchain_creds_local.json

info: Lets install some chaincode - marbles v4

info: First we enroll key: orderer.example.com ("my" extra debug in helper.js) /home//fabric-tools/marbles/utils/helper.js:251 throw new Error('Orderer not found.'); ^

Error: Orderer not found. at Object.helper.getOrderersUrl (/home//fabric-tools/marbles/utils/helper.js:251:11) at Object.helper.makeEnrollmentOptionsUsingCert (/home//fabric-tools/marbles/utils/helper.js:566:24) at Object. (/home//fabric-tools/marbles/scripts/install_chaincode.js:38:32) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:383:7)

docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 937b9d41069c dev-peer0.org1.example.com-fabcar-1.0 "chaincode -peer.a..." About an hour ago Up About an hour dev-peer0.org1.example.com-fabcar-1.0 e0f0c28a31fd hyperledger/fabric-tools "/bin/bash" About an hour ago Up About an hour cli b6ace037e164 hyperledger/fabric-peer "peer node start" About an hour ago Up About an hour 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 5213d5c54c97 hyperledger/fabric-orderer "orderer" About an hour ago Up About an hour 0.0.0.0:7050->7050/tcp orderer.example.com 84510a54d41e hyperledger/fabric-couchdb "tini -- /docker-e..." About an hour ago Up About an hour 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb 0ada6bcc309e hyperledger/fabric-ca "sh -c 'fabric-ca-..." About an hour ago Up About an hour 0.0.0.0:7054->7054/tcp ca.example.com

dshuffma-ibm commented 7 years ago

your file blockchain_creds_local.json is missing an orderer or maybe just the orderer's url field.

if you checkout the other credential files such as blockchian_creds_tls.json you can see how the orderer section should look:

"orderers": {
    "fabric-orderer": {
        "url": "grpc://localhost:7050"  //<- this is only an example, it may not be the correct url for you
    }
},
git-rearden commented 7 years ago

Thank you very much. I'll give it a try.

dshuffma-ibm commented 7 years ago

closing, inactivity

rameshb444 commented 5 years ago

Hi,

is this fixed ? I am facing the same issue while running marbles.

dshuffma-ibm commented 5 years ago

@rameshb444 this is due to user error. your JSON is invalid. it is up to you to fix it.

check my last comment. something is malformed and preventing it from finding the orderer url.

rameshb444 commented 5 years ago

Hi @dshuffma-ibm -

Thanks for your reply. I have done those changes in my connection_profile_local.json file. It worked fine as expected.