Command works inside the Docker container but is stuck executing inside n8n

Hello everybody,
I’m currently trying to setup a workflow which uses Httpx to fetch some URLs.
I can execute the command flawlessly inside the docker container of n8n (tool is available etc.) but if I run the command inside an “execute command” node, the command won’t finish/is stuck executing. All other command seem to work, just the httpx command seems to be stuck.

Describe the problem/error/question

I can execute the following command flawlessly inside the n8n docker container:

time httpx -u https://google.com -sc -cl -title -td -ip -silent                                                                              
https://google.com [301] [134] [301 Moved Permanently] [<redacted>] [Amazon ELB,Amazon Web Services]

real    0m1.746s
user    0m1.579s
sys     0m0.154s
(time was used to showcase, that the command executed quickly)

But inside n8n, it is stuck and won’t finish executing.
I don’t get any error or stacktrace, it just keeps on “executing”.
Please let me know, if you can help me somehow, how to debug this behavior.

Please share your workflow

Share the output returned by the last node

Node is stuck and keeps executing.

Expected output:

https://google.com [301] [134] [301 Moved Permanently] [] [Amazon ELB,Amazon Web Services]

Information on your n8n setup

  • n8n version: [email protected]
  • Database : PostGres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via: Custom Docker Image with npm
  • Operating system: Ubuntu 22.04.5 LTS

Hi @maxvaer - try binding the socket to your docker-compose yaml.

volumes:

      - /var/run/docker.sock:/var/run/docker.sock