Setting up a Blockchain Business Network With Hyperledger Fabric & Composer Running in Multiple Physical Machine


(Swati Kasera) #84

@varun

Hi,

I am trying to query the history data using composer but the results that i am getting is empty. Am i doing anything wrong.

I referred to this document - https://www.ibm.com/developerworks/cloud/library/cl-create-powerful-blockchain-queries-with-hyperledger-composer/index.html


(Haoxue Song) #86

Hi Varun,

Here’s my error when I install runtime to all the peers:

    Installing runtime for business network tutorial-network. This may take a minute...
    Error: Error trying install composer runtime. Error: The Composer runtime failed to install on 1 or more peers
    Command failed

I changed the IP address in the configtx.yaml orderer section:

################################################################################
#
#   SECTION: Orderer
#
#   - This section defines the values to encode into a config transaction or
#   genesis block for orderer related parameters
#
################################################################################
Orderer: &OrdererDefaults

    # Orderer Type: The orderer implementation to start
    # Available types are "solo" and "kafka"
    OrdererType: solo

    Addresses:
        - 13.58.254.178:7050
        # - 192.168.243.46:7050

    # Batch Timeout: The amount of time to wait before creating a batch
    BatchTimeout: 2s

    # Batch Size: Controls the number of messages batched into a block
    BatchSize:

        # Max Message Count: The maximum number of messages to permit in a batch
        MaxMessageCount: 10

        # Absolute Max Bytes: The absolute maximum number of bytes allowed for
        # the serialized messages in a batch.
        AbsoluteMaxBytes: 98 MB

        # Preferred Max Bytes: The preferred maximum number of bytes allowed for
        # the serialized messages in a batch. A message larger than the preferred
        # max bytes will result in a batch larger than preferred max bytes.
        PreferredMaxBytes: 512 KB

I also changed the IP address in the startFabric-Peer2.sh:

docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer2.org1.example.com peer channel fetch config -o 13.58.254.178:7050 -c composerchannel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer2.org1.example.com peer channel join -b composerchannel_config.block

Is there anything else I need to change? What would be the issue? Thanks.


(Varun Raj) #87
Installing runtime for business network tutorial-network. This may take a minute...
Error: Error trying install composer runtime. Error: The Composer runtime failed to install on 1 or more peers
Command failed

This happens when any of your peers are down or not reachable. I think it’s related to devops point of view.


(Haoxue Song) #88

I tried many times and still get this error. All my dockers are running and peers are joined the channel. What else can I check? And this has nothing to do with the IP address?


(Varun Raj) #89

This happens when the nodes are not reachable. Have you checked the composer connection profile?


(Piot Rek) #91

Hi, I have problem with create new buisness network:

Any idea?


(alex) #94

@varun i was able to set up the network …but how can i initiate a request from a particular peer that i want ??


(phanikumar) #97

Hi @varun Raj, I am looking for an article where I need to create multiple organizations on multiple physical machines. I followed this link https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-multi-org but getting certification errors. Can you please help me with some article around that.


(phanikumar) #98

Getting following error while deploying .bna file to the network

Error: Error trying install composer runtime. Error: The Composer runtime failed to install on 1 or more peers
 
I didn't find any errors in orderer container. But in peer logs I found the following 

2018-03-13 20:19:18.114 UTC [endorser] ProcessProposal -> ERRO 373 simulateProposal() resulted in chaincode response status 500 for txid: 5246a86f829b0be559f31a7ac00178e74aace48c5b4fbd5de3a2af2c9059bfb9
2018-03-13 20:19:18.137 UTC [endorser] ProcessProposal -> DEBU 374 Exit
2018-03-13 20:19:18.149 UTC [eventhub_producer] validateEventMessage -> DEBU 375 ValidateEventMessage starts for signed event 0xc420f6d0e0
2018-03-13 20:19:18.150 UTC [eventhub_producer] deRegisterHandler -> DEBU 376 deregistering event type: BLOCK
2018-03-13 20:19:18.170 UTC [eventhub_producer] Chat -> ERRO 377 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled

Can I get some help on how to solve this issue? All my peer and orderer containers are up and running


(Nawaz Uddin) #100

Hey I got an error when I started the network on the second machine

2018-03-20 14:18:06.666 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /etc/hyperledger/msp/users/Admin@org1.example.com/msp folder```

(Haoxue Song) #101

Hi Varun,

In your tutorial prerequisite section, you asked us to install the Fabric tools using your link. I think the link is broken now, but my question is that is there any difference between your tools and the tools mentioned in hyperledger composer tutorial using the commands below?

mkdir ~/fabric-tools && cd ~/fabric-tools

curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.zip
unzip fabric-dev-servers.zip

Thanks.


(Lijo Sebastian) #102

Hi,

I am ongoing with setting up Hyperledger Fabric and Composer running in Multiple physical machines.
Met with Error while trying to setup multi org environment based on this blog.

 # Create the channel
docker exec peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel1 -f /etc/hyperledger/configtx/composer-channel.tx
2018-03-28 12:22:56.137 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-03-28 12:22:56.138 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-03-28 12:22:56.148 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
Error: Invalid channel create transaction : mismatched channel ID composerchannel != composerchannel1
Usage:
  peer channel create [flags]

while executed ./teardownFabric.sh && ./startFabric.sh && ./createPeerAdminCard.sh
for 1st machine, generated error.

This is the Error I am stuck up with. Please help me through.

Regards,
Lijo Sebastian


(Gerard Duch) #103

I have added two news organizations to my consensus, but when I want to start the new network, using the composer, I get this error:

peer1.org2.example.com    | 2018-03-28 14:59:18.682 UTC [eventhub_producer] Chat -> ERRO 36a Error handling message: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org2MSP, received Org1MSP]]

Does somebody knows the problem?

Thanks ! :slight_smile:


(Rajiv) #104

Can anyone please let me know, How to and where to write endorsement policies? I mean, verify and approve the data to inserted in the ledger.

My requirement is, data will be stored in the ledger once the user approve the data… Is it possible?

Thanks in advance.


(Apoorv Chandurkar) #105

hi @varun, I started to follow this tutorial but when I run the command to update composerChannel,

configtxgen -profile ComposerChannel -outputCreateChannelTx ./composer-channel.tx -channelID composerchannel
it gives following error:

Error on outputChannelCreateTx: config update generation failure: could not parse application to application group: setting up the MSP manager failed: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of “x509: ECDSA verification failure” while trying to verify candidate authority certificate “ca.org1.example.com”) how this problem can be solved? and Why the ca certificate verification is getting problem as I’m using same repo as everyone else? can anybody help me? Thanks!


(Ivan Vaccari) #106

Hi @varun thanks for your tutorial, after some issues i am able to deploy the network and connect the two machine. I run my example on the first machine using the command suggested in the hyperledger composer tutorial and the first machina run it. how can i verify if the data are shared with the second machine? running the composer-playground, it doesn’t show the network.

Thanks!


(Varun Raj) #107

You’ve to delete the previously created crypto-config before you generate again. Because it will have duplicate certificates when recreating without deleting.


(Varun Raj) #108

You can check the logs in the peers of the second machine. Usually playground uses the card to communicate with the network thus you need to tranfer the admin card of that peer’s admin and try using the playground.


(Varun Raj) #109

I modified a little to make it work in multiple machines.


(Ivan Vaccari) #110

Thanks @varun, bit if i cant use the playground, how can i use the data in the second machine?