Can I run a Hyperledger Fabric network without orderer org?

152 Views Asked by At

I want to create a fabric network who contains three org: org1, org2, org3. And each org includes two type service: peer1 as peer service, orderer1 as orderer service. This network can succeed start but at last get the error is SERVICE_UNAVAILABLE -- no Raft leader when I run peer lifecycle chaincode approveformyorg.

That's the result I run docker ps:

(base) root@DebianA:4_RunOrdererByOneself# docker ps
CONTAINER ID   IMAGE                            COMMAND                  CREATED          STATUS          PORTS                                                                              NAMES
78e9762b582e   hyperledger/fabric-peer:2.4      "peer node start"        20 minutes ago   Up 20 minutes   0.0.0.0:7351->7051/tcp                                                             peer1.org2.example.com
654e7de323c1   hyperledger/fabric-peer:2.4      "peer node start"        20 minutes ago   Up 20 minutes   0.0.0.0:7251->7051/tcp                                                             peer1.org1.example.com
b346a70526d9   hyperledger/fabric-orderer:2.4   "orderer"                20 minutes ago   Up 20 minutes   7050/tcp, 0.0.0.0:8351->7777/tcp, 0.0.0.0:8352->8888/tcp, 0.0.0.0:8353->9999/tcp   orderer1.org2.example.com
d57671f584d1   hyperledger/fabric-orderer:2.4   "orderer"                20 minutes ago   Up 20 minutes   7050/tcp, 0.0.0.0:8451->7777/tcp, 0.0.0.0:8452->8888/tcp, 0.0.0.0:8453->9999/tcp   orderer1.org3.example.com
f27266d89025   hyperledger/fabric-orderer:2.4   "orderer"                20 minutes ago   Up 20 minutes   7050/tcp, 0.0.0.0:8251->7777/tcp, 0.0.0.0:8252->8888/tcp, 0.0.0.0:8253->9999/tcp   orderer1.org1.example.com
48f34cc9b287   hyperledger/fabric-peer:2.4      "peer node start"        20 minutes ago   Up 20 minutes   0.0.0.0:7451->7051/tcp                                                             peer1.org3.example.com
bc032c62b0f7   hyperledger/fabric-ca:1.5        "sh -c 'fabric-ca-se…"   20 minutes ago   Up 20 minutes   7054/tcp, 0.0.0.0:7250->7050/tcp                                                   org1.example.com
f961cbc8dcdb   hyperledger/fabric-ca:1.5        "sh -c 'fabric-ca-se…"   20 minutes ago   Up 20 minutes   7054/tcp, 0.0.0.0:7450->7050/tcp                                                   org3.example.com
ee4971b64ca8   hyperledger/fabric-ca:1.5        "sh -c 'fabric-ca-se…"   20 minutes ago   Up 20 minutes   0.0.0.0:7050->7050/tcp, 7054/tcp                                                   tls.example.com
f8497e2c29d5   hyperledger/fabric-ca:1.5        "sh -c 'fabric-ca-se…"   20 minutes ago   Up 20 minutes   7054/tcp, 0.0.0.0:7350->7050/tcp                                                   org2.example.com
                                                org2.example.com

That's the error when I run peer lifecycle chaincode approveformyorg:

(base) root@DebianA:4_RunOrdererByOneself# source envpeer1org1
init terminal org1
(base) root@DebianA:4_RunOrdererByOneself# peer lifecycle chaincode approveformyorg -o orderer1.org1.example.com:8251 --tls --cafile $ORDERER_CA  --channelID testchannel --name basic --version 1.0 --sequence 1 --waitForEvent --init-required --package-id $CHAINCODE_ID
Error: failed to send transaction: got unexpected status: SERVICE_UNAVAILABLE -- no Raft leader

That's the result log of orderer1.org2.example.com: this is log

That's the result when i run docker exec -it orderer1.org1.example.com ping orderer1.org2.example.com:

(base) root@DebianA:FabricLearn# docker exec -it orderer1.org1.example.com ping orderer1.org2.example.com
PING orderer1.org2.example.com (172.19.0.8): 56 data bytes
64 bytes from 172.19.0.8: seq=0 ttl=64 time=0.472 ms
64 bytes from 172.19.0.8: seq=1 ttl=64 time=0.080 ms
64 bytes from 172.19.0.8: seq=2 ttl=64 time=0.066 ms
64 bytes from 172.19.0.8: seq=3 ttl=64 time=0.068 ms
64 bytes from 172.19.0.8: seq=4 ttl=64 time=0.073 ms

Here are the yamls:

  1. compose/docker-base.yaml
  2. compose/docker-compose.yam
  3. config/configtx.yaml
1

There are 1 best solutions below

0
On

Check if channel has been joined from all three orderers.