Custom Action Not Responding on Rasa X GCP Server

Hi,

I just followed the instructions here The Rasa Masterclass Handbook: Episode 9 but I haven’t been getting any response from my custom actions (I made sure I’m not importing any external libraries, I’m only dispatching a message to see if it sends anything, which it doesn’t). The model works on my local machine, though, so that’s why I’m confused. My logs using sudo docker-compose logs rasa-x are below

Attaching to rasa_rasa-x_1
rasa-x_1           | INFO:alembic.runtime.migration:Context impl PostgresqlImpl.
rasa-x_1           | INFO:alembic.runtime.migration:Will assume transactional DDL.
rasa-x_1           | INFO:rasax.community.services.event_service:Starting event service (standalone: False).
rasa-x_1           | Run time of job "GitService.run_background_synchronization (trigger: cron[minute='*'], next ru
n at: 2020-05-24 04:20:00 UTC)" was missed by 0:00:01.615206
rasa-x_1           | Starting Rasa X server... 🚀
rasa-x_1           | /usr/local/lib/python3.7/site-packages/rasax/community/services/test_service.py:43: UserWarnin
g: Unable to get tests from tests/conversation_tests.md:
rasa-x_1           | File 'tests/conversation_tests.md' does not exist. Please, make sure you have end-to-end tests
 added to your assistant. See https://rasa.com/docs/rasa/user-guide/testing-your-assistant/ for more information.
rasa-x_1           |   UserWarning,
rasa-x_1           | INFO:rasax.community.services.event_consumers.pika_consumer:Start consuming queue 'rasa_produc
tion_events' on pika host 'rabbit'.
rasa-x_1           | ERROR:pika.adapters.blocking_connection:Unexpected connection close detected: ConnectionClosed
ByBroker: (320) "CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'"
rasa-x_1           | ERROR:rasax.community.services.event_service:Caught an exception while consuming events. Will 
retry in 5 s.
rasa-x_1           | Traceback (most recent call last):
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/services/event_service.py", lin
e 1631, in continuously_consume
rasa-x_1           |     consumer.consume()
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/rasax/community/services/event_consumers/pika_c
onsumer.py", line 180, in consume
rasa-x_1           |     self.channel.start_consuming()
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 186
6, in start_consuming
rasa-x_1           |     self._process_data_events(time_limit=None)
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 202
7, in _process_data_events
rasa-x_1           |     self.connection.process_data_events(time_limit=time_limit)
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 825
, in process_data_events
rasa-x_1           |     self._flush_output(common_terminator)
rasa-x_1           |   File "/usr/local/lib/python3.7/site-packages/pika/adapters/blocking_connection.py", line 522
, in _flush_output
rasa-x_1           |     raise self._closed_result.value.error
rasa-x_1           | pika.exceptions.ConnectionClosedByBroker: (320, "CONNECTION_FORCED - broker forced connection 
closure with reason 'shutdown'")
rasa-x_1           | INFO:rasax.community.services.integrated_version_control.git_service:Cloning git repository fr
om URL 'git@github.com:basil-chatha/bot1.git'.
rasa-x_1           | INFO:rasax.community.services.event_consumers.pika_consumer:Start consuming queue 'rasa_produc
tion_events' on pika host 'rabbit'.

Here are are the logs generated from sudo docker-compose logs rasa-worker

Attaching to rasa_rasa-worker_1
rasa-worker_1      | /opt/venv/lib/python3.7/site-packages/rasa/core/brokers/pika.py:294: FutureWarning: Your Pika 
event broker config contains the deprecated `queue` key. Please use the `queues` key instead.
rasa-worker_1      |   self.queues = self._get_queues_from_args(queues, kwargs)
rasa-worker_1      | 2020-05-24 04:19:36 ERROR    pika.adapters.utils.io_services_utils  - Socket failed to connect
: <socket.socket fd=21, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.21.0.7', 37
310)>; error=111 (Connection refused)
rasa-worker_1      | 2020-05-24 04:19:36 ERROR    pika.adapters.utils.connection_workflow  - TCP Connection attempt
 failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STRE
AM: 1>, 6, '', ('172.21.0.5', 5672))
rasa-worker_1      | 2020-05-24 04:19:36 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnector - report
ing failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connection refused')
rasa-worker_1      | 2020-05-24 04:19:51.387494: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call 
to cuInit: UNKNOWN ERROR (303)

And here are the logs generated from sudo docker-compose logs rasa-production

Attaching to rasa_rasa-production_1
rasa-production_1  | /opt/venv/lib/python3.7/site-packages/rasa/core/brokers/pika.py:294: FutureWarning: Your Pika 
event broker config contains the deprecated `queue` key. Please use the `queues` key instead.
rasa-production_1  |   self.queues = self._get_queues_from_args(queues, kwargs)
rasa-production_1  | 2020-05-24 04:19:36 ERROR    pika.adapters.utils.io_services_utils  - Socket failed to connect
: <socket.socket fd=21, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.21.0.8', 42
092)>; error=111 (Connection refused)
rasa-production_1  | 2020-05-24 04:19:36 ERROR    pika.adapters.utils.connection_workflow  - TCP Connection attempt
 failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STRE
AM: 1>, 6, '', ('172.21.0.5', 5672))
rasa-production_1  | 2020-05-24 04:19:36 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnector - report
ing failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connection refused')
rasa-production_1  | 2020-05-24 04:19:51.586339: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call 
to cuInit: UNKNOWN ERROR (303)
rasa-production_1  | 2020-05-24 04:20:27 ERROR    rasa.core.brokers.pika  - Could not open Pika channel at host 'ra
bbit'. Failed with error: Channel is closed.
RASA_X_VERSION=0.28.3
RASA_VERSION=1.10.0
RASA_X_DEMO_VERSION=0.28.1

I found that you need to refresh the page after you train a new model for the bot to respond using your custom actions.

1 Like