I’m getting this weird error when trying to install Discourse with the Docker for Mac beta (1.12.0.rc4-beta20).
Configuration file at containers/app.yml updated successfully!
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2016-07-21T23:56:24.814199 #13] INFO -- : Loading --stdin
I, [2016-07-21T23:56:24.831479 #13] INFO -- : > mkdir -p /shared/postgres_run
I, [2016-07-21T23:56:24.839254 #13] INFO -- :
I, [2016-07-21T23:56:24.841497 #13] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2016-07-21T23:56:24.844732 #13] INFO -- :
I, [2016-07-21T23:56:24.845921 #13] INFO -- : > chmod 775 /shared/postgres_run
I, [2016-07-21T23:56:24.848429 #13] INFO -- :
I, [2016-07-21T23:56:24.850001 #13] INFO -- : > rm -fr /var/run/postgresql
I, [2016-07-21T23:56:24.869029 #13] INFO -- :
I, [2016-07-21T23:56:24.871336 #13] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2016-07-21T23:56:24.878039 #13] INFO -- :
I, [2016-07-21T23:56:24.879535 #13] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2016/07/21 23:56:24 socat[21] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2016-07-21T23:56:24.973504 #13] INFO -- :
I, [2016-07-21T23:56:24.974745 #13] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2016-07-21T23:56:24.982077 #13] INFO -- :
I, [2016-07-21T23:56:24.983157 #13] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2016-07-21T23:56:24.986234 #13] INFO -- :
I, [2016-07-21T23:56:24.987074 #13] INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2016-07-21T23:56:24.989457 #13] INFO -- :
I, [2016-07-21T23:56:24.990890 #13] INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2016-07-21T23:56:24.994866 #13] INFO -- :
I, [2016-07-21T23:56:25.003133 #13] INFO -- : File > /etc/service/postgres/run chmod: +x
I, [2016-07-21T23:56:25.015924 #13] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x
I, [2016-07-21T23:56:25.024015 #13] INFO -- : File > /root/upgrade_postgres chmod: +x
I, [2016-07-21T23:56:25.026223 #13] INFO -- : > chown -R root /var/lib/postgresql/9.5/main
I, [2016-07-21T23:56:27.661364 #13] INFO -- :
I, [2016-07-21T23:56:27.662257 #13] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.5/bin/initdb -D /shared/postgres_data || exit 0
I, [2016-07-21T23:56:27.665585 #13] INFO -- :
I, [2016-07-21T23:56:27.666157 #13] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2016-07-21T23:56:27.698660 #13] INFO -- :
I, [2016-07-21T23:56:27.700162 #13] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2016-07-21T23:56:27.703442 #13] INFO -- :
I, [2016-07-21T23:56:27.704913 #13] INFO -- : > /root/upgrade_postgres
I, [2016-07-21T23:56:27.723702 #13] INFO -- :
I, [2016-07-21T23:56:27.724786 #13] INFO -- : > rm /root/upgrade_postgres
I, [2016-07-21T23:56:27.728961 #13] INFO -- :
I, [2016-07-21T23:56:27.735600 #13] INFO -- : Replacing data_directory = '/var/lib/postgresql/9.5/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.736947 #13] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.745604 #13] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.777198 #13] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.793671 #13] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.806055 #13] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.816741 #13] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2016-07-21T23:56:27.890443 #13] INFO -- :
I, [2016-07-21T23:56:27.910964 #13] INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.913801 #13] INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.927465 #13] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.939119 #13] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.945349 #13] INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.5/main/postgresql.conf
I, [2016-07-21T23:56:27.952162 #13] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.5/main/pg_hba.conf
I, [2016-07-21T23:56:27.954642 #13] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.5/main/pg_hba.conf
I, [2016-07-21T23:56:27.956999 #13] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2016-07-21T23:56:27.959945 #13] INFO -- : > sleep 5
2016-07-21 23:56:28 UTC [45-1] LOG: database system was interrupted; last known up at 2016-07-10 02:35:20 UTC
2016-07-21 23:56:28 UTC [45-2] LOG: unexpected pageaddr 0/2C4C000 in log segment 000000010000000000000004, offset 12894208
2016-07-21 23:56:28 UTC [45-3] LOG: invalid primary checkpoint record
2016-07-21 23:56:28 UTC [45-4] LOG: unexpected pageaddr 0/2C4A000 in log segment 000000010000000000000004, offset 12886016
2016-07-21 23:56:28 UTC [45-5] LOG: invalid secondary checkpoint record
2016-07-21 23:56:28 UTC [45-6] PANIC: could not locate a valid checkpoint record
2016-07-21 23:56:28 UTC [42-1] LOG: startup process (PID 45) was terminated by signal 6: Aborted
2016-07-21 23:56:28 UTC [42-2] LOG: aborting startup due to startup process failure
I, [2016-07-21T23:56:32.973968 #13] INFO -- :
I, [2016-07-21T23:56:32.975367 #13] INFO -- : > su postgres -c 'createdb discourse' || true
createdb: could not connect to database template1: FATAL: the database system is starting up
I, [2016-07-21T23:56:33.703344 #13] INFO -- :
I, [2016-07-21T23:56:33.704885 #13] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2016-07-21T23:56:33.982860 #13] INFO -- :
I, [2016-07-21T23:56:33.983160 #13] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2016-07-21T23:56:34.139039 #13] INFO -- :
I, [2016-07-21T23:56:34.140696 #13] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2016-07-21T23:56:34.289257 #13] INFO -- :
I, [2016-07-21T23:56:34.290981 #13] INFO -- : Terminating async processes
FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 69 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
aebe5563b0ea992b00dd982cd4169433eec01fabf5b6293d49d05f728ce8b027
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
I’m not sure if it’s a Docker thing, or if I’m just doing something wrong. Anybody?