Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with creating a channel #323

Open
dcultra opened this issue Jun 8, 2022 · 2 comments
Open

problems with creating a channel #323

dcultra opened this issue Jun 8, 2022 · 2 comments
Assignees

Comments

@dcultra
Copy link

dcultra commented Jun 8, 2022

No description provided.

@dcultra
Copy link
Author

dcultra commented Jun 8, 2022

I start to learn how to use fablo these days ,and I try to build a network with 3 organizations with one channel , all nodes runs well ,but when it comes to create the channel ,it just fails with the output lines below
`
============ 😻 Creating 'my-channel3' on Org1/peer0 😻 ==============
Creating channel with name (TLS): my-channel3
Orderer: orderer0.group1.orderer.example.com:7030
CORE_PEER_LOCALMSPID: Org1MSP
CORE_PEER_ADDRESS: peer0.org1.example.com:7041
CORE_PEER_MSPCONFIGPATH: /var/hyperledger/cli/crypto/users/[email protected]/msp

TLS_CA_CERT_PATH is: /var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem
CORE_PEER_TLS_CERT_FILE: /var/hyperledger/cli/crypto/users/[email protected]/tls/client.crt
CORE_PEER_TLS_KEY_FILE: /var/hyperledger/cli/crypto/users/[email protected]/tls/client.key
CORE_PEER_TLS_ROOTCERT_FILE: /var/hyperledger/cli/crypto/users/[email protected]/tls/ca.crt
2022-06-08 08:28:58.787 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2022-06-08 08:28:58.904 UTC [cli.common] readBlock -> INFO 002 Expect block, but got status: &{NOT_FOUND}
2022-06-08 08:28:58.922 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2022-06-08 08:28:59.124 UTC [cli.common] readBlock -> INFO 004 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2022-06-08 08:28:59.128 UTC [channelCmd] InitCmdFactory -> INFO 005 Endorser and orderer connections initialized
2022-06-08 08:28:59.331 UTC [cli.common] readBlock -> INFO 006 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2022-06-08 08:28:59.336 UTC [channelCmd] InitCmdFactory -> INFO 007 Endorser and orderer connections initialized
2022-06-08 08:28:59.538 UTC [cli.common] readBlock -> INFO 008 Expect block, but got status: &{SERVICE_UNAVAILABLE}
2022-06-08 08:28:59.546 UTC [channelCmd] InitCmdFactory -> INFO 009 Endorser and orderer connections initialized
2022-06-08 08:28:59.747 UTC [cli.common] readBlock -> INFO 00a Expect block, but got status: &{SERVICE_UNAVAILABLE}
2022-06-08 08:28:59.752 UTC [channelCmd] InitCmdFactory -> INFO 00b Endorser and orderer connections initialized
2022-06-08 08:28:59.958 UTC [cli.common] readBlock -> INFO 00c Expect block, but got status: &{SERVICE_UNAVAILABLE}
2022-06-08 08:28:59.966 UTC [channelCmd] InitCmdFactory -> INFO 00d Endorser and orderer connections initialized
2022-06-08 08:29:00.171 UTC [cli.common] readBlock -> INFO 00e Received block: 0
Error: error getting endorser client for channel: endorser client failed to connect to peer0.org1.example.com:7041: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 172.18.0.13:7041: connect: connection refused"
and I try to google hwo to fix this problem for several days,but failed. this is may fablo config.json{
"$schema": "https://github.com/softwaremill/fablo/releases/download/1.0.2/schema.json",
"global": {
"fabricVersion": "2.2.0",
"tls": true,
"tools": {
"explorer": true
}
},
"orgs": [
{
"organization": {
"name": "Orderer",
"domain": "orderer.example.com"
},
"orderers": [
{
"groupName": "group1",
"type": "raft",
"instances": 2
}
]
},
{
"organization": {
"name": "Org1",
"domain": "org1.example.com"
},
"peer": {
"instances": 1,
"db": "CouchDb"
}

},
{
  "organization": {
    "name": "Org2",
    "domain": "org2.example.com"
  },
  "peer": {
    "instances": 1,
    "db": "CouchDb"
  }
},
{
  "organization": {
    "name": "Org3",
    "domain": "org3.example.com"
  },
  "peer": {
    "instances": 1,
    "db": "CouchDb"
  }
}

],
"channels": [

{
  "name": "my-channel3",
  "orgs": [
    {
      "name": "Org1",
      "peers": [
        "peer0"
      ]
    },
    {
      "name": "Org2",
      "peers": [
        "peer0"
      ]
    },
    {
      "name": "Org3",
      "peers": [
        "peer0"
      ]
    }
  ]
}

],
"chaincodes": [

]
}
`
Can anyone help me find out why?Thanks a lot

@dcultra
Copy link
Author

dcultra commented Jul 4, 2022

I think i find the cause of this problem.That's probably because the couchdb container start so slow that when creating a channel it is not actually ready for response. I add sleep 30 in the every add channel function and i can build a fabric network successfully now.
but i find another problem when i invoke a chaincode.If i put state or store something in world state db,the commond line prints success status 200,but when i query the record i put it shows nothing.if i calls peer chaincode list,it also shows nothing,even i am sure i deploy the cantract with fablo
fablo is a nice tool for fabric users ,thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants