Closed wenjing closed 3 years ago
At this time, the vsw client code is CLI + agent, with no controller service, therefore no webhook for the agent to reach back to. This will cause problems. Once a CLI command completes and exits, the agent is in asynchronous execution, a user could start another CLI command that must not be allowed in that state. Without a controller and webhook, this state is not known. So for this purpose alone, to receive a status update from the agent, a controller is necessary. It could be a relatively simple one. I'll keep this issue open and file a new one for the lack of controller itself.
This should be #88 - I'll close this and keep #88.
Maybe related #86 . Running in ubuntu:bionic container on MacOS.
Although "vsw init -c" reports success and the state shown by "vsw list -c" is active, if I examine the aries log, it has errors reporting failure to connect to the webhook port 8022. This is not good even if we are not reporting errors to user. (If I try to continue with 'vsw init -cd', it will also report success but with the same errors in the log.)
(1) it should report to user. (2) below is the error log in aries-log.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)] Outbound message could not be delivered to http://127.0.0.1:8022/webhooks/topic/connections/ Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 936, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/lib/python3.6/asyncio/base_events.py", line 794, in create_connection raise exceptions[0] File "/usr/lib/python3.6/asyncio/base_events.py", line 781, in create_connection yield from self.sock_connect(sock, address) File "/usr/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/usr/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 ('127.0.0.1', 8022)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)] Outbound message could not be delivered to http://127.0.0.1:8022/webhooks/topic/connections/ Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 936, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/lib/python3.6/asyncio/base_events.py", line 794, in create_connection raise exceptions[0] File "/usr/lib/python3.6/asyncio/base_events.py", line 781, in create_connection yield from self.sock_connect(sock, address) File "/usr/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/usr/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 ('127.0.0.1', 8022)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)] Outbound message could not be delivered to http://127.0.0.1:8022/webhooks/topic/connections/ Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 936, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/lib/python3.6/asyncio/base_events.py", line 794, in create_connection raise exceptions[0] File "/usr/lib/python3.6/asyncio/base_events.py", line 781, in create_connection yield from self.sock_connect(sock, address) File "/usr/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/usr/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 ('127.0.0.1', 8022)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)]
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)] Outbound message could not be delivered to http://127.0.0.1:8022/webhooks/topic/connections/ Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 936, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/lib/python3.6/asyncio/base_events.py", line 794, in create_connection raise exceptions[0] File "/usr/lib/python3.6/asyncio/base_events.py", line 781, in create_connection yield from self.sock_connect(sock, address) File "/usr/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect return (yield from fut) File "/usr/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 ('127.0.0.1', 8022)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/aries_cloudagent_vsw/transport/outbound/http.py", line 67, in handle_message endpoint, data=payload, headers=headers File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1012, in aenter self._resp = await self._coro File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.6/dist-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 127.0.0.1:8022 ssl:default [Connect call failed ('127.0.0.1', 8022)] 127.0.0.1 [15/Apr/2021:17:09:19 +0000] "GET /credential-definitions/created HTTP/1.1" 200 190 "-" "python-requests/2.23.0"