openwallet-foundation / acapy

ACA-Py is a foundation for building decentralized identity applications and services running in non-mobile environments.
https://aca-py.org
Apache License 2.0
421 stars 516 forks source link

aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; #1781

Closed grajnikanth closed 2 years ago

grajnikanth commented 2 years ago

Hi I am running two Aries agents using docker. I am working on the Bedrock network established by the bedrock consortium. I trying to establish a connection between these two agents. I am getting the error in the subject when I try to get the connection_id from the event output on the terminal. My agents are being started using the following two commands

sudo PORTS="8030:8030 8031:8031" scripts/run_docker start -l test.agent --inbound-transport http 0.0.0.0 8030 --outbound-transport http --endpoint http://0.0.0.0:8030 --wallet-type indy --wallet-name test_wallet --wallet-key test_wallet123 --ledger-pool-name bbutestnet --genesis-url https://raw.githubusercontent.com/fwbehemoth/behemoth-lair/main/pool_transactions_genesis --admin 0.0.0.0 8031 --admin-insecure-mode --auto-provision --auto-accept-invites --auto-accept-requests --auto-ping-connection --auto-respond-credential-proposal --auto-respond-credential-offer --auto-respond-credential-request --auto-store-credential

and

sudo PORTS="8020:8020 8021:8021" scripts/run_docker start -l udacity.agent --inbound-transport http 0.0.0.0 8020 --outbound-transport http --endpoint http://0.0.0.0:8020 --wallet-type indy --wallet-name test_wallet1 --wallet-key test_wallet1 --ledger-pool-name bbutestnet --genesis-url https://raw.githubusercontent.com/fwbehemoth/behemoth-lair/main/pool_transactions_genesis --admin 0.0.0.0 8021 --admin-insecure-mode --auto-provision --auto-accept-invites --auto-accept-requests --auto-ping-connection --auto-respond-credential-proposal --auto-respond-credential-offer --auto-respond-credential-request --auto-store-credential

I am able to open the swagger-ui at localhost:8021 and localhost:8031. I created a connection invitation from "udacity.agent" and then received it on "test.agent". But when I run the "POST connections/{conn_id}/accept-invitation on the test.agent swagger UI, I get the following error on my "test.agent" terminal:

