0
votes

I am having trouble setting up simple Hyperledger Fabric v1.2.0 network. The network I am trying to build consists of one ordered and a single organization with one peer. I did work through the build-your-first-network tutorial successfully and wanted to start over from scratch. However, I always run into an error when joining the peer to the channel.

and This is NOT a quick solution. I'm using CORRECT block. (not Genesis)

peer channel join -b ch0_newest.block

It fails on joining the peer to the network with error:

Error: proposal failed (err: bad proposal response 500)

Peer logs:

2018-09-28 11:36:59.340 UTC [endorser] ProcessProposal -> DEBU 433 Entering: request from 10.60.0.1:54784

2018-09-28 11:36:59.340 UTC [protoutils] ValidateProposalMessage -> DEBU 434 ValidateProposalMessage starts for signed proposal 0xc4225da4b0

2018-09-28 11:36:59.340 UTC [protoutils] validateChannelHeader -> DEBU 435 validateChannelHeader info: header type 1

2018-09-28 11:36:59.340 UTC [protoutils] checkSignatureFromCreator -> DEBU 436 begin

2018-09-28 11:36:59.340 UTC [protoutils] checkSignatureFromCreator -> DEBU 437 creator is &{rg-837-380-MSP fa5c6b15723ec5d0aa104cf943611ebdefeb0a201a25d99464806aaa8c9326d0}

2018-09-28 11:36:59.340 UTC [protoutils] checkSignatureFromCreator -> DEBU 438 creator is valid

2018-09-28 11:36:59.340 UTC [protoutils] checkSignatureFromCreator -> DEBU 439 exits successfully

2018-09-28 11:36:59.340 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 43a validateChaincodeProposalMessage starts for proposal 0xc4221d09b0, header 0xc4225da810

2018-09-28 11:36:59.340 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 43b validateChaincodeProposalMessage info: header extension references chaincode name:"cscc"

2018-09-28 11:36:59.340 UTC [endorser] preProcess -> DEBU 43c [][0df54e45] processing txid: 0df54e4509c883ee67d7fd76cf79f1fdff487bff3811f1c5bde5cb2bf40842f6

2018-09-28 11:36:59.341 UTC [endorser] SimulateProposal -> DEBU 43d [][0df54e45] Entry chaincode: name:"cscc"

2018-09-28 11:36:59.341 UTC [endorser] callChaincode -> DEBU 43e [][0df54e4509c883ee67d7fd76cf79f1fdff487bff3811f1c5bde5cb2bf40842f6] Entry chaincode: name:"cscc" version: 1.2.0 2018-09-28 11:36:59.341 UTC [ccprovider] NewCCContext -> DEBU 43f NewCCCC(chain=,chaincode=cscc,version=1.2.0,txid=0df54e4509c883ee67d7fd76cf79f1fdff487bff3811f1c5bde5cb2bf40842f6,syscc=true,proposal=0xc4221d09b0,canname=cscc:1.2.0)

2018-09-28 11:36:59.341 UTC [chaincode] execute -> DEBU 440 canonical name: cscc:1.2.0

2018-09-28 11:36:59.341 UTC [chaincode] Execute -> DEBU 441 Entry

2018-09-28 11:36:59.341 UTC [shim] func1 -> DEBU 442 [0df54e45]Received message TRANSACTION from peer

2018-09-28 11:36:59.341 UTC [shim] handleMessage -> DEBU 443 [0df54e45] Handling ChaincodeMessage of type: TRANSACTION(state:ready)

2018-09-28 11:36:59.341 UTC [shim] handleReady -> DEBU 444 [0df54e45] Received TRANSACTION, invoking transaction on chaincode(state:ready)

2018-09-28 11:36:59.341 UTC [cscc] Invoke -> DEBU 445 Invoke function: JoinChain

2018-09-28 11:36:59.341 UTC [shim] func1 -> DEBU 446 [0df54e45] Transaction completed. Sending COMPLETED

2018-09-28 11:36:59.341 UTC [shim] triggerNextState -> DEBU 447 [0df54e45] send state message COMPLETED

2018-09-28 11:36:59.341 UTC [chaincode] handleMessage -> DEBU 448 [0df54e45] Fabric side handling ChaincodeMessage of type: COMPLETED in state ready

2018-09-28 11:36:59.341 UTC [chaincode] Notify -> DEBU 449 [0df54e45] notifying Txid:0df54e4509c883ee67d7fd76cf79f1fdff487bff3811f1c5bde5cb2bf40842f6, channelID:

2018-09-28 11:36:59.341 UTC [chaincode] Execute -> DEBU 44a Exit

2018-09-28 11:36:59.342 UTC [endorser] callChaincode -> DEBU 44b [][0df54e4509c883ee67d7fd76cf79f1fdff487bff3811f1c5bde5cb2bf40842f6] Exit

2018-09-28 11:36:59.342 UTC [endorser] SimulateProposal -> DEBU 44c [][0df54e45] Exit

