bcgov / von-network

A portable development level Indy Node network.
Apache License 2.0
163 stars 189 forks source link

Network build generates genesis not usable on MacOS #196

Closed tdiesler closed 2 years ago

tdiesler commented 2 years ago

Currently, DOCKERHOST is obtained like this docker run --rm --net=host eclipse/che-ip which returns the internal docker host IP that isn't usable (anymore) for inter-container communication on MacOS

The Faber agent cannot connect to the VON Network

DOCKERHOST=host.docker.internal
DOCKER_ENV=-e LOG_LEVEL= -e RUNMODE=docker -e DOCKERHOST=host.docker.internal -e AGENT_PORT=8020 -e GENESIS_URL=https://gist.githubusercontent.com/tdiesler/e9db11b32857c1c966158e05d84cf4f3/raw/e89dbb3ca2d0e5c9312ea37224bfdb120cd22569/genesis.json -e TRACE_TARGET=log -e TRACE_TAG=acapy.events -e TRACE_ENABLED=
Starting [faber] agent with args [--port 8020]
Initializing demo agent faber with AIP 20 and credential type indy

#1 Provision an agent and wallet, get back configuration details
Started webhook listener on port: 8022
Faber      | Registering faber.agent ...
Faber      | nym_info: {'did': 'QP3eDjWFewJzqFeEAi6yEU', 'seed': 'd_000000000000000000000000137408', 'verkey': 'Dk6GqTWB5s9CAjF9o4YzG37AJNh6gmeVJqov8MVFec8X'}
Faber      | Registered DID: QP3eDjWFewJzqFeEAi6yEU
Created public DID
Faber      | ['/home/indy/.pyenv/versions/3.6.13/bin/python', '-m', 'aries_cloudagent', 'start', '--endpoint', 'http://host.docker.internal:8020', '--label', 'faber.agent', '--auto-ping-connection', '--auto-respond-messages', '--inbound-transport', 'http', '0.0.0.0', '8020', '--outbound-transport', 'http', '--admin', '0.0.0.0', '8021', '--admin-insecure-mode', '--wallet-type', 'indy', '--wallet-name', 'faber.agent137408', '--wallet-key', 'faber.agent137408', '--preserve-exchange-records', '--auto-provision', '--public-invites', '--emit-new-didcomm-prefix', '--genesis-transactions', '{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"192.168.65.3","client_port":9702,"node_ip":"192.168.65.3","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}\n{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"192.168.65.3","client_port":9704,"node_ip":"192.168.65.3","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}\n{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node3","blskey":"3WFpdbg7C5cnLYZwFZevJqhubkFALBfCBBok15GdrKMUhUjGsk3jV6QKj6MZgEubF7oqCafxNdkm7eswgA4sdKTRc82tLGzZBd6vNqU8dupzup6uYUf32KTHTPQbuUM8Yk4QFXjEf2Usu2TJcNkdgpyeUSX42u5LqdDDpNSWUK5deC5","blskey_pop":"QwDeb2CkNSx6r8QC8vGQK3GRv7Yndn84TGNijX8YXHPiagXajyfTjoR87rXUu4G4QLk2cF8NNyqWiYMus1623dELWwx57rLCFqGh7N4ZRbGDRP4fnVcaKg1BcUxQ866Ven4gw8y4N56S5HzxXNBZtLYmhGHvDtk6PFkFwCvxYrNYjh","client_ip":"192.168.65.3","client_port":9706,"node_ip":"192.168.65.3","node_port":9705,"services":["VALIDATOR"]},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya"},"metadata":{"from":"4cU41vWW82ArfxJxHkzXPG"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4"},"ver":"1"}\n{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node4","blskey":"2zN3bHM1m4rLz54MJHYSwvqzPchYp8jkHswveCLAEJVcX6Mm1wHQD1SkPYMzUDTZvWvhuE6VNAkK3KxVeEmsanSmvjVkReDeBEMxeDaayjcZjFGPydyey1qxBHmTvAnBKoPydvuTAqx5f7YNNRAdeLmUi99gERUU7TD8KfAa6MpQ9bw","blskey_pop":"RPLagxaR5xdimFzwmzYnz4ZhWtYQEj8iR5ZU53T2gitPCyCHQneUn2Huc4oeLd2B2HzkGnjAff4hWTJT6C7qHYB1Mv2wU5iHHGFWkhnTX9WsEAbunJCV2qcaXScKj4tTfvdDKfLiVuU2av6hbsMztirRze7LvYBkRHV3tGwyCptsrP","client_ip":"192.168.65.3","client_port":9708,"node_ip":"192.168.65.3","node_port":9707,"services":["VALIDATOR"]},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA"},"metadata":{"from":"TWwCRQRZ2ZHMJFn9TzLp7W"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008"},"ver":"1"}\n', '--seed', 'd_000000000000000000000000137408', '--webhook-url', 'http://host.docker.internal:8022/webhooks', '--monitor-revocation-notification', '--trace-target', 'log', '--trace-tag', 'acapy.events', '--trace-label', 'faber.agent.trace', '--auto-accept-invites', '--auto-accept-requests', '--auto-store-credential']
Shutting down agent ...
Faber      | 
Faber      | Shutting down
Faber      | 2022-03-18 09:54:01,144 aries_cloudagent.commands.start ERROR Exception during startup:
Faber      | Traceback (most recent call last):
Faber      |   File "/home/indy/aries_cloudagent/commands/start.py", line 72, in init
Faber      |     await startup
Faber      |   File "/home/indy/aries_cloudagent/commands/start.py", line 28, in start_app
Faber      |     await conductor.setup()
Faber      |   File "/home/indy/aries_cloudagent/core/conductor.py", line 176, in setup
Faber      |     self.root_profile, self.setup_public_did and self.setup_public_did.did
Faber      |   File "/home/indy/aries_cloudagent/config/ledger.py", line 134, in ledger_config
Faber      |     async with ledger:
Faber      |   File "/home/indy/aries_cloudagent/ledger/indy.py", line 277, in __aenter__
Faber      |     await self.pool.context_open()
Faber      |   File "/home/indy/aries_cloudagent/ledger/indy.py", line 210, in context_open
Faber      |     await self.open()
Faber      |   File "/home/indy/aries_cloudagent/ledger/indy.py", line 175, in open
Faber      |     self.handle = await indy.pool.open_pool_ledger(self.name, pool_config)
Faber      |   File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/indy/pool.py", line 88, in open_pool_ledger
Faber      |     open_pool_ledger.cb)
Faber      | concurrent.futures._base.CancelledError
Faber      | 2022-03-18 09:54:01,145 asyncio ERROR Task exception was never retrieved
Faber      | future: <Task finished coro=<run_loop.<locals>.done() done, defined at /home/indy/aries_cloudagent/commands/start.py:77> exception=RuntimeError('cannot reuse already awaited coroutine',)>
Faber      | RuntimeError: cannot reuse already awaited coroutine
Faber      | Exited with return code 0
tdiesler commented 2 years ago

I may have a PR for this ...

tdiesler commented 2 years ago

Out of date. I accidentally used branch 'master' instead of 'main' Perhaps that ought to be removed

WadeBarnes commented 2 years ago

I've deleted the master branch.