Hi everyone, I am new to Rasa.
action server is running in docker container and I am getting error in mysql database connection from the action server. Mysql database is also running on the localhost.
below is the exact error
default
<class 'str'>
default
Exception occurred while handling uri: 'http://action-server:5055/webhook'
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 236, in _open_connection
self._cmysql.connect(**cnx_kwargs)
_mysql_connector.MySQLInterfaceError: Can't connect to MySQL server on '127.0.0.1:3306' (111)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/sanic/app.py", line 973, in handle_request
response = await response
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/endpoint.py", line 104, in webhook
result = await executor.run(action_call)
File "/opt/venv/lib/python3.8/site-packages/rasa_sdk/executor.py", line 398, in run
action(dispatcher, tracker, domain)
File "/app/actions/actions.py", line 66, in run
mydb= mysql.connector.connect(
File "/opt/venv/lib/python3.8/site-packages/mysql/connector/__init__.py", line 272, in connect
return CMySQLConnection(*args, **kwargs)
File "/opt/venv/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 85, in __init__
self.connect(**kwargs)
File "/opt/venv/lib/python3.8/site-packages/mysql/connector/abstracts.py", line 1014, in connect
self._open_connection()
File "/opt/venv/lib/python3.8/site-packages/mysql/connector/connection_cext.py", line 241, in _open_connection
raise errors.get_mysql_exception(msg=exc.msg, errno=exc.errno,
mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)