AdventureLookup / adventurelookup-backend

Platform, Framework, Database software
GNU General Public License v3.0
28 stars 7 forks source link

Postgres container can't be initialized, because of permission errors in its data volume #13

Closed pejter closed 2 years ago

pejter commented 8 years ago

Refer to #10 for details.

pejter commented 8 years ago

@cpnielsen You were saying you have a fix pending for this?

probably-not-a-cat commented 8 years ago

Here's the output from docker-compose logs --tail=20

~/D/p/adventurelookup-backend (master) $ docker-compose logs --tail=20
Attaching to adventurelookup_nginx_1, adventurelookup_web_1, adventurelookup_postgres_1
nginx_1     | 2016/05/24 16:36:49 [warn] 1#1: conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | 2016/05/24 16:39:50 [warn] 1#1: conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | 2016/05/24 16:40:48 [warn] 1#1: conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | 2016/05/24 17:25:28 [warn] 1#1: conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | 2016/05/24 17:30:53 [warn] 1#1: conflicting server name "localhost" on 0.0.0.0:80, ignored
nginx_1     | nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored
postgres_1  | The default database encoding has accordingly been set to "UTF8".
postgres_1  | The default text search configuration will be set to "english".
postgres_1  | 
postgres_1  | Data page checksums are disabled.
postgres_1  | 
postgres_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres_1  | initdb: could not create directory "/var/lib/postgresql/data/pg_xlog": Permission denied
postgres_1  | initdb: removing contents of data directory "/var/lib/postgresql/data"
postgres_1  | The files belonging to this database system will be owned by user "postgres".
postgres_1  | This user must also own the server process.
postgres_1  | 
postgres_1  | The database cluster will be initialized with locale "en_US.utf8".
postgres_1  | The default database encoding has accordingly been set to "UTF8".
postgres_1  | The default text search configuration will be set to "english".
postgres_1  | 
postgres_1  | Data page checksums are disabled.
postgres_1  | 
postgres_1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
postgres_1  | initdb: could not create directory "/var/lib/postgresql/data/pg_xlog": Permission denied
postgres_1  | initdb: removing contents of data directory "/var/lib/postgresql/data"
web_1       |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/base/base.py", line 199, in ensure_connection
web_1       |     self.connect()
web_1       |   File "/usr/local/lib/python3.5/site-packages/django/db/utils.py", line 95, in __exit__
web_1       |     six.reraise(dj_exc_type, dj_exc_value, traceback)
web_1       |   File "/usr/local/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
web_1       |     raise value.with_traceback(tb)
web_1       |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/base/base.py", line 199, in ensure_connection
web_1       |     self.connect()
web_1       |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/base/base.py", line 171, in connect
web_1       |     self.connection = self.get_new_connection(conn_params)
web_1       |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/postgresql/base.py", line 175, in get_new_connection
web_1       |     connection = Database.connect(**conn_params)
web_1       |   File "/usr/local/lib/python3.5/site-packages/psycopg2/__init__.py", line 164, in connect
web_1       |     conn = _connect(dsn, connection_factory=connection_factory, async=async)
web_1       | django.db.utils.OperationalError: could not connect to server: Connection refused
web_1       |   Is the server running on host "postgres" (172.18.0.2) and accepting
web_1       |   TCP/IP connections on port 5432?
web_1       | 
web_1       | Not Found: /static/admin/css/base.css
web_1       | Not Found: /static/admin/css/login.css