Closed samzong closed 7 months ago
I got some fixed in n8n community
https://community.n8n.io/t/upgrade-from-1-29-1-to-1-3-1-fails/42153
set env:
N8N_SECURE_COOKIE:false
This is a problem caused by n8n upgrading to new version. I just found a temporary solution, and I don't understand why.
I guess it is your setup, for the record, we have this running with N8N_SECURE_COOKIE: true
I guess it is your setup, for the record, we have this running with
N8N_SECURE_COOKIE: true
Ok, I got it, It's just that the upgrade will fail directly. It's very sudden for me. I should pay attention to this part of the change when upgrading.
So what is the actual solution to this? I'm seeing the same issue on my bare metal K8s. Fresh install from Helm. All default settings, except for the PostgreSQL which is an existing one.
I'm trying to access the webui through a static load balancer IP (MetalLB).
The LB seems to be the reason. I do not get the error when using a port forward to the cluster IP.
User error, you need to have a DB.
sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;
Uh, yeah, I do have a DB. It is used, filled, I can totally use N8N over port forward on my localhost. It just doesn't work over the LoadBalancer IP.
Could you please try to reproduce it, maybe? Set up the service so it uses a load balancer and try to access N8N via that IP?
So what is the actual solution to this? I'm seeing the same issue on my bare metal K8s. Fresh install from Helm. All default settings, except for the PostgreSQL which is an existing one.
I'm trying to access the webui through a static load balancer IP (MetalLB).
The LB seems to be the reason. I do not get the error when using a port forward to the cluster IP.
I found more info on the issue that was brought on by the upgrade to v1.32.0.
https://github.com/n8n-io/n8n/blob/master/packages/cli/BREAKING-CHANGES.md#1320
n8n auth cookie has Secure flag set by default now.
If you are running n8n without HTTPS on a domain other than localhost, you need to either setup HTTPS, or you can disable the secure flag by setting the env variable N8N_SECURE_COOKIE to false.
Worth mentioning that there was also a bug that was recently fixed that caused the same issue https://github.com/n8n-io/n8n/pull/9212
I have a reverse proxy which terminates TLS prior to reaching the pod and also got the unauthorized messages after logging in. Using the latest image tag (1.39.1) fixed this issue - even when having the N8N_SECURE_COOKIE: true
set explicitly.
As a new user, I ran into this problem, Sorry not to be able to provide more details.
ROOT CAUSE
n8n auth cookie has Secure flag set by default now.
if we don't need, disble with env
N8N_SECURE_COOKIE:false
https://github.com/n8n-io/n8n/blob/master/packages/cli/BREAKING-CHANGES.md#1320