I have 503 error when upgrade lastest n8n

Could you check this error, please?

Sadly there isn’t really a lot there, can you share a bit more about your setup? I read in another thread that it might just be slow starting up for the first time after the upgrade.

2 Likes

I use these config variables on docker, with SSL by reserse proxy:
(Manage by portainer)

N8N_BASIC_AUTH_ACTIVE	true
N8N_BASIC_AUTH_PASSWORD	MYPASSWD
N8N_BASIC_AUTH_USER	admin
N8N_HOST	n8n.working24.net
N8N_PROTOCOL	https
NODE_ICU_DATA	/usr/local/lib/node_modules/full-icu
NODE_VERSION	12.16.3
PATH	/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
VUE_APP_URL_BASE_API	https://n8n.working24.net/
WEBHOOK_TUNNEL_URL	https://n8n.working24.net/
YARN_VERSION	1.22.4

With reserse proxy http://myIP:5678

Note: it is ok with old version on docker
But when I install the lastest today, it take 503 error

Now I change to old version to test, it is ok.
Could you check the lastest version of docker for this?
Docker Hub

What does n8n output? So if you look at the logs.

I see this log, it seems 503 simply:

'14.226.199.193 162.158.178.7 - - [22/Aug/2021:19:07:48 +0000] "GET / HTTP/1.1" 503 441 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"'
'14.226.199.193 172.70.142.89 - - [22/Aug/2021:19:07:52 +0000] "GET / HTTP/1.1" 503 441 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"'
'14.226.199.193 162.158.166.56 - - [22/Aug/2021:19:07:53 +0000] "GET /favicon.ico HTTP/1.1" 503 441 "https://n8n.working24.net/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"'

I think what Jan means is what does n8n log not the reverse proxy in front of it.

Have you also tried connecting direct not using the reverse proxy to see what happens?

2 Likes

Exactly as @jon mentioned.

Generally do you normally simply have to wait. Especially if you have a lot of executions.

I will see this, and set up log file and check more for info
Perhaps can not do it now, it’s 3:00 AM here

I will send you log tomorrow…

1 Like

Here more information:

Just make sure that enough hard drive space is free. It should then start up fine.

1 Like

I got this on portainer log for docker. I think this is issue:


      
chown: /root/.n8n/.user.ini: Operation not permitted
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

Stopping n8n...
chown: /root/.n8n/.user.ini: Operation not permitted
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

Stopping n8n...
chown: /root/.n8n/.user.ini: Operation not permitted
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

Stopping n8n...
chown: /root/.n8n/.user.ini: Operation not permitted
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

Stopping n8n...
chown: /root/.n8n/.user.ini: Operation not permitted
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

Stopping n8n...
chown: /root/.n8n/.user.ini: Operation not permitted
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

Stopping n8n...
chown: /root/.n8n/.user.ini: Operation not permitted
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

After try to chown file user.ini. Now I have this error:

Stopping n8n...
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"

Stopping n8n...
ln: /home/node/.n8n: File exists
Initializing n8n process

n8n now checks for new versions and security updates. You can turn this off using the environment variable N8N_VERSION_NOTIFICATIONS_ENABLED to "false"
For more information, please refer to https://docs.n8n.io/getting-started/installation/advanced/configuration.html

There was an error initializing DB: "SQLITE_CONSTRAINT: UNIQUE constraint failed: temporary_execution_entity.id"


I try to add this variable, but it is failed and continue to display error:

N8N_VERSION_NOTIFICATIONS_ENABLED false

I will change n8n to old version, because I need to keep nodes running.
Could you check for this error, please?

Looks like the database could be unhappy, the key you changed is unrelated and I believe just controls if you get a message in the UI on the bottom left to tell you about new versions.

I am not sure how to fix the issue you have though, what version did you upgrade from?

It looks like it is trying to reuse an existing ID for something maybe a prune and vacuum would help?

My ok old version is n8nio/n8n:0.134.0-debian

  • My error latest is latest, so I think it is 0.135.0-debian

And I have old config file with old encryptionKey
How could I make true with new upgrade from database?

I do not have any error when try to upgrade before, until this latest today

Yes, N8N_VERSION_NOTIFICATIONS_ENABLED is totally unrelated to that.

I guess the problem is that you did cancel the migration process in the middle of it. Now you seem to have this temp-database with already some data in it and this causes problems. So if you have a database management tool like https://dbeaver.io/ you can open the sqlite database file (can be found under ~/.n8n/database.sqlite) and then delete the database temporary_execution_entity manually and then start n8n again.

1 Like

Btw. for now I would use the old n8n version and then take care of it tomorrow.

Thanks, I will check this on tomorrow tonight.
Does it affect to nodes or lost n8n data, when I delete this on database?

Could you fix this on core?
I will wait for next version to upgrade, without change my current database.

This current version is not very important. I 'm waiting for some update for zulip node on next version.

No, that is just a temporary database that gets created by the migration and also deleted again by the migration. So it does normally not exist and should not exist. The only reason why it exists in your case, is because the migration process got interrupted.

We will have a look if we maybe change the migration for cases like yours.

1 Like