Respond to Chat in "Waiting for input" forever

Describe the problem/error/question

I simplified my worflow to just two nodes to demonstrate my issue:

Nodes settings:

What is the error message (if any)?

It’s waiting forever.

I probably made a simple and stupid mistake - which one, please?

Please share your workflow

Information on your n8n setup

  • n8n version: 1.105.4
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker image n8nio/n8n
  • Operating system: Linux as docker host

Hey @dz3jar hope all is well. Welcome to the community.

Interesting, I just copied your example and it appears to be working for me

Thank you for your reply, Jabbson!

It seems this issue is specific to my environment, even though I had hoped Docker would eliminate the classic “it works on my machine” problem.

I’ll try deleting the persistent files in the mounted directory and reimporting my workflows to see if that resolves it. :slight_smile:

Thanks again!

Dz3jar

I know, i sometimes wish things wouldn’t work for me either, when I am trying to repro somebody’s issue :slight_smile:

Out of curiosity, any errors in the dev console?

Good evening (or morning) jabbson !

Thank you for your hint. In the devel console there were lines like:

So I set N8N_HOST to my server IP address and it works now!

Best regards,

Dz3jar

2 Likes

Perfect, glad I had that idea! Good job getting to the bottom of this!

The N8N_HOST method cannot solve all problems. When the docker impact port is inconsistent, this method is invalid.

After my research and testing (V1.115.3), there are 2 methods that can basically solve this problem perfectly:

1. Set both N8N_HOST and N8N_PORT

docker run -d -it --rm --name n8n -p 6080:5678 -e N8N_SECURE_COOKIE=false -e N8N_PROTOCOL=http -e N8N_HOST=111.111.111.111 -e N8N_PORT=6080 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n

2. Set WEBHOOK_URL, which can solve it more simply; this method is recommended docker

run -d -it --rm --name n8n -p 6080:5678 -e N8N_SECURE_COOKIE=false -e WEBHOOK_URL=“http://111.111.111.111:6080” -e N8N_PROTOCOL=http -v n8n_data:/home/node

The principle analysis must establish a direct channel between the front-end chat interface and n8n within the docker.

If your docker does not know the external IP and external mapped port, it will cause communication failure of the chat’s resp node.

——————————————————

经过我的研究及测试(1.115.3),2种方式可以基本完美解决此问题:

1 同时设置N8N_HOST和N8N_PORT

docker run -d -it --rm --name n8n -p 6080:5678 -e N8N_SECURE_COOKIE=false -e N8N_PROTOCOL=http -e N8N_HOST=111.111.111.111 -e N8N_PORT=6080 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n

2 设置WEBHOOK_URL,可以更简单的解决,推荐此方法

docker run -d -it --rm --name n8n -p 6080:5678 -e N8N_SECURE_COOKIE=false -e WEBHOOK_URL=“http://111.111.111.111:6080 -e N8N_PROTOCOL=http -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n

原理分析
必须建立前端chat界面能和docker内n8n的直接通道

如果你的docker不知道外部IP及外部映射端口都会造成chat的resp节点通讯失败

glad I found this post, as I am experiencing this very same behavior in n8n cloud. has anyone else experienced this in n8n cloud? any known solutions?

Well, I build it in my home, and use reverse proxy, so I uses different address (eg. http://192.168.1.X:XXXX in my home, and https://n8n.exampledomain.com outside). This solution can define host and port, but cannot solve the same problem in my condition.