Table creation fail

Hi everyone, I am facing problem during connection of my rasa application with mysql db to store chat log. The problem is given below: ERROR rasa.core.tracker_store - Could not create tables: (pymysql.err.OperationalError) (2003, “Can’t connect to MySQL server on ‘10.210.0.166:3306’ ([Errno -2] Name or service not known)”) (Background on this error at: http://sqlalche.me/e/e3q8)

How to resolve it?

Hello - What is the command used by you to start rasa server? Also, please share the relevant ‘tracker_store’ portion of the endpoints.yml.

A endpoints.yml portation of ‘tracker_store’ is : tracker_store:

type: SQL

dialect: “mysql+pymysql” # the dialect used to interact with the db

url: “10.210.0.166:3306” # (optional) host of the sql db, e.g. “localhost”

db: “query_mobile” # path to your db

username: “admin” # username used for authentication

password: “admin” # password used for authentication

driver: my-driver

Command use to run the server is : rasa run -m models --endpoints endpoints.yml

Does your database give you any logs?

Hi,

I am getting this type of log:

2019-11-15 16:50:46 INFO root - Starting Rasa Core server on http://localhost:5555

2019-11-15 16:50:46 INFO root - Enabling coroutine debugging. Loop id 98252040.

2019-11-15 16:50:46 DEBUG rasa.model - Extracted model to ‘/tmp/tmp9tpmvdg9’.

2019-11-15 16:50:46 INFO rasa.nlu.components - Added ‘SpacyNLP’ to component cache. Key ‘SpacyNLP-en’.

2019-11-15 16:50:46 DEBUG rasa.nlu.featurizers.regex_featurizer - inside regex featurizer

2019-11-15 16:50:46 DEBUG rasa.core.tracker_store - Attempting to connect to database via “mysql+pymysql://mobile:***@[10.210.0.166:3306]/query_mobile”

2019-11-15 16:50:46 DEBUG rasa.core.tracker_store - successfully logged in to db

2019-11-15 16:50:46 ERROR rasa.core.tracker_store - Could not create tables: (pymysql.err.OperationalError) (2003, “Can’t connect to MySQL server on ‘10.210.0.166:3306’ ([Errno -2] Name or service not known)”) (Background on this error at: http://sqlalche.me/e/e3q8)

2019-11-15 16:50:46 DEBUG rasa.core.tracker_store - Connection to SQL database ‘query_mobile’ successful

2019-11-15 16:50:46 DEBUG rasa.model - Extracted model to ‘/tmp/tmp7sr45n5v’.

2019-11-15 16:50:46.994252: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

2019-11-15 16:50:47.024432: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2300170000 Hz

2019-11-15 16:50:47.027813: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x8041080 executing computations on platform Host. Devices:

2019-11-15 16:50:47.027853: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): ,

Mhm, this seems that something goes wrong while Rasa is trying to establish the connection. Can you try to 3306 separately:

...
url: “10.210.0.166"
port: 3306
...

Thanks a lot

:+1:

@Tobias_Wochinger Can we use parameter “Trusted_Connection: “yes”” in endpoints for MSSQL tracker store?

@poojadeshmukh

Rasa Open Source would ignore it. You could pass the entire url for the url field though if you want to bypass Rasa Open Source building the URL itself.

Hi @Tobias_Wochinger ,

I’m getting this error:

Could not create tables: (pymysql.err.OperationalError) (1045, “Access denied for user _____’ (using password: YES)”) (Background on this error at: http://sqlalche.me/e/e3q8)

my tracker_store:

tracker_store: type: SQL dialect: “mysql+pymysql” # the dialect used to interact with the db url: “localhost” # (optional) host of the sql db, e.g. “localhost” db: “mydb” # path to your db username: “admin” # username used for authentication password: “admin” # password used for authentication

any idea what i’m doing wrong?

Also, is there a way to require ssl in sql dialect?