2018-09-28 11:36:59.342 UTC [endorser] ProcessProposal -> ERRO 44d [][0df54e45] simulateProposal() resulted in chaincode name:"cscc" response status 500 for txid: 0df54e4509c883ee67d7fd76cf79f1fdff487bff3811f1c5bde5cb2bf40842f6

2018-09-28 11:36:59.342 UTC [endorser] ProcessProposal -> DEBU 44e Exit: request from 10.60.0.1:54784

I see that system chain code "cscc" returned 500 error but no any info about the issue with (inside) chain code runtime.

Where/how I can find such info?

I tired to enable DEBUG logging as environmant variables (for peer):

containers:
  - args:
    - --orderer=$(ORDERER_URL)
    - --peer-chaincodedev=true
    command:
    - peer
    - node
    - start
    env:
    - name: ORDERER_URL
      value: nd-418-523-261.rg-837-380.int.chainstack.com:7050
    - name: CORE_VM_DOCKER_ATTACHSTDOUT
      value: "true"
    - name: CORE_PEER_ID
      value: nd-418-523-262.rg-837-380.int.chainstack.com
    - name: CORE_PEER_ADDRESS
      value: nd-418-523-262.rg-837-380.int.chainstack.com:7051
    - name: CORE_PEER_GOSSIP_EXTERNALENDPOINT
      value: nd-418-523-262.rg-837-380.int.chainstack.com:7053
    - name: CORE_PEER_GOSSIP_BOOTSTRAP
      value: nd-418-523-262.rg-837-380.int.chainstack.com:7051
    - name: CORE_PEER_LOCALMSPID
      value: rg-837-380-MSP
    - name: CORE_TLS_ENABLED
      value: "false"
    - name: CORE_PEER_GOSSIP_USELEADERELECTION
      value: "true"
    - name: CORE_PEER_GOSSIP_ORGLEADER
      value: "false"
    - name: CORE_PEER_PROFILE_ENABLED
      value: "true"
    - name: CORE_PEER_LISTENADDRESS
      value: 0.0.0.0:7051
    - name: CORE_PEER_EVENTS_ADDRESS
      value: 0.0.0.0:7053
    - name: CORE_PEER_CHAINCODELISTENADDRESS
      value: 0.0.0.0:7052
    - name: CORE_PEER_MSPCONFIGPATH
      value: /etc/assets/msp
    - name: CORE_NEXT
      value: "true"
    - name: CORE_CHAINCODE_LOGGING_LEVEL
      value: DEBUG
    - name: CORE_LOGGING_PEER
      value: DEBUG
    - name: CORE_CHAINCODE_LOGGING_SHIM
      value: DEBUG
    - name: CORE_LOGGING_LEVEL
      value: DEBUG
    image: hyperledger/fabric-peer:1.2.0
    imagePullPolicy: IfNotPresent
    name: nd-418-523-262-peer

Btw, I'm using kubernetes ti run peer is there any specific with docker and chain code eval? I see this https://gerrit.hyperledger.org/r/#/c/12159/8/examples/cluster/kubernetes/peer.yaml.in

Extra logs (peer startup log) https://gist.github.com/hayorov/22912f76812493885d8f53a83f21201f

2
You`re saying that you're "using the correct block, not genesis". But the question you link explicitly resolves their problem by NOT using the newest block, but using block zero instead (which makes sense, because thats the channel configuration block). Are you sure you are using the right block?Christian W
@christian-w Double checked that I use block0 for joining the channel: peer channel fetch 0 ch0.block -c ch0 --orderer 35.204.122.102:7050Alex Khaerov
something unrelated - seems like your EXTERNALENDPOINT has port 7053. It should have port 7051...yacovm
@yacovm could you explain what do you mean? My port map is grpc: 7051 / code: 7052 (CORE_PEER_CHAINCODELISTENADDRESS) / events: 7053 (CORE_PEER_EVENTS_ADDRESS). Do you mean that I need to replace CORE_PEER_GOSSIP_EXTERNALENDPOINT 7053 -> 7051? Why? 2) Do you know how to debug this 500 error? I have no clue what to check.Alex Khaerov
yeah i can help you but only on Thursday... busy until then. ping me on chat.hyperledger.org on Thurday.yacovm

2 Answers

1
votes

An incorrect MSP admincerts key was used.

Error details peer.log (after extra logging was added):

2018-10-06 18:11:06.296 UTC [endorser] ProcessProposal -> ERRO 163 DEBUG: status:500 message:"access denied for [JoinChain][ch0]: [Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]]"

More details https://jira.hyperledger.org/browse/FAB-12306

0
votes

I was seeing the same error. Took a while, but I finally realized that the peer was already joined to the channel. This makes sense for you as well since you said you went through the tutorial once before.

When bringing up the peer, it somehow remembers that it's joined to the channel. You can verify by entering the container and getting the list.

docker exec -it <peer container id> bash

peer channel list

and it will show the channels that the peer has joined.

Hope this helps someone!