Open kkkkkkkkkkkkkkkk123 opened 3 years ago
I solved the first problem by editing the hosts file in docker, but now I have the second error:
Traceback (most recent call last):
File "./generic_client.py", line 392, in <module>
Main()
File "./generic_client.py", line 285, in Main
worker_id
File "/project/avalon/examples/apps/generic_client/proxy_model_generic_client.py", line 61, in get_worker_details
worker_id
TypeError: 'NoneType' object is not iterable
The function is:
status, _, _, _, details = self._worker_instance.worker_retrieve(
worker_id
)
I think the error may be caused by returning None to multi parameters, but i don't know how to solved this error. Could anyone please tell me where is the 'avalon_sdk.connector.blockchains.fabric.fabric_worker_registry' in docker? Because I can't find it in sys.path. Please help!
I followed Testing Hyperledger Avalon Proxy Model with Hyperledger Fabric and tried to run Fabric with Hyperledger Avalon on a single machine .But i got the following error when running step 6 './generic_client.py -b fabric --workload_id "echo-result" --in_data "Hello" -o --worker_id "singleton-worker-1"'
The log:
root@db8865a0a007:/project/avalon/examples/apps/generic_client# ./generic_client.py -o -b fabric --workload_id "echo-result" --in_data "Hello" --worker_id "singleton-worker-1" 2021-02-23 09:26:14,036 - INFO - Hyperledger Avalon Generic client 2021-02-23 09:26:14,036 - INFO - INITIALIZING network_config Init client with profile=/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json 2021-02-23 09:26:14,036 - DEBUG - Init client with profile=/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json create org with name=example.com 2021-02-23 09:26:14,036 - DEBUG - create org with name=example.com create org with name=org0.example.com 2021-02-23 09:26:14,056 - DEBUG - create org with name=org0.example.com create org with name=org1.example.com 2021-02-23 09:26:14,057 - DEBUG - create org with name=org1.example.com create ca with name=ca1.org0.example.com 2021-02-23 09:26:14,058 - DEBUG - create ca with name=ca1.org0.example.com create ca with name=ca1.org1.example.com 2021-02-23 09:26:14,058 - DEBUG - create ca with name=ca1.org1.example.com Import orderers = dict_keys(['orderer1.example.com', 'orderer2.example.com', 'orderer3.example.com']) 2021-02-23 09:26:14,058 - DEBUG - 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']) 2021-02-23 09:26:14,059 - DEBUG - 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 2021-02-23 09:26:14,060 - DEBUG - New channel with name = mychannel 2021-02-23 09:26:14,060 - INFO - DISCOVERY: adding channel peers query 2021-02-23 09:26:14,060 - INFO - DISCOVERY: adding config query Traceback (most recent call last): File "./generic_client.py", line 390, in
Main()
File "./generic_client.py", line 264, in Main
parser.get_blockchain_type())
File "/project/avalon/examples/apps/generic_client/proxy_model_generic_client.py", line 46, in init
self._worker_instance = FabricWorkerRegistryImpl(self._config)
File "/usr/local/lib/python3.6/dist-packages/avalon_sdk/connector/blockchains/fabric/fabric_worker_registry.py", line 52, in init
self.__fabric_wrapper = FabricWrapper(config)
File "/usr/local/lib/python3.6/dist-packages/avalon_sdk/connector/blockchains/fabric/fabric_wrapper.py", line 73, in init
self.peername, 'Admin')
File "/usr/local/lib/python3.6/dist-packages/avalon_sdk/connector/blockchains/fabric/tx_committer.py", line 40, in init
org_name, peer_name, user_name)
File "/usr/local/lib/python3.6/dist-packages/avalon_sdk/connector/blockchains/fabric/base.py", line 75, in init
self._user, peer, self._channel_name))
File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/dist-packages/hfc/fabric/client.py", line 169, in init_with_discovery
local=False)
File "/usr/local/lib/python3.6/dist-packages/aiogrpc/channel.py", line 40, in call__
return await fut
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "DNS resolution failed for service: peer1.org0.example.com:7051"
debug_error_string = "{"created":"@1614072374.402017053","description":"Resolver transient failure","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":2141,"referenced_errors":[{"created":"@1614072374.402016237","description":"DNS resolution failed for service: peer1.org0.example.com:7051","file":"src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc","file_line":371,"grpc_status":14,"referenced_errors":[{"created":"@1614072374.402000297","description":"C-ares status is not ARES_SUCCESS qtype=A name=peer1.org0.example.com is_balancer=0: Domain name not found","file":"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc","file_line":728}]}]}"
I tired to change '-b fabric' into ' --uri "http://avalon-listener:1947"', it runs well, so i think i have installed it well. But i dont know why it shows the error ?