Action Server is working fine when I am running Rasa locally. But when I tried to docker, it is giving me the following error. I followed #Dockerizing my rasa chatbot application that has botfront post completely. But I am still getting the error. @nik202 please help.
2022-04-20 06:06:12,030 [ERROR] Failed to run custom action 'action_about feature'. Couldn't connect to the server at 'http://action_server:5055/webhook'. Is the server running? Error: Cannot connect to host action_server:5055 ssl:default [Temporary failure in name resolution]
2022-04-20 06:06:12,031 [ERROR] Encountered an exception while running action 'action_about feature'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
File "/opt/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 865, in _resolve_host
addrs = await self._resolver.resolve(host, port, family=self._family)
File "/opt/venv/lib/python3.8/site-packages/aiohttp/resolver.py", line 31, in resolve
infos = await self._loop.getaddrinfo(
File "uvloop/loop.pyx", line 1469, in getaddrinfo
socket.gaierror: [Errno -3] Temporary failure in name resolution
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 722, in run
response = await self.action_endpoint.request(
File "/opt/venv/lib/python3.8/site-packages/rasa/utils/endpoints.py", line 164, in request
async with session.request(
File "/opt/venv/lib/python3.8/site-packages/aiohttp/client.py", line 1117, in __aenter__
self._resp = await self._coro
File "/opt/venv/lib/python3.8/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/opt/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/opt/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/opt/venv/lib/python3.8/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host action_server:5055 ssl:default [Temporary failure in name resolution]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 868, in _run_action
events = await action.run(
File "/opt/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 754, in run
raise RasaException("Failed to execute custom action.")
rasa.shared.exceptions.RasaException: Failed to execute custom action.
Before this message I also got one more error related to socket io connection.
2022-04-20 06:05:52,725 [ERROR] Exception occurred while handling uri: 'ws://localhost:5005/socket.io/?EIO=4&transport=websocket&sid=3g2wl1PXNTCDey57AAAA'
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/sanic/server/protocols/websocket_protocol.py", line 119, in websocket_handshake
subprotocols = list(subprotocols)
File "/usr/lib/python3.8/typing.py", line 261, in inner
return func(*args, **kwds)
File "/usr/lib/python3.8/typing.py", line 685, in __getitem__
params = tuple(_type_check(p, msg) for p in params)
File "/usr/lib/python3.8/typing.py", line 685, in <genexpr>
params = tuple(_type_check(p, msg) for p in params)
File "/usr/lib/python3.8/typing.py", line 149, in _type_check
raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Parameters to generic types must be types. Got 0.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "handle_request", line 83, in handle_request
class Sanic(BaseSanic, metaclass=TouchUpMeta):
File "/opt/venv/lib/python3.8/site-packages/engineio/asyncio_server.py", line 271, in handle_request
packets = await socket.handle_get_request(environ)
File "/opt/venv/lib/python3.8/site-packages/engineio/asyncio_socket.py", line 89, in handle_get_request
return await getattr(self, '_upgrade_' + transport)(environ)
File "/opt/venv/lib/python3.8/site-packages/engineio/asyncio_socket.py", line 142, in _upgrade_websocket
return await ws(environ)
File "/opt/venv/lib/python3.8/site-packages/engineio/async_drivers/sanic.py", line 122, in __call__
self._sock = await protocol.websocket_handshake(request)
File "/opt/venv/lib/python3.8/site-packages/sanic/server/protocols/websocket_protocol.py", line 132, in websocket_handshake
raise ServerError(msg, status_code=500)
sanic.exceptions.ServerError: Failed to open a WebSocket connection.
See server log for more information.