0

I deployed Hyperledger fabric in two machines,contains(order, peer ,couchdb,ca). But I met the problem when I start a network or upgrade a network like this:

Error: Error trying to start business network. Error: Failed to receive commit notification from 192.168.11.62:7051 for transaction 'ea8a9ea86c161d91e7482d11a05a7d18c2c3d4909c00f887917cca37acb3a6ad' within the timeout period

I have define the docker networks like this:

networks:
  default:
    aliases:
      - santaitech

all containers was in the same network.and I defined the enviroment:

CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=santaitech_default

the name is followed by folder's name

This problem didn't show up every time, sometimes the network works fine! I think it is the problem of network definition, but I can't solve it!

T.Arthur
  • 135
  • 13
  • shell I add more enviroment to solve this problem? – T.Arthur Sep 11 '18 at 08:57
  • Have you checked the log of the container at 192.168.11.62:7051 for errors ? – R Thatcher Sep 11 '18 at 13:05
  • I have checked the log on 192.168.11.62:7051's container, there is no error logs, and I thought the container seems haven't received the start or upgrade network request – T.Arthur Sep 12 '18 at 00:28
  • in additional , when I want to upgrade execute this command again , the system chaincode lscc told me that the chaincode has already been instantiated. ERRO 048 [firstchannel][a8fe731a] failed to invoke chaincode name:"lscc" , error: chaincode santai-network-token:0.0.4 has already been launched – T.Arthur Sep 12 '18 at 01:28
  • that's probably because you're not following the correct upgrade procedure. See https://hyperledger.github.io/composer/latest/tutorials/queries - in particular, 'Step Three: Regenerate' and 'Step Four: Deploy' for the correct, repeatable, upgrade method (you need to update your version, install, then upgrade the business network). – Paul O'Mahony Sep 12 '18 at 12:23
  • I sepeated my problem in the answer blow..I think this must be the network problem between the machines, or the problem in My connection profile, I'll make more test – T.Arthur Sep 13 '18 at 02:09
  • I have more action on the composer network. I used the command " composer network start -c PeerAdmin@santaitech-network-org1 -n santai-compound-network -V 0.0.2 -o endorsement-policy.json -A org1 -C org1/admin-pub.pem -A org2 -C org2/admin-pub.pem " to start the network. and I use the command "composer card create -p ../composer-client/org2/byfn-network-org2.json -u compound2 -n santai-compound-network -c org2/admin-pub.pem -k org2/admin-priv.pem" to create a card. when I import and ping the network use this, it works fine.but I tail the network. – T.Arthur Sep 13 '18 at 02:15
  • the network show up an problem: "[firstchannel][283ec3d2] failed to invoke chaincode name:"santai-compound-network" , error: transaction returned with failure: Error: The current identity, with the name 'admin' and the identifier '9846a44584aa19e2f0dbaa828ac38668b2e90e3cbd1dcc7344a5457ad523a710', must be activated (ACTIVATION_REQUIRED)" – T.Arthur Sep 13 '18 at 02:19

1 Answers1

0

the current problem is that

  1. I start up my fabric use docker-compose in two test machines
  2. I created a channel "firstchannel", update anchor peer, install a demo chaincode, and instantiated the chaincode(success)
  3. invoke the demo chaincode(success)
  4. upgrade the chaincode use fabric-tools container(success)
  5. install a composer network(.bna) with the admin card (PeerAdmin@santaitech-network-org1)(success)
  6. start the compose network (success)
  7. install another network(.bna) success.(success)
  8. start the network in step.7 (failed).error message is: Error: Failed to receive commit notification from 192.168.11.62:7051 for transaction '7f7d77efecae17ae42fe3012f9e33048240774bc620e7446481204718b67e606' within the timeout period
  9. I restart the test docker-swarm(192.168.11.62) , the network is instantiaed
T.Arthur
  • 135
  • 13
  • if you follow the principles /steps of the multi-org tutorial on the Composer docs site https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org (obviously adapted for your cross-machine environment as you've done above, including card names, business network name etc). I've noticed your use of the `-o` option in `composer network start` is incorrect. It should be `-o endorsementPolicyFile=/endorsement-policy.json` - also from the messages above, its not clear how you created the Peer admin card – Paul O'Mahony Sep 13 '18 at 09:30
  • I found the TIMEOUT_REQUEST problem, the link is below https://stackoverflow.com/questions/49751259/error-in-starting-hyperledger-fabric-network-with-hyperledger-composer/49758354#49758354 and https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#information_source--composer-network-start-issues but when I modified the configuration it is still can't resove – T.Arthur Sep 14 '18 at 01:13