fabric-sdk-go error: No peers to connect to

fabric-sdk-go error: No peers to connect to

We are using the IBM Managed Blockchain based on fabric 1.2, and using the Go SDK @5e291d3a34f59beb9a8ae2bcbba388515648dc73. When we try to invoke the chaincode we have installed on the peers, we get a "no peers to connect to" error:

We are using the IBM Managed Blockchain based on fabric 1.2, and using the Go SDK @5e291d3a34f59beb9a8ae2bcbba388515648dc73. When we try to invoke the chaincode we have installed on the peers, we get a "no peers to connect to" error:

[fabsdk/fab] 2019/01/25 12:25:57 UTC - dispatcher.(*Dispatcher).Start.func1 -> DEBU Listening for events...
[fabsdk/fab] 2019/01/25 12:25:57 UTC - client.(*Client).connect -> DEBU ... got error in connection response: no peers to connect to
[fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -> DEBU Failed with err [error registering for TxStatus event: no peers to connect to] on attempt #1. Checking if retry is warranted...
[fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.(*Reference).setTimerRunning -> DEBU Timer started
[fabsdk/common] 2019/01/25 12:25:57 UTC - retry.(*RetryableInvoker).Invoke -> DEBU ... retry for err [error registering for TxStatus event: no peers to connect to] is NOT warranted after 1 attempt(s).
[fabsdk/util] 2019/01/25 12:25:57 UTC - lazyref.checkTimeStarted -> DEBU Starting timer

After putting some extra logging of our own it looks like the failure happens because the peer discovery service (https://github.com/hyperledger/fabric-sdk-go/blob/master/pkg/client/common/discovery/dynamicdiscovery/chservice.go#L72) doesn't return any peers in its response. The targets seem to be set correctly.

After dumping the GRPC response, we get

(*discovery.Response)(0xc4205cd600)(
results: <
    members: <
        peers_by_org: <
            key: "org1" 
            value: <> 
        > 
    >
> 
)

We also set up a different fabric network on our own with the same chaincode, which works properly and the same dump shows this instead (some parts were redacted):

(*discovery.Response)(0xc42045ed20)(
results: <
    members: <
        peers_by_org: <
            key: "Org1MSP" 
            value: <
                peers: <
                    state_info: <
                        payload:"<redacted>"
                    >
                    membership_info: <payload:"<redacted>" > 
                    identity:"<redacted>" 
                >
                peers: <
                    state_info: <
                        payload:"<redacted>" 
                        signature:"<redacted>" 
                    > 
                    membership_info: <
                        payload:"<redacted>" 
                        signature:"<redacted>" 
                    > 
                    identity:"<redacted>"
                >
            >
        > 
        peers_by_org: <
            key:"Org2MSP"
            value: <
                peers: <
                    state_info:<
                        payload:"<redacted>" 
                        signature:"<redacted>" 
                    > 
                    membership_info: <
                        payload:"<redacted>" 
                    > 
                    identity:"<redacted>" 
                > 
                peers: <
                    state_info: <
                        payload:"<redacted>" 
                        signature:"<redacted>" 
                    > 
                    membership_info: < 
                        payload:"<redacted>" 
                        signature:"<redacted>" 
                    > 
                    identity:"<redacted>" 
                > 
            > 
        > 
    > 
>
)

I am unsure if the issue is in the configuration of the SDK or the IBM Managed fabric network. If it is the IBM network, then it seems that somehow the peers aren't aware that they are members of an organization.

Has anyone seen this behaviour before? I searched the hyperledger official rocket chat for the "no peers to connect to" error, and some results came up, but they seemed to be caused by other reasons, such as the peers being excluded by the SDK, not due to the response to the discovery request.

go blockchain

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Revolutionary Application of Blockchain Technology

Our Blockchain Online Training will provide you to learn about Blockchain technology aspects with realty. Our Blockchain Course also includes live sessions, live Projects

Blockchain, The Next Level Transaction Medium for Banking and Financial Services

Our Blockchain Online Training will provide you to learn about Blockchain technology aspects with realty. Our Blockchain Course also includes live sessions, live Projects

What Is The Difference Between Blockchain And Bitcoin?

Get hands on experinece on block chain live industry experts with real world example at Block chain online Training. Enroll for free demo

Blockchain and the future of accountancy

Get hands on experinece on block chain live industry experts with real world example at Block chain online Training. Enroll for free demo

Securing media content using Blockchain Technology

Venture-backed blockchain and cryptocurrency startups are mushrooming across Silicon Valley. To get most out of blockchain, media & broadcasting industry is hoping to get some of its longstanding problem resolved through the technology.