Avalon with fabric can't get work order result: [INFO __main__] Work order result None
justalittlenoob opened this issue · 1 comments
Avalon: master branch
fabric: 1.4.4
When i deploy Avalon and Fabric on the same machine, it works well.
But when i deploy Avalon on machine A, Fabric on machine B, there will has the following issue.
Any advice would be appreciated.
-
start Fabric on machine B.
cd $TCF_HOME
/scripts/start_fabric.sh -u
-
copy
mywork
from B to A. -
start Avalon on machin A.
docker-compose -f docker-compose.yaml -f docker-compose-sgx.yaml -f docker-compose-fabric.yaml up --build
-
run generic client inside avalon shell container on A
docker exec -it avalon-shell bash
cd examples/apps/generic_client/
./fabric_generic_client.py -b fabric --workload_id "echo-result" --in_data "zHello" -o
[19:31:44 INFO avalon_sdk.connector.blockchains.fabric.tx_committer] Tx response: [status: SUCCESS]
[19:31:44 INFO root] Response of chain code workOrderSubmit call: [status: SUCCESS]
[19:31:44 INFO main] Work order submit response : ContractResponse.SUCCESS
Init client with profile=/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json
[19:31:54 DEBUG hfc.fabric.client] Init client with profile=/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json
create org with name=example.com
[19:31:54 DEBUG hfc.fabric.client] create org with name=example.com
create org with name=org0.example.com
[19:31:55 DEBUG hfc.fabric.client] create org with name=org0.example.com
create org with name=org1.example.com
[19:31:55 DEBUG hfc.fabric.client] create org with name=org1.example.com
create ca with name=ca1.org0.example.com
[19:31:55 DEBUG hfc.fabric.client] create ca with name=ca1.org0.example.com
create ca with name=ca1.org1.example.com
[19:31:55 DEBUG hfc.fabric.client] create ca with name=ca1.org1.example.com
Import orderers = dict_keys(['orderer1.example.com', 'orderer2.example.com', 'orderer3.example.com'])
[19:31:55 DEBUG hfc.fabric.client] Import orderers = dict_keys(['orderer1.example.com', 'orderer2.example.com', 'orderer3.example.com'])
Import peers = dict_keys(['peer1.org0.example.com', 'peer2.org0.example.com', 'peer1.org1.example.com', 'peer2.org1.example.com'])
[19:31:55 DEBUG hfc.fabric.client] Import peers = dict_keys(['peer1.org0.example.com', 'peer2.org0.example.com', 'peer1.org1.example.com', 'peer2.org1.example.com'])
New channel with name = mychannel
[19:31:55 DEBUG hfc.fabric.client] New channel with name = mychannel
[19:31:55 INFO hfc.fabric.channel.channel] DISCOVERY: adding channel peers query
[19:31:55 INFO hfc.fabric.channel.channel] DISCOVERY: adding config query
create org with name=org0examplecom
[19:31:55 DEBUG hfc.fabric.client] create org with name=org0examplecom
create org with name=examplecom
[19:31:55 DEBUG hfc.fabric.client] create org with name=examplecom
create org with name=org1examplecom
[19:31:55 DEBUG hfc.fabric.client] create org with name=org1examplecom
Import orderers = dict_keys(['examplecom'])
[19:31:55 DEBUG hfc.fabric.client] Import orderers = dict_keys(['examplecom'])
Import peers = ['172.16.113.194', '172.16.113.194', '172.16.113.194', '172.16.113.194']
[19:31:55 DEBUG hfc.fabric.client] Import peers = ['172.16.113.194', '172.16.113.194', '172.16.113.194', '172.16.113.194']
New channel with name = mychannel
[19:31:55 DEBUG hfc.fabric.client] New channel with name = mychannel
[19:31:55 INFO avalon_sdk.connector.blockchains.fabric.event_listener] Loaded block mark: 9
[19:31:55 INFO avalon_sdk.connector.blockchains.fabric.event_listener] Event handler registered!
[19:31:55 INFO hfc.fabric.channel.channel_eventhub.channel_eventhub] create peer delivery stream
[19:31:55 INFO avalon_sdk.connector.blockchains.fabric.event_listener] Saved blockmark: 9
[19:31:55 INFO main] Work order result None
[19:31:55 WARNING STDERR] Traceback (most recent call last):
[19:31:55 WARNING STDERR] File "./fabric_generic_client.py", line 624, in
[19:31:55 WARNING STDERR] Main()
[19:31:55 WARNING STDERR] File "./fabric_generic_client.py", line 587, in Main
[19:31:55 WARNING STDERR] if "result" in res:
[19:31:55 WARNING STDERR] TypeError
[19:31:55 WARNING STDERR] :
[19:31:55 WARNING STDERR] argument of type 'NoneType' is not iterable
@justalittlenoob i have raise the PR to update the documentation for setting avalon and fabric setup on different machines.