#Messed up the upgrade, don't know what to do now

1 messages Β· Page 1 of 1 (latest)

past sentinel
#

So I was on 2024.2.4 and when the security update was issued I figured it was time to move to a newer version. But I somehow missed the note about needing to migrate to a newer version of postgres before. I did the update without properly migrating postgres and got errors from that container and others.

Then I made possibly dumb decision #2 which is that I decided to just roll back to 2024.2.4.

All of the containers start up just fine now, but when I try to login to the Authentik admin panel I get the default login screen background but a long error in the browser window.

#

here is the error...

static gyro
#

@past sentinel can you post a screenshot of the error instead of the html page

past sentinel
static gyro
#

ok so that's shown in body

#

before doing anything backup your db

#

and do docker logs <postgres container> and logs for server container

past sentinel
#

it's not bind mounted so i'm a little confused

static gyro
#

is it the default docker compose

#

if so docker volume create authentik_database_backup && docker run --rm -v authentik_database:/from -v authentik_database_backup:/to alpine sh -c 'cd /from && cp -a . /to'

#

docker volume ls to get volume name

past sentinel
#

yep okay just did that

static gyro
#

ok so now can u send server and postgres logs

past sentinel
#

sorry the log file for server is massive

static gyro
#

and rq out of curiosity do u have anything important on your instance

past sentinel
#

what do you mean

static gyro
#

like how much stuff do you have on it

#

is it a fresh one

past sentinel
#

just radarr, sonarr, etc

static gyro
#

try upgrading to 2024.4.2 then rebuild stack with --build and --force-recreate

#

might fix the relation does not exist

past sentinel
#

so just wget -O docker-compose.yml https://goauthentik.io/version/2024.4/docker-compose.yml docker compose up -d

#

or i need to add those flags?

static gyro
#

add those flags

#

to ensure the containers start from fresh

past sentinel
#

sorry i'm pretty new at this... docker compose up -d -build --force-recreate

#

does that look right?

static gyro
#

docker compose up --build --force-recreate

#

don't add -d so you can see logs in realtime

past sentinel
#

ok

static gyro
#

tell me if you see migrations being applied

past sentinel
#

i saw "applying django migration" fly by

static gyro
#

what do you see below

past sentinel
#

there's so much

static gyro
#

does it say something like migrations are being applied

#

or files like 000X_something i don't remember migration file format for this

past sentinel
static gyro
#

anyways give it a sec and try going back to the web page and see what's happening

static gyro
past sentinel
#

there's so many lines so i'm not totally sure what to send you

#

but lemme try the login page again

static gyro
#

doesn't seem to be any errors on this screenshot so that's good

past sentinel
#

IT WORKED

#

i'm in

static gyro
#

ok cool so yea

past sentinel
#

ah okay

static gyro
#

do you need help with the postgres upgrade?

past sentinel
#

i think ill stay on this version for now

#

i appreciate the offer but this edible just kicked in

static gyro
#

several security issues are fixed

#

but this edible just kicked in

lol

past sentinel
#

ah shit, maybe i should try

static gyro
#

docs should be pretty straightforward. go one step at a time

past sentinel
#

i'm confused though

#

i thought new versions of 2024.2 and 2024.4 were also released to address the security issues?

static gyro
#

no

#

just backports

past sentinel
#

ohh

#

i was doing this from macos terminal

#

i just closed it

static gyro
#

oh k

past sentinel
#

okay lemme see if i can figure out the postgres upgrade while i've got you

static gyro
#

kk

past sentinel
#

just follow this step by step?

static gyro
#

yea

#

fun fact: i made the pr to upd pg version

past sentinel
#

oh nice

static gyro
#

tana has been ghosting me in my latest prs tho 😒

past sentinel
#

so i guess the first step is intimidating me slightly

static gyro
#

for a second i taught it as her 🀣

past sentinel
#

i just dump my database?

static gyro
#

after you stop the stack yea

past sentinel
#

service "postgresql" is not running container #1

#

i don't get it 😦

static gyro
#

docker ps

#

take the name for the postgres container

past sentinel
#

it's not listed

#

but i can see it in portainer

#

authentik-postgresql-1

static gyro
#

yea so use that from now on

#

i think there are like 3 different postgres container names across the page so lol

past sentinel
#

service "authentik-postgresql-1" is not running container #1

static gyro
#

do without the -1

past sentinel
#

same response

#

wait do i need to put sudo first

static gyro
#

goddammit

#

run docker ps rq

past sentinel
#

"docker ps" accepts no arguments.
See 'docker ps --help'.

static gyro
#

rq = real quick

#

mb

past sentinel
#

lol oh

static gyro
#

lol

past sentinel
#

i don't see any of the authentik containers listed

#

i can see them all in Portainer though

static gyro
#

mmm

past sentinel
#

all of my other running containers are listed

static gyro
#

did you stop the containers

past sentinel
#

yes

static gyro
#

docker compose up -d

#

dump commands

#

docker compose down

past sentinel
#

ohhh i thought you told me to stop them

#

sorry my bad

static gyro
#

all good

past sentinel
#

docker volume create authentik_database_backup && docker run --rm -v authentik_database:/from -v authentik_database_backup:/to alpine sh -c 'cd /from && cp -a . /to'

#

do i need to do this step again?

#

since i just did it earlier?

#

if yes, should i change the backup destination volume name?

static gyro
#

cause you ran those commands remember? better be safe and take the latest .sql

past sentinel
#

docker volume create authentik_database_backup2 && docker run --rm -v authentik_database:/from -v authentik_database_backup2:/to alpine sh -c 'cd /from && cp -a . /to'

#

so can just add 2 after the volume name?

static gyro
#

if you want

past sentinel
#

okay i changed the postgres image number to 16 in the docker compose

#

but where do i add network mode: none

#

like is there a specific line?

static gyro
#

just add it under image

past sentinel
static gyro
#

yea

past sentinel
#

why did it turn greener?

static gyro
#

no reason

#

from what i can see

past sentinel
#

[+] Pulling 4/4
βœ” server Skipped - Image is already being pulled by worker 0.0s
βœ” worker Pulled 0.5s
βœ” redis Pulled 0.5s
βœ” postgresql Pulled

#

βœ” Network authentik_default Created 0.1s
βœ” Volume "authentik_database" Created 0.0s
βœ” Container authentik-postgresql-1 Started

#

is that normal that it skipped server?

static gyro
#

yea

#

in your command you only specified postgres

past sentinel
#

ah yeah

#

just copied from the instructions

#

okay starting them all up again

#

fingers crossed

#

all healthy!

static gyro
#

did you apply your .sql?

past sentinel
#

yeah

static gyro
#

and remove network mode none?

past sentinel
#

i did all the steps

static gyro
#

and upgrade server and worker to 2024.6.0?

past sentinel
#

just didn't say anything unless i was confused

#

i have not upgraded to 2024.6 yet though

static gyro
#

k

#

that step should be pretty easy

past sentinel
#

yeah lemme try now

#

seems to all be working!

#

thanks so much!

#

now ill just test that it's working with NGINX properly

static gyro
#

no problem

#

do you run plain nginx or something like nginx proxy manager?

past sentinel
#

proxy manager

#

looks like everything is working!

#

thanks again