Not able to execute the test workflow on self hosted SSL by using docker container when SSL is enabled

We are encountering an issue with executing test workflows in n8n when it is self-hosted using Docker with SSL enabled. The n8n instance is accessed via an Apache reverse proxy. The primary problem is that while n8n runs with SSL enabled, the test workflows do not execute properly and continue to load indefinitely. When SSL is disabled, the workflows function as expected.

What is the error message (if any)?

Problem stopping execution
Only running or waiting executions can be stopped and 45 is currently error.

workflow


Information on your n8n setup

  • **n8n version:- 1.41.1
  • **Database (default)
  • **n8n EXECUTIONS_PROCESS setting (default)
  • **Running n8n via ;- docker
  • **Operating system:- centOS linux version 8

Hi @rashmi.fartode, perhaps you could check your Apache configuration file to make sure that it’s properly set up to handle SSL connections, or share a bit more about your setup?

Here is Apache configuration.

<VirtualHost *:443>
ServerName example.com
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /path/to/your/fullchain.pem
SSLCertificateKeyFile /path/to/your/privkey.pem
ProxyPreserveHost On
# Main proxy settings
ProxyPass / http://localhost:5678/
ProxyPassReverse / http://localhost:5678/
# WebSocket proxying
ProxyPassMatch /rest/push ws://localhost:5678/rest/push
ProxyPassReverse /rest/push ws://localhost:5678/rest/push
# Add additional headers
RequestHeader set X-Forwarded-Proto “https”
RequestHeader set X-Forwarded-Ssl “on”
<Proxy *>
Require all granted

# Enable detailed logging
LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/n8n_error.log
CustomLog ${APACHE_LOG_DIR}/n8n_access.log combined

We are facing WebSocket error.
WebSocket connection to ‘wss://your-server.com/rest/push?pushRef=your-pushRef’ failed:
Requesting you to kindly guide us.

Hey @rashmi.fartode,

You will need to configure your Apache virtual host to also support web sockets, The below is a minimal way you can do this as an example.

<VirtualHost *:80>
        ServerName n8n.yourdomain.tld

        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteRule /(.*)           ws://172.17.0.1:5678/$1 [P,L]
        RewriteCond %{HTTP:Upgrade} !=websocket [NC]
        RewriteRule /(.*)           http://172.17.0.1:5678/$1 [P,L]
        ProxyPassReverse /          http://n8n.yourdomain.tld
</VirtualHost>
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.