Connection lost Issue. HELP


Server down? How that possible?

Just installed n8n on virtual server and got this. Opened via https://DOMAIN

  • Don’t have proxy
  • newest version of n8n
  • nginx settings ok

Restart Logs

root@vm3726734:~# docker logs -f n8n
Invalid timestamp value for N8N_RELEASE_DATE: $(date -u +“%Y-%m-%dT%H:%M:%SZ”)
Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
User settings loaded from: /home/node/.n8n/config
Initializing n8n process
n8n ready on 0.0.0.0, port 5678

There is a deprecation related to your environment variables. Please take the recommended actions to update your configuration:

  • N8N_RUNNERS_ENABLED → Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set N8N_RUNNERS_ENABLED=true to enable task runners now and avoid potential issues in the future. Learn more: Task runners | n8n Docs

Version: 1.82.3
Locale: ru

Editor is now accessible via:
http://localhost:5678

that means you have lost connection to the server. It may be a network issue, or websocket error (if you didn’t set websockets properly in the proxy configuration). You can open a dev console (f12), open the network/console tab and see if there are any errors

bro, I never had any connection before.
Also, I dont use any proxy or vpn, and it’s the newest version of n8n

What it can be?

n8n use websocket, if you use nginx please add

proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

Didn’t helped(

root@vm3726734:~# sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

sudo nginx -s reload are you miss?

No, sir, do I start image correctly?

docker run -d --restart unless-stopped --name n8n -p 5678:5678 -e GENERIC_TIMEZONE=“Asia/Bishkek” -e TZ=“Asia/Bishkek” -e N8N_DEFAULT_LOCALE=“ru” -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n

Restart logs

root@vm3726734:~# docker logs -f n8n
Invalid timestamp value for N8N_RELEASE_DATE: $(date -u +“%Y-%m-%dT%H:%M:%SZ”)
Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
User settings loaded from: /home/node/.n8n/config
Initializing n8n process
n8n ready on 0.0.0.0, port 5678

There is a deprecation related to your environment variables. Please take the recommended actions to update your configuration:

  • N8N_RUNNERS_ENABLED → Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set N8N_RUNNERS_ENABLED=true to enable task runners now and avoid potential issues in the future. Learn more: Task runners | n8n Docs

Version: 1.82.3
Locale: ru

Editor is now accessible via:
http://localhost:5678

can you show me your nginx config?

root@vm3726734:~# sudo cat /etc/nginx/sites-enabled/n8n
server {
listen 80;
server_name your.domain.com;

location / {
    proxy_pass http://localhost:5678;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    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;
}

}

root@vm3726734:~# sudo cat /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

root@vm3726734:~# sudo cat /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    #
     Virtual Host Configs
    #

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

}

mail {
# See sample authentication script at:
# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

   # auth_http localhost/auth.php;
   # pop3_capabilities "TOP" "USER";
   # imap_capabilities "IMAP4rev1" "UIDPLUS";

  server {
           listen     localhost:110;
           protocol   pop3;
           proxy      on;
   }

   server {
           listen     localhost:143;
           protocol   imap;
           proxy      on;
   }

}
root@vm3726734:~#

is that it?

yes, nginx is ok. but nginx only open port 80, you are accept port 443 protocol wss. please check your firewall or cloudflare.
if you use cloudflare, you can try uncheck box proxy. and then nginx open port 443 use certbot make ssl cert

Sir, help me please, I don’t have any firewall, and certificates loaded, still same error

root@vm3726734:~# curl -v https://dks.one

  • Trying 45.89.110.9:443…
  • TCP_NODELAY set
  • Connected to dks.one (45.89.110.9) port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt
    CApath: /etc/ssl/certs
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (OUT), TLS alert, unknown CA (560):
  • SSL certificate problem: unable to get local issuer certificate
  • Closing connection 0
    curl: (60) SSL certificate problem: unable to get local issuer certificate
    More details here: curl - SSL CA Certificates

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
root@vm3726734:~# sudo ufw status | grep 443
root@vm3726734:~# sudo ufw allow 443/tcp
Rules updated
Rules updated (v6)
root@vm3726734:~# sudo ufw reload
Firewall not enabled (sk

maybe something with certificates? how to check?

you can visit https://letsencrypt.org/ make cert free by domain. I think your cert not verified

You don’t have https, your proxy is configured for listening the http protocol (port 80).

Best option is to get a certificate via certbot (let’s encrypt) and reconfigure the proxy for HTTPS. There are no changed in the n8n configuration…

Or open your n8n instance via http://domain, not via https.

How did you know that I don’t have it? You can open https://dks.one/ and it’s ok, I bought already cert before

because you have provided a config with http port 80:

These settings should be enough for n8n to work properly

server {
    listen 443 ssl;
    server_name your_domain_name
    ssl_certificate "path_to_your_private_key";
    ssl_certificate_key "path_to_your_public_key";

    location / {
        proxy_pass http://localhost:5678;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        
    }
}

1 Like

Thank you! That helped!

but now I got this webhook error with telegram.

What can it be?

Does it say anything else? Or is there any node with the red sign on the canvas?