Connection lost

Actually wherever you want. You just have to make sure that you create both files in the same folder and that you run the command from step 8 also in it.

There’s another problem. It says “address already in use” and thats right. We are using apache on our server and he cant use the local adress with 443 as the port.

Associating an IP address to a domain is the job of DNS. You need to register a DNS domain name with a domain provider and then point the domain to your external IP address.

If you just want to test out using a temporary domain, you can modify your hosts file with the domain name and IP address. So, for example, if your IP address was 1.2.3.4 and your domain was www.example.com, you would add the following line into your hosts file:

1.2.3.4       www.example.com

Your hosts file is in different locations, depending on the operating system that you are using:

  • Windows - C:\Windows\System32\drivers\etc\hosts
  • Linux - /etc/hosts
  • MacOS - /etc/hosts

Remember: You need to be root or administrator if you want to edit this file

Thanks a lot @Tephlon!

Here are some other topics @TimoG which talks about the same topic of port 443 being already in use:


I did the setup guide. But we created a dns record before that. So we have one thats active.
But its does not work with the dns record. And thats not the problem. The dns records works fine, but i cant start it.
My docker-compose file is the same as in the guide and my n8n.env looks like this:

n8n.env

Folder where data should be saved

DATA_FOLDER=/var/www/html/n8n/

The top level domain to serve from

DOMAIN_NAME=aundb.io

The subdomain to serve from

SUBDOMAIN=n8n

DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from

above example would result in: https://n8n.example.com

The user name to use for autentication - IMPORTANT ALWAYS CHANGE!

N8N_BASIC_AUTH_USER=******

The password to use for autentication - IMPORTANT ALWAYS CHANGE!

N8N_BASIC_AUTH_PASSWORD=******

Optional timezone to set which gets used by Cron-Node by default

If not set New York time will be used

GENERIC_TIMEZONE=Europe/Berlin

The email address to use for the SSL certificate creation

[email protected]

But i saw, that the docker-compose version is sadly not compatible with apache on the same server.
But it starts if i stop the apache2 service, but i cant open the interface with the domain. I dont get a secure connection.

Now i installed it on a new server without apache but it says now 4 warnings that variables of the .evn file are not set but they are in the n8n.env.
And the logs dont helping me in any way. It says that the file /home/node/.n8n exists but its definitly not. The folder node dont exists too.

Okey, i found a solution on my own. I though that i must create a .env file with any name, but i had to name it ONLY .env. Now it works.

Ah great to hear that you did figure it out. Because I read your answer and was confused why it would not work. Did somehow think you only wrote n8n.env to describe it and not that you actually named it that way. Sorry should have really caught that and then asked.

Hi all,

I am running into the same issue. I am running n8n dockerized. Using a docker-compose.yml file similar to the one in the setup guide, slightly modified to use the env file directly:

  n8n:
    image: n8nio/n8n:0.68.2-push-debug
    env_file: n8n.env
    container_name: n8n
    restart: always
    ports:
      - 5678:5678
    volumes:
      - ~/.n8n:/root/.n8n
      - /var/run/docker.sock:/var/run/docker.sock
    # Wait 5 seconds to start n8n to make sure that PostgreSQL is ready
    # when n8n tries to connect to it
    command: /bin/sh -c "sleep 5; ./packages/cli/bin/n8n start"

As you can see above, I tried the debugging version mentioned in the thread.

I, however, have nginx instead of traefik (I have other services already running behind nginx)

I can see:

  1. The n8n service actually picks up all the .env variables correctly.
  2. From the debug logs, I can see push requests reaching n8n:
        n8n                    |   method: 'GET',                                                                                                                                                                    
        n8n                    |   url: '/rest/push?sessionId=t26ga6pwy1e',                                                                                                                                          
        n8n                    |   query: { sessionId: 't26ga6pwy1e' }                                                                                                                                               
        n8n                    | }                                                                                                                                                                                   
        n8n                    | *** Is Push-Connect-Request                                                                                                                                                         
        n8n                    | *** Push-Connection gets added
        n8n                    | >> Push.add 1
        n8n                    | >> Push.add 3
        n8n                    | >> Push.disconnect
    

Yet, the Connection lost warning on the top right corner of the dashboard is present and I cannot execute any flow.

Any other idea of what might be happening?

Welcome to the community @jmrf!

If you use nginx it is maybe worth checking out this topic:

Thanks Jan!

Btw, I am Jose, the one you spoke to this morning from MeliorAI. Thanks for the link. Checking!

1 Like