Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Unable to upgrade docker install (stuck at old version) #4065

Closed
MudcrabDev opened this issue Aug 21, 2023 · 4 comments
Closed

[Question] Unable to upgrade docker install (stuck at old version) #4065

MudcrabDev opened this issue Aug 21, 2023 · 4 comments
Labels
question Further information is requested

Comments

@MudcrabDev
Copy link

Describe the bug
After following the instructions given here Invidious still reports "Current Version: 2023.05.03-1eb1bae3". This occurs even after complete reclone and start as per the instructions here.

Steps to Reproduce

  1. Shut down running Invidious service
  2. Clear browser cache
  3. Upgrade as instructed here
  4. Start Invidious with docker-compose up
  5. Version at bottom of index page reports old version

Screenshots
image

Additional context
OS: Pop!_OS 22.04
Browsers: Firefox (after cache clear), Vivaldi, Brave

@MudcrabDev MudcrabDev added the bug Something isn't working label Aug 21, 2023
@unixfox
Copy link
Member

unixfox commented Aug 21, 2023

Please paste your docker-compose file without the credentials.

@unixfox unixfox added question Further information is requested and removed bug Something isn't working labels Aug 21, 2023
@unixfox unixfox changed the title [Bug] Unable to upgrade docker install (stuck at old version) [Question] Unable to upgrade docker install (stuck at old version) Aug 21, 2023
@MudcrabDev
Copy link
Author

I see now I was using the development docker-compose file. I was under the impression that the configuration on the page was for opening the instance to the Internet. I only access mine from localhost so I didn't use it. I assumed the docker-compose file pulled from git was already set for production since those are the production install instructions.

I've copied and pasted the docker-compose config from the page and added an hmac key with pwgen, but when I start invidious now I'm getting the following error:

Creating invidious_invidious-db_1 ... done
Creating invidious_invidious_1    ... done
Attaching to invidious_invidious-db_1, invidious_invidious_1
invidious-db_1  | 
invidious-db_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
invidious-db_1  | 
invidious-db_1  | 2023-08-22 00:17:50.345 UTC [1] FATAL:  database files are incompatible with server
invidious-db_1  | 2023-08-22 00:17:50.345 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.9 (Debian 14.9-1.pgdg120+1).
invidious_1     | Unhandled exception:  (DB::ConnectionRefused)
invidious_1     |   from lib/pg/src/pg/connection.cr:16:9 in '->'
invidious_1     |   from lib/db/src/db/pool.cr:214:27 in 'build_resource'
invidious_1     |   from /usr/share/crystal/src/int.cr:525:11 in 'build_database'
invidious_1     |   from src/invidious.cr:63:15 in '__crystal_main'
invidious_1     |   from /usr/share/crystal/src/crystal/main.cr:115:5 in 'main'
invidious_1     |   from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
invidious_1     | Caused by: Cannot establish connection (PQ::ConnectionError)
invidious_1     |   from lib/pg/src/pq/connection.cr:34:9 in 'new'
invidious_1     |   from lib/pg/src/pg/connection.cr:13:23 in '->'
invidious_1     |   from lib/db/src/db/pool.cr:214:27 in 'build_resource'
invidious_1     |   from /usr/share/crystal/src/int.cr:525:11 in 'build_database'
invidious_1     |   from src/invidious.cr:63:15 in '__crystal_main'
invidious_1     |   from /usr/share/crystal/src/crystal/main.cr:115:5 in 'main'
invidious_1     |   from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
invidious_1     | Caused by: Error connecting to 'invidious-db:5432': Connection refused (Socket::ConnectError)
invidious_1     |   from /usr/share/crystal/src/gc/boehm.cr:192:5 in 'new'
invidious_1     |   from lib/pg/src/pg/connection.cr:13:23 in '->'
invidious_1     |   from lib/db/src/db/pool.cr:214:27 in 'build_resource'
invidious_1     |   from /usr/share/crystal/src/int.cr:525:11 in 'build_database'
invidious_1     |   from src/invidious.cr:63:15 in '__crystal_main'
invidious_1     |   from /usr/share/crystal/src/crystal/main.cr:115:5 in 'main'
invidious_1     |   from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
invidious_invidious-db_1 exited with code 1

I tried removing all docker images and containers with the following command:

docker ps -aq | xargs docker stop | xargs docker rm

I also tried following the docker compose upgrade steps again:

docker-compose pull
docker-compose up -d
docker image prune -f

However I'm still getting the above error. I don't know how to remove the old database. I don't use accounts on my instance so I'm fine with deleting the whole database and starting from scratch.

@unixfox
Copy link
Member

unixfox commented Aug 22, 2023

Do:

docker-compose down -v
docker-compose up -d

This will remove the database files.

@MudcrabDev
Copy link
Author

docker-compose down -v
docker-compose up -d

This worked. My instance is now running with the latest version.

Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants