...
I've been running into this issue the whole day and haven't managed to fix it.
Issue:
When running dialogflow, the script cannot connect with the redis server, even though the redis server is running. I've attempted nearly all possible modifications of the conf files. I had managed to run all the scripts once, but then had to restart my pc to fix the microphone issue and I didn't manage to connect to the redis server from dialogflow since.ss of server launched:
<image.png>Platform:
Windows, installed Redis on Ubuntu (WSL 2)
Console feedback:
PS D:\docs\uni-folder\2024-2025\project-conversational-agents\agent-group_i1> run-dialogflow
Turbojpeg not found, falling back to PILTraceback (most recent call last):
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\connection.py", line 592, in read_response
response = self._parser.read_response(disable_decoding=disable_decoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\_parsers\resp2.py", line 15, in read_response
result = self._read_response(disable_decoding=disable_decoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\_parsers\resp2.py", line 25, in _read_response
raw = self._buffer.readline()
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\_parsers\socket.py", line 115, in readline
self._read_from_socket()
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\_parsers\socket.py", line 65, in _read_from_socket
data = self._sock.recv(socket_read_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\sic_framework\core\sic_redis.py", line 118, in __init__
self._redis.ping()
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\commands\core.py", line 1212, in ping
return self.execute_command("PING", **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\client.py", line 559, in execute_command
return self._execute_command(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\client.py", line 565, in _execute_command
conn = self.connection or pool.get_connection(command_name, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\connection.py", line 1422, in get_connection
connection.connect()
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\connection.py", line 369, in connect
self.on_connect()
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\connection.py", line 434, in on_connect
auth_response = self.read_response()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\redis\connection.py", line 600, in read_response
raise ConnectionError(
redis.exceptions.ConnectionError: Error while reading from 127.0.0.1:6379 : (10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Scripts\run-dialogflow.exe\__main__.py", line 7, in <module>
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\sic_framework\services\dialogflow\dialogflow.py", line 347, in main
SICComponentManager([DialogflowComponent])
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\sic_framework\core\component_manager_python2.py", line 56, in __init__
self.redis = SICRedis()
^^^^^^^^^^
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\sic_framework\core\sic_redis.py", line 126, in __init__
six.reraise(Exception, e, None)
File "C:\Users\hlecaUser\miniconda3\envs\PCA25\Lib\site-packages\six.py", line 719, in reraise
raise value
Exception: Could not connect to redis at 127.0.0.1
Have you started redis? Use: `redis-server conf/redis/redis.conf`
Steps to reproduce:
open a wsl interface and initialize the redis server from the config file provided in the GH repo (can also not do this, same error happens). Like this
<image.png>attempt to run-dialogflow. Ensure that PCA25 venv is on.
fallback into PIL, leads to connection failure with redis.
...
demo output:
[WebserverComponent 192.168.1.168]: INFO: Received a button click named: start[WebserverComponent 192.168.1.168]: INFO: Received a button click named: start
[WebserverComponent 192.168.1.168]: INFO: Received a button click named: start
[WebserverComponent 192.168.1.168]: INFO: Received a button click named: start
[EISComponent 192.168.1.168]: INFO: Received handshake request from MARBEL Connector
[WebserverComponent 192.168.1.168]: INFO: Received a button click named: start
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(recipecounter,891)
[EISComponent 192.168.1.168]: INFO: Sending message 891 for label recipecounter to server
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending recipecounter:891 info to webserver
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(pattern,c10)
[EISComponent 192.168.1.168]: INFO: Sending message c10 for label pattern to server
[WebserverComponent 192.168.1.168]: INFO: Sending pattern:c10 info to webserver
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[WebserverComponent 192.168.1.168]: INFO: Client disconnected
[EISComponent 192.168.1.168]: INFO: Received text message: text:say(Hey there!)
[EISComponent 192.168.1.168]: INFO: Planning to say: Hey there!
[EISComponent 192.168.1.168]: INFO: Sending event: TextStarted
[WebserverComponent 192.168.1.168]: INFO: Rendering page: welcome.html
[WebserverComponent 192.168.1.168]: INFO: Open the web page at http://localhost:8080/welcome.html
[WebserverComponent 192.168.1.168]: INFO: Client connected
[EISComponent 192.168.1.168]: INFO: Sending event: TextDone
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(set_turn,true)
[EISComponent 192.168.1.168]: INFO: Sending message true for label set_turn to server
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending set_turn:true info to webserver
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[WebserverComponent 192.168.1.168]: INFO: Received a button click named: mic
[EISComponent 192.168.1.168]: INFO: User requested microphone and it's their turn, so let's start listening.
[EISComponent 192.168.1.168]: INFO: Sending event: ListeningStarted
[DialogflowComponent 192.168.1.168]: INFO: Executing dialogflow request with session id 9516
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[EISComponent 192.168.1.168]: INFO: Received text message: text:webinfo(filters,[])
[EISComponent 192.168.1.168]: INFO: Sending message [] for label filters to server
[WebserverComponent 192.168.1.168]: INFO: Sending filters:[] info to webserver
[DialogflowComponent 192.168.1.168]: ERROR: 403 IAM permission 'dialogflow.sessions.streamingDetectIntent' on 'projects/mr1-agent-tebo/agent' denied.
| Traceback (most recent call last):
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/google/api_core/grpc_helpers.py", line 170, in error_remapped_callable
| return _StreamingResponseIterator(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/google/api_core/grpc_helpers.py", line 92, in __init__
| self._stored_first_result = next(self._wrapped)
| ^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/grpc/_channel.py", line 543, in __next__
| return self._next()
| ^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/grpc/_channel.py", line 969, in _next
| raise self
| grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
| status = StatusCode.PERMISSION_DENIED
| details = "IAM permission 'dialogflow.sessions.streamingDetectIntent' on 'projects/mr1-agent-tebo/agent' denied."
| debug_error_string = "UNKNOWN:Error received from peer ipv4:172.217.168.202:443 {created_time:"2025-01-08T16:33:17.122077038+01:00", grpc_status:7, grpc_message:"IAM permission \'dialogflow.sessions.streamingDetectIntent\' on \'projects/mr1-agent-tebo/agent\' denied."}"
| >
|
| The above exception was the direct cause of the following exception:
|
| Traceback (most recent call last):
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/core/sic_redis.py", line 165, in wrapped_callback
| return callback(sic_message)
| ^^^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/core/sic_redis.py", line 310, in wrapped_callback
| reply = callback(request)
| ^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/core/component_python2.py", line 149, in _handle_request
| return self.on_request(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/services/dialogflow/dialogflow.py", line 248, in on_request
| reply = self.get_intent(request)
| ^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/services/dialogflow/dialogflow.py", line 317, in get_intent
| responses = self.session_client.streaming_detect_intent(requests)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/google/cloud/dialogflow_v2/services/sessions/client.py", line 1076, in streaming_detect_intent
| response = rpc(
| ^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/google/api_core/gapic_v1/method.py", line 131, in __call__
| return wrapped_func(*args, **kwargs)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/google/api_core/timeout.py", line 120, in func_with_timeout
| return func(*args, **kwargs)
| ^^^^^^^^^^^^^^^^^^^^^
| File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/google/api_core/grpc_helpers.py", line 174, in error_remapped_callable
| raise exceptions.from_grpc_error(exc) from exc
| google.api_core.exceptions.PermissionDenied: 403 IAM permission 'dialogflow.sessions.streamingDetectIntent' on 'projects/mr1-agent-tebo/agent' denied.
| NOTE: Exception occurred in SIC framework, not application
Exception in thread SICLogSubscriber_callback_thread:
Traceback (most recent call last):
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/redis/client.py", line 1196, in run
self.exception_handler(e, pubsub, self)
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/core/sic_redis.py", line 179, in exception_handler
raise e
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/redis/client.py", line 1192, in run
pubsub.get_message(ignore_subscribe_messages=True, timeout=sleep_time)
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/redis/client.py", line 1056, in get_message
return self.handle_message(response, ignore_subscribe_messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/redis/client.py", line 1132, in handle_message
handler(message)
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/core/sic_redis.py", line 170, in wrapped_callback
raise e
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/core/sic_redis.py", line 165, in wrapped_callback
return callback(sic_message)
^^^^^^^^^^^^^^^^^^^^^
File "/home/blinszUser/anaconda3/envs/PCA25/lib/python3.11/site-packages/sic_framework/core/sic_logging.py", line 62, in _handle_log_message
raise SICRemoteError("Error occurred, see remote stacktrace above.")
sic_framework.core.sic_logging.SICRemoteError: Error occurred, see remote stacktrace above.
...
| Traceback (most recent call last):
| File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/core/component_python2.py", line 85, in _start
| self.start()
| File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/core/sensor_python2.py", line 24, in start
| self._produce()
| File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/core/sensor_python2.py", line 37, in _produce
| output = self.execute()
| File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/devices/common_desktop/desktop_microphone.py", line 47, in execute
| data = self.stream.read(int(self.params.sample_rate // 8))
| File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/pyaudio/__init__.py", line 570, in read
...
Traceback (most recent call last):
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/redis/client.py", line 1196, in run
self.exception_handler(e, pubsub, self)
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/core/sic_redis.py", line 179, in exception_handler
raise e
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/redis/client.py", line 1192, in run
pubsub.get_message(ignore_subscribe_messages=True, timeout=sleep_time)
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/redis/client.py", line 1056, in get_message
return self.handle_message(response, ignore_subscribe_messages)
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/redis/client.py", line 1132, in handle_message
handler(message)
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/core/sic_redis.py", line 170, in wrapped_callback
raise e
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/core/sic_redis.py", line 165, in wrapped_callback
return callback(sic_message)
File "/Users/m.mansoUser/opt/anaconda3/envs/PCA25/lib/python3.10/site-packages/sic_framework/core/sic_logging.py", line 62, in _handle_log_message
...