Update n8n cause 404 and does not show workflows anymore

Hello,

I did update n8n from 1.25.1 to 1.32.2 using docker on digital ocean.

But it seems I can’t access the configuration anymore.

used

docker pull n8nio/n8n

This is the system info:

root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker --version
Docker version 25.0.5, build 5dc9bcc
root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker info
Client: Docker Engine - Community
Version: 25.0.5
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.12.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.24.2
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 3
Server Version: 25.0.5
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc version: v1.1.12-0-g51d5e94
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.5.0-9-generic
Operating System: Ubuntu 23.10
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 952.3MiB
Name: ubuntu-s-1vcpu-1gb-fra1-01
ID: 8444dc19-a35c-464a-8369-32062a81f467
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
n8nio/n8n latest eb6398bbcc06 4 days ago 669MB
traefik latest ee69e8120b64 7 weeks ago 153MB
docker.n8n.io/n8nio/n8n latest 3043464bdddf 8 weeks ago 715MB

Workflows seem to be started

User settings loaded from: /home/node/.n8n/config
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Migrations in progress, please do NOT stop the process.
Starting migration DropRoleMapping1705429061930
Finished migration DropRoleMapping1705429061930
Version: 1.32.2

Start Active Workflows:

But when I try to access n8n with the URL from our server this gave me 404: I can access through the Server IP and Port, login with my user but when I comes to load the workflows I can’t access them as well the previous users are not available anymore

I’m little nervous but since I can see in the terminal that the workflows has been started I’m sure there must be a ways to recover everything.

The Data should be here and seems from the date I did install
root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker volume inspect n8n_data
[
{
“CreatedAt”: “2024-01-29T20:11:10Z”,
“Driver”: “local”,
“Labels”: null,
“Mountpoint”: “/var/lib/docker/volumes/n8n_data/_data”,
“Name”: “n8n_data”,
“Options”: null,
“Scope”: “local”
}
]
root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker run --rm -v n8n_data:/data busybox ls -l /data
total 770564
drwxr-sr-x 2 1000 1000 4096 Jan 29 20:12 binaryData
-rw-r–r-- 1 1000 1000 56 Jan 29 20:12 config
-rw-r–r-- 1 1000 1000 0 Mar 20 10:27 crash.journal
-rw-r–r-- 1 1000 1000 788840448 Mar 20 09:45 database.sqlite
drwxr-sr-x 2 1000 1000 4096 Jan 29 20:12 git
-rw-r–r-- 1 1000 1000 1138 Mar 20 10:20 n8nEventLog-1.log
-rw-r–r-- 1 1000 1000 0 Mar 20 09:45 n8nEventLog-2.log
-rw-r–r-- 1 1000 1000 178140 Mar 20 09:45 n8nEventLog-3.log
-rw-r–r-- 1 1000 1000 569 Mar 20 10:28 n8nEventLog.log
drwxr-sr-x 3 1000 1000 4096 Jan 30 11:53 nodes
drwxr-sr-x 2 1000 1000 4096 Jan 29 20:12 ssh

I tried to recover but still have the newest version instead of the expected old one
root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker stop root-n8n-1
docker rm root-n8n-1
root-n8n-1
root-n8n-1
root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker run -d --name new-n8n-container -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n:latest
d2015fa11e5addbcf6fd25b1ecf10a0e71cb023317de39cc13f72c9d09553167
root@ubuntu-s-1vcpu-1gb-fra1-01:/usr/local/bin# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d2015fa11e5a docker.n8n.io/n8nio/n8n:latest “tini – /docker-ent…” 42 seconds ago Up 41 seconds 0.0.0.0:5678->5678/tcp, :::5678->5678/tcp new-n8n-container
03651c770052 traefik “/entrypoint.sh --ap…” 7 weeks ago Up 24 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp root-traefik-1

Any advice how to get be to the old version or fix the new one?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hello,

That was the same for me and it’s still the same when I access n8n in http but with https it’s working.

I can access with the server IP but there are no workflows or users.

I did update n8n from 1.25.3 to 1.32.2 using docker on digital ocean. Its Linux

I tried to load the old image but getting this out of the log file:

root@ubuntu-s-1vcpu-1gb-fra1-01:~# docker logs old-n8n-container
User settings loaded from: /home/node/.n8n/config
Last session crashed
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Version: 1.25.1
QueryFailedError: SQLITE_ERROR: no such column: WorkflowEntity__WorkflowEntity_shared.roleId
at handler (/usr/local/lib/node_modules/n8n/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:81:26)
at replacement (/usr/local/lib/node_modules/n8n/node_modules/sqlite3/lib/trace.js:25:27)
at Statement.errBack (/usr/local/lib/node_modules/n8n/node_modules/sqlite3/lib/sqlite3.js:15:21)
Error: Exiting due to an error.
QueryFailedError: SQLITE_ERROR: no such column: WorkflowEntity__WorkflowEntity_shared.roleId
User settings loaded from: /home/node/.n8n/config

This happens when I login to the gui which is only accessible with the server IP and not Domain name anymore.

grafik

Did you try to access via HTTPS ?

1 Like

I can’t because I have only the ipadress. How did you manage to call the ip with https? Installed SSL?

you directed me to the right direction. It seems in version (next) 1.34 they has been aware of that point and told me on the login page how to solve it.

Since after the update the new release did not point to the domain with ssl anymore and I had only the option through the IP I had the same behaviour as you had.

This came with the login from n8n

Setup TLS/HTTPS (recommended), or
If you are running this locally, try using localhost instead
If you prefer to disable this security feature (not recommended), set the environment variable N8N_SECURE_COOKIE to false

I used the environment variable to get access to my workflows again.

So there is still open topic how to redirect n8n again to my domain which is not working after update anymore. Since it worked before I think there is nothing wrong with the DNS because the server IP stay the same.

I did also modify the .env file but not sure if it is taken or not.

You will need to setup an HTTPS for that.
your site should have the SSL certificate, that was issued from the trusted authority (e.g. from let’s encrypt, they can provide free 3monts-valid certificates)

All worked well with the previous n8n version so there must be something within the n8n config.

the webhooks are currently set to http://localhost:5678

In which config can I adapt this to the domain?

It’s set with the WEBHOOK_URL environment variable

Sorry, I did have the wrong question. What I mean is that in the previous version the webhooks where autoamtically set to the server domain. Now it is localhost which point me to the direction of getting the 404 when trying to access the n8n webgui through the domain. So currently I have only the option to access by IP.

I did already create the .env file but not sure if it really get used. There must be somehting which broke my previous setup where everything worked

In order to use domain, you’ll need to set up HTTPS, otherwise you won’t be able to authenticate to it.

To set up domain with SSL you will need the following ENVs:

  • N8N_HOST - your domain name
  • N8N_PORT - usually it’s 443
  • N8N_PROTOCOL - https
  • N8N_SSL_KEY - your private key
  • N8N_SSL_CERT - your public key

Usually the last two options are not required, as the server is placed behind the proxy, that will handle the SSL part.

unfortunately with that I can’t access anymore even the IP not. Really strange.

Can you provide the full config?

I did now install a fresh server and imported workflows and credentials. For future having backup before update is for sure :slight_smile:

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