2022-05-23 22:16:08,551 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9ef3b48>); Re-queue failed message ... 2022-05-23 22:16:18,560 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9ef51c8>); Re-queue failed message ... 2022-05-23 22:16:28,569 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9ef59c8>); Re-queue failed message ... 2022-05-23 22:16:38,582 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9ef8388>); Re-queue failed message ... 2022-05-23 22:16:41,252 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9ef51c8>); Re-queue failed message ... 2022-05-23 22:16:48,596 aries_cloudagent.transport.outbound.manager ERROR >>> Outbound message failed to deliver, NOT Re-queued. Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 798, in create_connection raise exceptions[0] File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 785, in create_connection yield from self.sock_connect(sock, address) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 327, in iter yield self # This tells Task to wait for completion. File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.result() File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 243, in result raise self._exception File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 469, in _sock_connect_cb raise OSError(err, 'Connect call failed %s' % (address,)) ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8020)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 182, in _step result = coro.throw(exc) File "/home/indy/aries_cloudagent/transport/outbound/http.py", line 82, in handle_message endpoint, data=payload, headers=headers File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 1138, in aenter self._resp = await self._coro File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 536, in _request req, traces=traces, timeout=real_timeout File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 907, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection raise last_exc File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1187, in _create_direct_connection client_error=client_error, File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8020 ssl:default [Connect call failed ('0.0.0.0', 8020)] 2022-05-23 22:16:48,645 aries_cloudagent.transport.outbound.manager ERROR Outbound message could not be delivered to http://0.0.0.0:8020 Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 798, in create_connection raise exceptions[0] File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 785, in create_connection yield from self.sock_connect(sock, address) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 327, in iter yield self # This tells Task to wait for completion. File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.result() File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 243, in result raise self._exception File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 469, in _sock_connect_cb raise OSError(err, 'Connect call failed %s' % (address,)) ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8020)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 182, in _step result = coro.throw(exc) File "/home/indy/aries_cloudagent/transport/outbound/http.py", line 82, in handle_message endpoint, data=payload, headers=headers File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 1138, in aenter self._resp = await self._coro File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 536, in _request req, traces=traces, timeout=real_timeout File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 907, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection raise last_exc File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1187, in _create_direct_connection client_error=client_error, File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8020 ssl:default [Connect call failed ('0.0.0.0', 8020)] 2022-05-23 22:16:51,262 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9ea0a88>); Re-queue failed message ... 2022-05-23 22:17:01,266 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9eaa0c8>); Re-queue failed message ... 2022-05-23 22:17:11,276 aries_cloudagent.transport.outbound.manager ERROR >>> Error when posting to: http://0.0.0.0:8020; Error: (<class 'aiohttp.client_exceptions.ClientConnectorError'>, ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8020, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8020)")), <traceback object at 0x7fc9c9eaa748>); Re-queue failed message ... 2022-05-23 22:17:21,294 aries_cloudagent.transport.outbound.manager ERROR >>> Outbound message failed to deliver, NOT Re-queued. Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 798, in create_connection raise exceptions[0] File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 785, in create_connection yield from self.sock_connect(sock, address) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 327, in iter yield self # This tells Task to wait for completion. File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.result() File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 243, in result raise self._exception File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 469, in _sock_connect_cb raise OSError(err, 'Connect call failed %s' % (address,)) ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8020)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 182, in _step result = coro.throw(exc) File "/home/indy/aries_cloudagent/transport/outbound/http.py", line 82, in handle_message endpoint, data=payload, headers=headers File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 1138, in aenter self._resp = await self._coro File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 536, in _request req, traces=traces, timeout=real_timeout File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 907, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection raise last_exc File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1187, in _create_direct_connection client_error=client_error, File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8020 ssl:default [Connect call failed ('0.0.0.0', 8020)] 2022-05-23 22:17:21,294 aries_cloudagent.transport.outbound.manager ERROR Outbound message could not be delivered to http://0.0.0.0:8020 Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 798, in create_connection raise exceptions[0] File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/base_events.py", line 785, in create_connection yield from self.sock_connect(sock, address) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 327, in iter yield self # This tells Task to wait for completion. File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.result() File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/futures.py", line 243, in result raise self._exception File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/selector_events.py", line 469, in _sock_connect_cb raise OSError(err, 'Connect call failed %s' % (address,)) ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8020)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 182, in _step result = coro.throw(exc) File "/home/indy/aries_cloudagent/transport/outbound/http.py", line 82, in handle_message endpoint, data=payload, headers=headers File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 1138, in aenter self._resp = await self._coro File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/client.py", line 536, in _request req, traces=traces, timeout=real_timeout File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 542, in connect proto = await self._create_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 907, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection raise last_exc File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 1187, in _create_direct_connection client_error=client_error, File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8020 ssl:default [Connect call failed ('0.0.0.0', 8020)]

Any help on this is much appreciated.

ianco commented 2 years ago

Your endpoints are incorrect - --endpoint http://0.0.0.0:8030

The IP (or host name) in this endpoint needs to be something accessible from the other agent(s), since you are running the agents in docker containers you need to use the internal docker IP, or (one some machines) host.docker.internal

Also since you have all the auto flags set, you don't need to manually accept the invite, it will happen automatically

grajnikanth commented 2 years ago

I changed the --endpoint "http://host.docker.internal:8020" and --endpoint "http://host.docker.internal:8030" for the two agents respectively. Now I am getting the following error on the udacity.agent

image

Can you review and let me know how I can fix this issue?

ianco commented 2 years ago

Do you still have the --auto flags in your aca-py startup? If so then your agents will automatically respond to invitations and connection requests and you will get errors when you try to call the endpoints

You can check the connections with the GET /connections endpoint to check the connection status. In the above error, it is looking for a connection with state invitation but if you have the --auto flags enabled it will likely be in state active or connected

grajnikanth commented 2 years ago

I removed all the --auto flags, here are the latest commands I used: sudo PORTS="8020:8020 8021:8021" scripts/run_docker start -l udacity.agent --inbound-transport http 0.0.0.0 8020 --outbound-transport http --endpoint "http://host.docker.internal:8020" --wallet-type indy --wallet-name "test_wallet1" --wallet-key "test_wallet1" --ledger-pool-name bbutestnet --genesis-url https://raw.githubusercontent.com/fwbehemoth/behemoth-lair/main/pool_transactions_genesis --admin 0.0.0.0 8021 --admin-insecure-mode --auto-provision --auto-ping-connection

