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

After upgrading Weblate 3 to 4 says "Postgres 10 is required" but I have it already. #7043

Closed
2 tasks done
romanr opened this issue Jan 3, 2022 · 5 comments
Closed
2 tasks done
Assignees
Labels
documentation Improvements or additions to the documentation.
Milestone

Comments

@romanr
Copy link

romanr commented Jan 3, 2022

Describe the issue

Weblate 3.9.1

Upgrading:

docker-compose stop
docker-compose pull
docker-compose start

docker-compose start output:

Starting weblate-docker_database_1     ... done
Starting weblate-docker_https-portal_1 ... done
Starting weblate-docker_cache_1        ... done
Starting weblate-docker_weblate_1      ... done
Attaching to weblate-docker_https-portal_1, weblate-docker_database_1, weblate-docker_cache_1, weblate-docker_weblate_1
database_1      |
https-portal_1  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
https-portal_1  | [s6-init] ensuring user provided files have correct perms...exited 0.
https-portal_1  | [fix-attrs.d] applying ownership & permissions fixes...
https-portal_1  | [fix-attrs.d] done.
https-portal_1  | [cont-init.d] executing container initialization scripts...
https-portal_1  | [cont-init.d] 00-welcome: executing...
https-portal_1  |
https-portal_1  | ========================================
https-portal_1  | HTTPS-PORTAL v1.21.0
https-portal_1  | ========================================
https-portal_1  |
https-portal_1  | [cont-init.d] 00-welcome: exited 0.
https-portal_1  | [cont-init.d] 20-setup: executing...
https-portal_1  | DH parameters appear to be ok.
https-portal_1  | -----BEGIN DH PARAMETERS-----
...
https-portal_1  | -----END DH PARAMETERS-----
https-portal_1  | RSA key ok
https-portal_1  | Signing skipped for, it expires at 66 days from now.
database_1      | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1      |
database_1      | LOG:  database system was shut down at 2022-01-03 08:56:14 UTC
database_1      | LOG:  MultiXact member wraparound protections are now enabled
database_1      | LOG:  database system is ready to accept connections
database_1      | LOG:  autovacuum launcher started
cache_1         | 1:C 03 Jan 09:09:07.346 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
cache_1         | 1:C 03 Jan 09:09:07.346 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
cache_1         | 1:C 03 Jan 09:09:07.346 # Configuration loaded
cache_1         | 1:M 03 Jan 09:09:07.349 * Running mode=standalone, port=6379.
cache_1         | 1:M 03 Jan 09:09:07.349 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
cache_1         | 1:M 03 Jan 09:09:07.349 # Server initialized
cache_1         | 1:M 03 Jan 09:09:07.349 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
cache_1         | 1:M 03 Jan 09:09:07.594 * DB loaded from append only file: 0.244 seconds
cache_1         | 1:M 03 Jan 09:09:07.597 * Ready to accept connections
weblate_1       | Starting...
https-portal_1  | [cont-init.d] 20-setup: exited 0.
https-portal_1  | [cont-init.d] 30-set-docker-gen-status: executing...
https-portal_1  | [cont-init.d] 30-set-docker-gen-status: exited 0.
https-portal_1  | [cont-init.d] done.
https-portal_1  | [services.d] starting services
https-portal_1  | [services.d] done.
weblate_1       | Postgres 90624 is up
weblate_1       | PostgreSQL 10 or newer is required to run Weblate

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Go to '...'
  2. Scroll down to '...'
  3. Click on '...'
  4. See error

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

3.9.1 upgraded via docker compose pull to ???

$ docker-compose exec --user weblate weblate weblate list_versions
ERROR: No container found for weblate_1

$ docker-compose exec --user weblate weblate-docker_weblate_1 weblate list_versions
ERROR: No such service: weblate-docker_weblate_1

Weblate deploy checks

docker-compose exec --user weblate weblate weblate check --deploy
ERROR: No container found for weblate_1


### Additional context

_No response_
@romanr romanr added the question This is more a question for the support than an issue. label Jan 3, 2022
@github-actions
Copy link

github-actions bot commented Jan 3, 2022

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@nijel
Copy link
Member

nijel commented Jan 3, 2022

According to the log, you have PostgreSQL 9.6.24:

Postgres 90624 is up

I've seen similar issue in WeblateOrg/docker#1314 (comment), the old PostgreSQL was still running even though the docker-compose was updated, check that issue for more details.

@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Jan 14, 2022
@romanr
Copy link
Author

romanr commented Feb 1, 2022

Solved using following steps:

  1. Make backup of database
  2. Stop docker
  3. Remove postgres data directory
  4. Edit docker-compose.yml and set new Postgres image version
  5. Start database container as new version, standalone without Weblate
  6. Postgres will init empty database.
  7. Run pg_restore in started database container
  8. It will recreate Weblate database in new Postgres version
  9. Stop and restart Weblate docker as usual

shell commands:

docker exec -t weblate-docker_database_1 pg_dumpall -c -U weblate > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
docker compose down
sudo rm -Rf  /var/lib/docker/volumes/weblate-docker_postgres-data/_data/*
mv docker-compose.override.yml docker-compose.override.yml.inactive
cp environment environment.prod

backup

cp docker-compose.yml  docker-compose.yml-main

Create "upgrade" version of docker-compose.yml

version: '3'
services:
  database:
    image: postgres:13-alpine
    env_file:
      - ./environment
    volumes:
      - postgres-data:/var/lib/postgresql/data
    restart: always
volumes:
  postgres-data: {}

Start and restore database:

 
docker-compose up
cat dump.sql | docker exec -i weblate-docker_database_1 psql -U weblate -d postgres

Check output and continue if no errors:

mv docker-compose.override.yml.inactive docker-compose.override.yml
cp docker-compose.yml-main  docker-compose.yml
docker-compose up

@nijel nijel added documentation Improvements or additions to the documentation. and removed question This is more a question for the support than an issue. wontfix Nobody will work on this. labels Feb 1, 2022
@nijel nijel added this to the 4.11 milestone Feb 1, 2022
@nijel nijel self-assigned this Feb 1, 2022
nijel added a commit that referenced this issue Feb 1, 2022
Apparently, this is quite often hit by our users, so lets document it.

Fixes #7043
@nijel
Copy link
Member

nijel commented Feb 1, 2022

Thanks @romanr for writing this down. I've polished this a bit and added it to our documentation: e7df595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to the documentation.
Projects
None yet
Development

No branches or pull requests

2 participants