sicpa-dlab / acapy-resolver-universal

(Archived) ACA-Py Plugin for HTTP Universal Resolver bindings
3 stars 2 forks source link

Resolution fails due web-resolver #9

Closed Luis-GA closed 3 years ago

Luis-GA commented 3 years ago

Trying the config-file implementation with the resolution with the code of #8

It tries to resolve did with web did resolver.

for the following curl request: curl -X GET "http://localhost:3001/resolver/resolve/did%3Agithub%3Adbluhm" -H "accept: application/json" The Response is: `500 Internal Server Error

Server got itself in trouble`

The logs are the following:

resolver_1 | ================= resolver_1 | 2021-06-07 15:01:32,439 aries_cloudagent.core.dispatcher ERROR Handler error: resolve_did resolver_1 | Traceback (most recent call last): resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection resolver_1 | hosts = await asyncio.shield(host_resolved) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 865, in _resolve_host resolver_1 | addrs = await self._resolver.resolve(host, port, family=self._family) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/resolver.py", line 36, in resolve resolver_1 | flags=socket.AI_ADDRCONFIG, resolver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/concurrent/futures/thread.py", line 56, in run resolver_1 | result = self.fn(*self.args, self.kwargs) resolver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/socket.py", line 745, in getaddrinfo resolver_1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): resolver_1 | socket.gaierror: [Errno -2] Name or service not known resolver_1 | resolver_1 | The above exception was the direct cause of the following exception: resolver_1 | resolver_1 | Traceback (most recent call last): resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/routes.py", line 86, in resolve_did resolver_1 | context.profile, did resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/did_resolver.py", line 69, in resolve_with_metadata resolver_1 | resolver, doc = await self._resolve(profile, did) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/did_resolver.py", line 50, in _resolve resolver_1 | did, resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/base.py", line 151, in resolve resolver_1 | doc_dict = await self._resolve(profile, did) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/default/web.py", line 69, in _resolve resolver_1 | async with session.get(url) as response: resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/client.py", line 1117, in aenter resolver_1 | self._resp = await self._coro resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/client.py", line 521, in _request resolver_1 | req, traces=traces, timeout=real_timeout resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 535, in connect resolver_1 | proto = await self._create_connection(req, traces, timeout) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 892, in _create_connection resolver1 | , proto = await self._create_direct_connection(req, traces, timeout) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection resolver_1 | raise ClientConnectorError(req.connection_key, exc) from exc resolver_1 | aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host dbluhm:443 ssl:default [Name or service not known] resolver_1 | 2021-06-07 15:01:32,439 aries_cloudagent.admin.server ERROR Handler error with exception: Cannot connect to host dbluhm:443 ssl:default [Name or service not known] resolver_1 | Traceback (most recent call last): resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection resolver_1 | hosts = await asyncio.shield(host_resolved) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 865, in _resolve_host resolver_1 | addrs = await self._resolver.resolve(host, port, family=self._family) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/resolver.py", line 36, in resolve resolver_1 | flags=socket.AI_ADDRCONFIG, resolver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/concurrent/futures/thread.py", line 56, in run resolver_1 | result = self.fn(*self.args, *self.kwargs) resolver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/socket.py", line 745, in getaddrinfo resolver_1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): resolver_1 | socket.gaierror: [Errno -2] Name or service not known resolver_1 | resolver_1 | The above exception was the direct cause of the following exception: resolver_1 | resolver_1 | Traceback (most recent call last): resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 162, in ready_middleware resolver_1 | return await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 199, in debug_middleware resolver_1 | return await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware resolver_1 | return await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 366, in setup_context resolver_1 | return await task resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/routes.py", line 86, in resolve_did resolver_1 | context.profile, did resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/did_resolver.py", line 69, in resolve_with_metadata resolver_1 | resolver, doc = await self._resolve(profile, did) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/did_resolver.py", line 50, in _resolve resolver_1 | did, resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/base.py", line 151, in resolve resolver_1 | doc_dict = await self._resolve(profile, did) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/default/web.py", line 69, in _resolve resolver_1 | async with session.get(url) as response: resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/client.py", line 1117, in aenter resolver_1 | self._resp = await self._coro resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/client.py", line 521, in _request resolver_1 | req, traces=traces, timeout=real_timeout resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 535, in connect resolver_1 | proto = await self._create_connection(req, traces, timeout) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 892, in _create_connection resolver1 | , proto = await self._create_direct_connection(req, traces, timeout) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection resolver_1 | raise ClientConnectorError(req.connection_key, exc) from exc resolver_1 | aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host dbluhm:443 ssl:default [Name or service not known] resolver_1 | 2021-06-07 15:01:32,440 aiohttp.server ERROR Error handling request resolver_1 | Traceback (most recent call last): resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection resolver_1 | hosts = await asyncio.shield(host_resolved) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 865, in _resolve_host resolver_1 | addrs = await self._resolver.resolve(host, port, family=self._family) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/resolver.py", line 36, in resolve resolver_1 | flags=socket.AI_ADDRCONFIG, resolver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/concurrent/futures/thread.py", line 56, in run resolver_1 | result = self.fn(self.args, self.kwargs) resolver_1 | File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/socket.py", line 745, in getaddrinfo resolver_1 | for res in _socket.getaddrinfo(host, port, family, type, proto, flags): resolver_1 | socket.gaierror: [Errno -2] Name or service not known resolver_1 | resolver_1 | The above exception was the direct cause of the following exception: resolver_1 | resolver_1 | Traceback (most recent call last): resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resolver_1 | resp = await self._request_handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle resolver_1 | resp = await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 119, in impl resolver_1 | return await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 162, in ready_middleware resolver_1 | return await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 199, in debug_middleware resolver_1 | return await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware resolver_1 | return await handler(request) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 366, in setup_context resolver_1 | return await task resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/routes.py", line 86, in resolve_did resolver_1 | context.profile, did resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/did_resolver.py", line 69, in resolve_with_metadata resolver_1 | resolver, doc = await self._resolve(profile, did) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/did_resolver.py", line 50, in _resolve resolver_1 | did, resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/base.py", line 151, in resolve resolver_1 | doc_dict = await self._resolve(profile, did) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aries_cloudagent/resolver/default/web.py", line 69, in _resolve resolver_1 | async with session.get(url) as response: resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/client.py", line 1117, in aenter resolver_1 | self._resp = await self._coro resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/client.py", line 521, in _request resolver_1 | req, traces=traces, timeout=real_timeout resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 535, in connect resolver_1 | proto = await self._create_connection(req, traces, timeout) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 892, in _create_connection resolver1 | , proto = await self._create_direct_connection(req, traces, timeout) resolver_1 | File "/home/indy/.cache/pypoetry/virtualenvs/http-uniresolver-f-aLBW4O-py3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection resolver_1 | raise ClientConnectorError(req.connection_key, exc) from exc resolver_1 | aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host dbluhm:443 ssl:default [Name or service not known]

dbluhm commented 3 years ago

See https://github.com/hyperledger/aries-cloudagent-python/issues/1228

dbluhm commented 3 years ago

Should now be resolved