blockchainbean2
blockchainbean2 copied to clipboard
error: [Network]: _initializeInternalChannel: no suitable peers available to initialize from
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.
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.
I am facing similar issue, anyone with help? Good on the cloud but same error on Local
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.