[Solved] Fabric_sdk_go:QueryBlockConfig failed: QueryBlockConfig failed: target(s) required

Fabric_sdk_go:[Solved]event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: QueryBlockConfig failed: target(s) required
Error Message:


Configuration file config_test: channel name is mychannel, in the demo it is orgchannel.
[Solution] Comment out orgchannel in config_test:

  # Mychannel overrides initialBackoff for discovery
  mychannel:
    policies:
      discovery:
        retryOpts:
          #[Required for override] number of retry attempts
          attempts: 4
          initialBackoff: 1s

  # multi-org test channel
  # orgchannel:  //remove

    # orderers:
    #  - orderer.example.com

    peers:
      peer0.org1.example.com:
        endorsingPeer: true
        chaincodeQuery: true
        ledgerQuery: true
        eventSource: true

      peer0.org2.example.com:
        endorsingPeer: true
        chaincodeQuery: true
        ledgerQuery: true
        eventSource: true

Problem-solving:

Read More: