mattermost-docker icon indicating copy to clipboard operation
mattermost-docker copied to clipboard

Database keeps restarting

Open asawatzki opened this issue 4 years ago • 9 comments

The database container keeps restarting after a new installation. Even if there is no volume mapped in docker-compose.yml file.

I'm using the default docker-compose.yml file from this repo:

db:
   build: db
   read_only: true
   restart: unless-stopped
   #volumes:
           #- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
           #- /etc/localtime:/etc/localtime:ro
   environment:
     - POSTGRES_USER=mmuser
     - POSTGRES_PASSWORD=mmuser_password
     - POSTGRES_DB=mattermost
   # uncomment the following to enable backup
   #  - AWS_ACCESS_KEY_ID=XXXX
   #  - AWS_SECRET_ACCESS_KEY=XXXX
   #  - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
   #  - AWS_REGION=us-east-1

asawatzki avatar Nov 20 '19 09:11 asawatzki

I'm seeing the same behavior, I'm using tag 5.16.3.

iwittkau avatar Nov 20 '19 11:11 iwittkau

It seems to be wal-e related. When I get rid of the whole wal-e stuff in db/entrypoint.sh, the container starts normal and even is able to import existing data.

My entrypoint.sh looks like

#!/bin/bash

if [ "$1" = 'postgres' ]; then
  # Run the postgresql entrypoint
  . /docker-entrypoint.sh
fi

asawatzki avatar Nov 20 '19 11:11 asawatzki

db_1   | LOG:  syntax error in file "/var/lib/postgresql/data/postgresql.conf" line 613, near end of line
db_1   | LOG:  syntax error in file "/var/lib/postgresql/data/postgresql.conf" line 614, near end of line
db_1   | LOG:  syntax error in file "/var/lib/postgresql/data/postgresql.conf" line 616, near end of line
db_1   | FATAL:  configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors

These correspond to some wal-e guff

Meatballs1 avatar Nov 20 '19 17:11 Meatballs1

@Meatballs1 I didn't see those

iwittkau avatar Nov 21 '19 07:11 iwittkau

I think the problem is related to an upgrade in postegres:9.4-alpine as hinted in #427

zaxtax avatar Nov 21 '19 23:11 zaxtax

I think the problem is related to an upgrade in postegres:9.4-alpine as hinted in #427

had the same issue, but downgrading to postgres:9.3-alpine seems to work

fphsFischmeister avatar Nov 28 '19 09:11 fphsFischmeister

I got it running with changeing one line in db/entrypoint.sh

# Run the postgresql entrypoint
exec /docker-entrypoint.sh $@

mcnilz avatar Dec 19 '19 08:12 mcnilz

is this resolved?

thomasf avatar Jan 26 '20 12:01 thomasf

I guess probably not since there is a fairly new comment here saying that it isn't working https://github.com/mattermost/mattermost-docker/issues/431

thomasf avatar Jan 26 '20 12:01 thomasf