and sudo PORTS="8030:8030 8031:8031" scripts/run_docker start -l test.agent --inbound-transport http 0.0.0.0 8030 --outbound-transport http --endpoint "http://host.docker.internal:8030" --wallet-type indy --wallet-name "test_wallet" --wallet-key "test_wallet123" --ledger-pool-name bbutestnet --genesis-url https://raw.githubusercontent.com/fwbehemoth/behemoth-lair/main/pool_transactions_genesis --admin 0.0.0.0 8031 --admin-insecure-mode --auto-provision --auto-ping-connection

Next, I created an invitation on the udacity.agent as shown below image

I received this on test.agent using the "invitation" object from above on the test.agent "post - connections/receive-invitation". The response for this as shown below

image

Then, I accepted this invitation using the "post connections/{conn_id}/accept-invitation on test.agent. I get the below response for this. The connection_id = 4720aa24-abb5-464e-924b-bb2dcb692eb0:

image

After the above step, I was hoping to see an event on the udacity.agent terminal with a new connection_id. But nothing shows up on this terminal as shown below. I was hoping to use a connection_id from the terminal to accept the invitation on udacity.agent swagger.

image

I am stuck at this step. How do I make the udacity.agent now accept the invitation from test.agent?

On the udacity.agent under the "Get Connections", I only see the original invitation sent to test.agent as shown below.

image

Please review and let me know what am I missing here?

ianco commented 2 years ago

Are you running on Linux? You may need to use something other than host.docker.internal

See: https://stackoverflow.com/questions/48546124/what-is-linux-equivalent-of-host-docker-internal

Otherwise can you post the log from the test.agent window?

grajnikanth commented 2 years ago

I am using WSL 2 to use ubuntu on my windows machine. I have docker desktop installed. My ubuntu version is 20.04.2 LTS. I will read the link you sent and see if I need to change host.docker.internal to something else.

In the mean time here is the image of the test.agent terminal. Nothing gets logged on this terminal so far.

image

grajnikanth commented 2 years ago

Also what parameter should I use with my command to show "events" on my agent terminals? In the Hyperledger Aries open API lab with the demo "faber" and "alice", the --events flag was used. But that does not appear to be a parameter with aca-py.

ianco commented 2 years ago

if you run aca-py directly it doesn't support the same params as the alice/faber demo

You can get more log info using the --log-level info parameter (or --log-level debug)

grajnikanth commented 2 years ago

I used the docker IP of 172.17.0.1 instead of host.docker.internal. I also used the --log-level info parameter with both the agents. At the last step when I accept the invitation on test.agent, I get the warning shown below on the udacity.agent. It says "No correspoding DID found.....". Is the problem with the DID of the test.agent?

image

ianco commented 2 years ago

That just means the connection is using private DIDs (I think), which is the default. Not sure why those messages are tagged as warnings

grajnikanth commented 2 years ago

@ianco, I finally figured out how to send messages across various agents. I am running Docker Desktop on windows with WSL 2 and Ubuntu. The following three endpoints are ok to use in my case for the --endpoint parameter http://host.docker.internal OR IP address of my ubuntu terminal obtained by running command - hostname -I OR IP address of my Docker Desktop, found it in the docker settings.

The command I ended up using was sudo PORTS="8040:8040 8041:8041" scripts/run_docker start -l test2.agent --inbound-transport http 0.0.0.0 8040 --outbound-transport http --endpoint "http://host.docker.internal:8040" --wallet-type indy --wallet-name "test_wallet2" --wallet-key "test_wallet2" --ledger-pool-name bbutestnet --genesis-url https://raw.githubusercontent.com/fwbehemoth/behemoth-lair/main/pool_transactions_genesis --admin 0.0.0.0 8041 --admin-insecure-mode --auto-provision --auto-ping-connection --log-level info

The main error I was making before was that once an agent creates a new connection, and the invitation is received and accepted by another agent. The original agent can complete this connection by using the "POST /connections/{conn_id}/accept-request" instead of using the "POST /connections/{conn_id}/accept-invitation". I was using the /accept-invitation endpoint before and that was the issue.

Also the parameter --log-level info has to be used in the command to see the messages being sent by other agents at the terminal.

ianco commented 2 years ago

@grajnikanth good news thanks for the update!

feknall commented 2 years ago

In case someone has this problem with docker in Linux, instead of using --endpoint "http://host.docker.internal:8040", try:

--endpoint "http://172.17.0.1:8040"

This is the default gateway if your container uses a bridge network. At least it solved my problem.