Introduction
Terraform Enterprise (TFE) is not coming up after an upgrade and Docker containers keeps on restarting (loop).
Use Case
- Error showing below when checking logs
journalctl -u replicated
Failed to migrate retraced events: wait for retraced start: ensure retraced started: start postgres: ensure postgres ownership: mkdir /var/lib/replicated/retraced/postgres/run: mkdir /var/lib/replicated/retraced/postgres/run: permission denied
Solution
- Confirm permissions in /var/lib/replicated/retraced/postgres
It should be showing permissions docker:replicated
If that is not the case then it should be changed by following commandls -latr
total 16
drwxr-xr-x 4 replicated docker 4096 Jan 12 16:22 postgres
drwxr-xr-x 2 replicated docker 4096 Jan 12 16:22 api
drwxr-xr-x 4 replicated docker 4096 Jan 12 16:22 .
drwxr-xr-x 15 replicated docker 4096 Jan 12 16:23 .. -
cd /var/lib/replicated/retraced
chown -R replicated:docker postgres