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

PostgreSQL update causing issues #216

Closed
2 tasks done
ppfeufer opened this issue Oct 21, 2023 · 6 comments
Closed
2 tasks done

PostgreSQL update causing issues #216

ppfeufer opened this issue Oct 21, 2023 · 6 comments
Labels
question This is more a question for the support than an issue.

Comments

@ppfeufer
Copy link

Describe the issue

Docker install of Weblate.

After a git pull of this repo on the machine my instance is hosted it pukked in this update (0041e3a), which updates PostgreSQL from version 15 to 16.

Now after restarting docker, I'm facing this error:

database_1  | 2023-10-21 09:07:54.924 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.

I already tried

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

Steps to reproduce the behavior

  • Update the local clone of this repo via git pull which pulls in 0041e3a
  • Restart docker

Expected behavior

Weblate is to be starting and PostgreSQL is being migrated to the new version without throwing a tantrum.

Screenshots

No response

Exception traceback

» docker-compose logs -f
Attaching to weblate, weblate_database, weblate_cache
weblate     | Starting...
cache_1     | 1:C 21 Oct 2023 09:58:42.793 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
cache_1     | 1:C 21 Oct 2023 09:58:42.798 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
cache_1     | 1:C 21 Oct 2023 09:58:42.798 * Redis version=7.2.2, bits=64, commit=00000000, modified=0, pid=1, just started
cache_1     | 1:C 21 Oct 2023 09:58:42.798 * Configuration loaded
cache_1     | 1:M 21 Oct 2023 09:58:42.800 * monotonic clock: POSIX clock_gettime
cache_1     | 1:M 21 Oct 2023 09:58:42.803 * Running mode=standalone, port=6379.
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * Server initialized
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * Loading RDB produced by version 7.2.2
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * RDB age 15 seconds
cache_1     | 1:M 21 Oct 2023 09:58:42.804 * RDB memory usage when created 1.80 Mb
cache_1     | 1:M 21 Oct 2023 09:58:42.807 * Done loading RDB, keys loaded: 348, keys expired: 0.
cache_1     | 1:M 21 Oct 2023 09:58:42.808 * DB loaded from disk: 0.004 seconds
cache_1     | 1:M 21 Oct 2023 09:58:42.808 * Ready to accept connections tcp
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:42.927 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:42.927 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:44.184 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:44.184 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:45.393 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:45.393 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:46.971 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:46.971 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:51.478 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:51.478 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:58:55.665 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:58:55.665 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | System check identified no issues (1 silenced).
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:59:03.107 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:59:03.107 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:59:17.016 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:59:17.016 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | System check identified no issues (1 silenced).
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 09:59:43.639 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 09:59:43.639 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2
weblate     | System check identified no issues (1 silenced).
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2
weblate     | System check identified no issues (1 silenced).
database_1  |
database_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1  |
database_1  | 2023-10-21 10:00:35.855 UTC [1] FATAL:  database files are incompatible with server
database_1  | 2023-10-21 10:00:35.855 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 15, which is not compatible with this version 16.0.
weblate_database exited with code 1
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2
weblate     | System check identified no issues (1 silenced).
weblate     | psql: error: could not translate host name "database" to address: Name or service not known
weblate exited with code 2


### Additional context

Overriding the database image in `docker-compose.override.yml` and set it to `image: postgres:15-alpine` fixes it, for the time being …
@ppfeufer ppfeufer changed the title Redis and PostgreSQL updates causing issues PostgreSQL update causing issues Oct 21, 2023
@nijel
Copy link
Member

nijel commented Oct 23, 2023

@nijel nijel added the question This is more a question for the support than an issue. label Oct 23, 2023
@github-actions
Copy link

This issue has been marked as a question by a Weblate team member. Why? Because it belongs more to the professional Weblate Care or community Discussions than here. We strive to answer these reasonably fast here, too, but purchasing the support subscription is more responsible and faster for your business. And it makes Weblate stronger as well. Thanks!

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

@ppfeufer
Copy link
Author

Ah, thank you so much! Worked like a charm.

A quick hint in the changelog would be nice for future updates like this. :-)

PS.:
In the docu the DB volume is named weblate-docker_postgres-data but it's weblate_postgres-data.

image

image

@github-actions
Copy link

The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@nijel
Copy link
Member

nijel commented Oct 23, 2023

The volume name contains name of the directory where docker-compose files are. You've stored that in weblate, while the whole documentation uses weblate-docker here.

nijel added a commit to WeblateOrg/weblate that referenced this issue Oct 23, 2023
@ppfeufer
Copy link
Author

Ah I see, thanks for the clarification.

boginw pushed a commit to boginw/weblate-with-devops that referenced this issue Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants