Applicable to:
- SolusVM 2
Symptoms
- SolusVM 2 UI is unavailable
- Postgresql container in the docker stack fails to start. The following error is displayed in the service log:
# docker service logs solus_postgresql
...
PANIC: could not locate a valid checkpoint record
Cause
PostgreSQL database is corrupted.
Resolution
- Connect to SolusVM 2 management node via SSH
- Backup SolusVM 2
- Stop solus stack:
# docker stack rm solus
- Find the postgresql image ID:
# docker image ls | grep postgres | awk {'print $3'}
d029edc38682 - Started a temporary container with the image ID from step 3:
# docker run -it --rm --entrypoint /bin/bash -v /usr/local/solus/postgresql/12/data:/var/lib/postgresql/data <IMAGE ID>
where <IMAGE ID> is the corresponding postgresql image ID from step 3. For example:
# docker run -it --rm --entrypoint /bin/bash -v /usr/local/solus/postgresql/12/data:/var/lib/postgresql/data d029edc38682
- Impersonate as the user 'postgres':
# su postgres
- Regenerate the entrypoint with the command:
# pg_resetwal -f /var/lib/postgresql/data
- Exit the container by pressing 'CTRL +D' on keyboard twice.
- Restart docker and start 'solus' stack:
# service docker restart && docker stack deploy --with-registry-auth -c /usr/local/solus/config/stack.yml solus
Comments
0 commentsPlease sign in to leave a comment.