Describe the problem/error/question
AI Chat Agents never output to chat window. I can see the question and response in the agent node output panel but the chat window just has dancing dots forever and never returns the output.
This seems to be happening with any Chatbot Agent node I create.
What is the error message (if any)?
No error
Please share your workflow
Share the output returned by the last node
[
{
"sessionId":
"test-3703a635-f52c-4954-823f-784fa571f226",
"action":
"sendMessage",
"chatInput":
"hello"
}
]
Information on your n8n setup
n8n version: 1.61.0
Database (default: SQLite): SQLite
n8n EXECUTIONS_PROCESS setting (default: own, main):
Running n8n via (Docker, npm, n8n cloud, desktop app): npm
Operating system: MacOS Sequoia
ria
October 9, 2024, 7:50am
3
Hi @ThatPrivacyGuy
How are you hosting the chat window? Does the execution succeed?
Do you get anything in the logs? (Try log level = debug) or the browser dev tools.
The execution succeeds and Ollama gives a response - it just never makes it to the chat window. If I go into the chat node it shows the question and response in the log but the chat window just has continuous bouncing dots.
I haven’t done anything with the chat window - it just appears as a button next to run test button when a chat node is added.
ria
October 9, 2024, 10:56am
5
Can you share a screenshot of where you’re expecting the chat window to update and it doesn’t?
I cannot reproduce this issue
I have discovered what the issue is - it is from running n8n behind an nginx reverse proxy. If I use n8n from localhost, the chat is working properly.
This is going to be problematic as I need to be able to access my workflows when I travel - are you aware of how to fix this?
ria
October 9, 2024, 12:35pm
7
aha! That’s an important piece of information
Can you check that you have websocket support
activated in your nginx proxy manager?
2 Likes
I don’t use nginx proxy manager, I do everything in the CLI…
For those not having n8n showing the reply at the chat you have to activate two things having nginx:
proxy_buffering and as @ria is saying: Websockets. and this is how I did it. Thank you Ria. this is my content of my nginx /etc/nginx/sites-enable/yourfileconfile
server {
server_name www.yourdomain.com ;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
proxy_pass http://localhost:5678; # Ajusta la IP/puerto si es necesario
# Desactivar proxy_buffering para n8n
proxy_buffering off;
# Configuraciones necesarias para soportar WebSockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
# Cabeceras adicionales para proxy inverso
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
ConfiguraciĂłn del servidor para redirigir HTTP a HTTPS
server {
if ($host = yourdomain.com ) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name yourdomain.com;
return 404; # managed by Certbot
}
1 Like
system
Closed
October 26, 2024, 7:23am
10
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.