blockchainbean2 icon indicating copy to clipboard operation
blockchainbean2 copied to clipboard

error: [Network]: _initializeInternalChannel: no suitable peers available to initialize from

Open terryfernz opened this issue 5 years ago • 3 comments

I get a error message when trying to run node query.js from inside the web-app. The smart contract is instantiated and running inside the Fabric n/w created using VsCode and the IBM Blockchain Extension.

Here is my local localConnection.json

{
    "name": "basic-network",
    "version": "1.0.0",
    "client": {
        "organization": "Org1",
        "connection": {
            "timeout": {
                "peer": {
                    "endorser": "300",
                    "eventHub": "300",
                    "eventReg": "300"
                },
                "orderer": "300"
            }
        }
    },
    "channels": {
        "mychannel": {
            "orderers": [
                "orderer.example.com"
            ],
            "peers": {
                "peer0.org1.example.com": {}
            }
        }
    },
    "organizations": {
        "Org1": {
            "mspid": "Org1MSP",
            "peers": [
                "peer0.org1.example.com"
            ],
            "certificateAuthorities": [
                "ca.org1.example.com"
            ]
        }
    },
    "orderers": {
        "orderer.example.com": {
            "url": "grpc://localhost:17050"
        }
    },
    "peers": {
        "peer0.org1.example.com": {
            "url": "grpc://localhost:17051",
            "eventUrl": "grpc://localhost:17053"
        }
    },
    "certificateAuthorities": {
        "ca.org1.example.com": {
            "url": "http://localhost:17054",
            "caName": "ca.example.com"
        }
    }
}

My cofig.json

{
  "connection_file": "localConnection.json",
  "appAdmin": "admin",
  "appAdminSecret": "adminpw",
  "orgMSPID": "org1msp",
  "caName": "ca.example.com",
  "userName": "user2",
  "gatewayDiscovery": { "enabled": true, "asLocalhost": true }
}

Any help will be much appreciated. Thx you.

terryfernz avatar Nov 20 '19 08:11 terryfernz

This is only an issue if the network is started inside the VSCode IBM Blockchain Platform extension v1.0.15. It works perfectly fine with the hyperledger fabric created network.

terryfernz avatar Nov 21 '19 05:11 terryfernz

I am facing similar issue, anyone with help? Good on the cloud but same error on Local

okedeji avatar Dec 22 '19 22:12 okedeji

I got the same error message. I fixed this by placing the correct keys in the wallet for the user, thought I cannot tell if yours is the same case as mine. The wallet path also must be correctly specified.

gemcutterjp avatar Jan 12 '20 09:01 gemcutterjp