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

Won't start after update #261

Open
sgialexa opened this issue Dec 11, 2024 · 3 comments
Open

Won't start after update #261

sgialexa opened this issue Dec 11, 2024 · 3 comments

Comments

@sgialexa
Copy link

Hi, I've just updated Datalens and it won't correctly start after update. GUI opens but w/o projects with:
An unexpected error has occurred. Try to refresh the page in a few moments.
ECONNREFUSED
{
"title": "Error",
"description": "An unexpected error has occurred. Try to refresh the page in a few moments."
}

Also found in startup logs:
datalens-pg-us |
datalens-pg-us | PostgreSQL Database directory appears to contain a database; Skipping initialization
datalens-pg-us |
datalens-pg-us | 2024-12-11 09:14:26.300 UTC [1] FATAL: database files are incompatible with server
datalens-pg-us | 2024-12-11 09:14:26.300 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 16.6.
datalens-pg-demo-connection |
datalens-pg-demo-connection | PostgreSQL Database directory appears to contain a database; Skipping initialization
datalens-pg-demo-connection |
datalens-pg-demo-connection | 2024-12-11 09:14:26.441 UTC [1] FATAL: database files are incompatible with server
datalens-pg-demo-connection | 2024-12-11 09:14:26.441 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 16.6.
datalens-pg-us exited with code 1
datalens-pg-demo-connection exited with code 1

Seems could be problem because of new PostgreSQL?
Pls. find startup log attached.
Many thanks in advance.
dl-startup-log-11dec24-1.txt

@Marginy605
Copy link
Contributor

@sgialexa, hi! Could you provide us more details about version of release https://github.com/datalens-tech/datalens/releases ?

@sgialexa
Copy link
Author

It's the latest - I've updated today with
docker compose down
git pull
docker compose up

@goshander
Copy link
Contributor

Hi @sgialexa, you can downgrade your postgres version in compose file to version 13 for pg-us container or make upgrade

// stop compose deployment
docker compose stop

// run old postgres server
docker run -d --name pg-us-old -v ./metadata:/var/lib/postgresql/data postgres:13-alpine

// make dump
docker exec pg-us-old pg_dump -d us-db-ci_purgeable -U us > dump.sql

// stop and remove old postgres server
docker stop pg-us-old && docker rm pg-us-old

// mv current postgres metadata to different folder
mv ./metadata ./metadata-old

// up compose deployment
docker compose up -d

// restore backup to new version from dump
docker compose exec pg-us pg_restore -U us -v -d us-db-ci_purgeable < ./dump.sql

// up all compose services
docker compose up -d

Please do not remove ./metadata-old folder before you check the entire system after recovery

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

No branches or pull requests

3 participants