删除整个 /var/discourse
,重新再 clone 一下,再配置,然后再执行 bootstrap 。结果还是如此,大体上没有任何改变。
[root@localhost discourse]# ./launcher bootstrap app
which: no docker.io in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
cd /pups && git pull && /pups/bin/pups --stdin
From https://github.com/SamSaffron/pups
ee8fdfb..4203610 master -> origin/master
Updating ee8fdfb..4203610
Fast-forward
README.md | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
I, [2015-03-30T11:00:15.836599 #42] INFO -- : Loading --stdin
I, [2015-03-30T11:00:15.846470 #42] INFO -- : > mkdir -p /shared/postgres_run
I, [2015-03-30T11:00:15.852813 #42] INFO -- :
I, [2015-03-30T11:00:15.853470 #42] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2015-03-30T11:00:15.860400 #42] INFO -- :
I, [2015-03-30T11:00:15.860784 #42] INFO -- : > chmod 775 /shared/postgres_run
I, [2015-03-30T11:00:15.867705 #42] INFO -- :
I, [2015-03-30T11:00:15.868340 #42] INFO -- : > rm -fr /var/run/postgresql
I, [2015-03-30T11:00:15.873265 #42] INFO -- :
I, [2015-03-30T11:00:15.873874 #42] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2015-03-30T11:00:15.877821 #42] INFO -- :
I, [2015-03-30T11:00:15.878350 #42] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2015/03/30 11:00:15 socat[50] E connect(4, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2015-03-30T11:00:15.886600 #42] INFO -- :
I, [2015-03-30T11:00:15.887408 #42] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2015-03-30T11:00:15.896167 #42] INFO -- :
I, [2015-03-30T11:00:15.896964 #42] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2015-03-30T11:00:15.904028 #42] INFO -- :
I, [2015-03-30T11:00:15.904578 #42] INFO -- : > mkdir -p /shared/postgres_run/9.3-main.pg_stat_tmp
I, [2015-03-30T11:00:15.910201 #42] INFO -- :
I, [2015-03-30T11:00:15.910781 #42] INFO -- : > chown postgres:postgres /shared/postgres_run/9.3-main.pg_stat_tmp
I, [2015-03-30T11:00:15.916675 #42] INFO -- :
I, [2015-03-30T11:00:15.924631 #42] INFO -- : File > /etc/service/postgres/run chmod: +x
I, [2015-03-30T11:00:15.932338 #42] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x
I, [2015-03-30T11:00:15.939798 #42] INFO -- : File > /root/upgrade_postgres chmod: +x
I, [2015-03-30T11:00:15.941486 #42] INFO -- : > chown -R root /var/lib/postgresql/9.3/main
I, [2015-03-30T11:00:15.958284 #42] INFO -- :
I, [2015-03-30T11:00:15.958464 #42] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.3/bin/initdb -D /shared/postgres_data || exit 0
LOG: could not link file "pg_xlog/xlogtemp.75" to "pg_xlog/000000010000000000000001" (initialization of log file): Operation not permitted
FATAL: could not open file "pg_xlog/000000010000000000000001": No such file or directory
child process exited with exit code 1
initdb: removing contents of data directory "/shared/postgres_data"
I, [2015-03-30T11:00:16.931054 #42] INFO -- : The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /shared/postgres_data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
creating configuration files ... ok
creating template1 database in /shared/postgres_data/base/1 ...
I, [2015-03-30T11:00:16.931213 #42] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2015-03-30T11:00:16.938122 #42] INFO -- :
I, [2015-03-30T11:00:16.939521 #42] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2015-03-30T11:00:16.942771 #42] INFO -- :
I, [2015-03-30T11:00:16.943140 #42] INFO -- : > /root/upgrade_postgres
cat: /shared/postgres_data/PG_VERSION: No such file or directory
/root/upgrade_postgres: line 2: [: 9.2: unary operator expected
I, [2015-03-30T11:00:16.952130 #42] INFO -- :
I, [2015-03-30T11:00:16.952691 #42] INFO -- : > rm /root/upgrade_postgres
I, [2015-03-30T11:00:16.955945 #42] INFO -- :
I, [2015-03-30T11:00:16.956897 #42] INFO -- : Replacing data_directory = '/var/lib/postgresql/9.3/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.961104 #42] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.963208 #42] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.964087 #42] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.965872 #42] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.968017 #42] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.970049 #42] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2015-03-30T11:00:16.980307 #42] INFO -- :
I, [2015-03-30T11:00:16.980636 #42] INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = 4 in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.981505 #42] INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = hot_standby in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-30T11:00:16.984285 #42] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.3/main/pg_hba.conf
I, [2015-03-30T11:00:16.985123 #42] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.3/main/pg_hba.conf
I, [2015-03-30T11:00:16.992584 #42] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main
I, [2015-03-30T11:00:17.009260 #42] INFO -- : > sleep 5
2015-03-30 11:00:17 UTC [82-1] FATAL: data directory "/shared/postgres_data" has wrong ownership
2015-03-30 11:00:17 UTC [82-2] HINT: The server must be started by the user that owns the data directory.
I, [2015-03-30T11:00:22.022851 #42] INFO -- :
I, [2015-03-30T11:00:22.025170 #42] INFO -- : > su postgres -c 'createdb discourse' || true
createdb: could not connect to database template1: 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, [2015-03-30T11:00:22.150938 #42] INFO -- :
I, [2015-03-30T11:00:22.152425 #42] 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, [2015-03-30T11:00:22.238497 #42] INFO -- :
I, [2015-03-30T11:00:22.239258 #42] 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, [2015-03-30T11:00:22.339785 #42] INFO -- :
I, [2015-03-30T11:00:22.340677 #42] 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"?
FAILED
--------------------
RuntimeError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 108 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
I, [2015-03-30T11:00:22.472859 #42] INFO -- :
I, [2015-03-30T11:00:22.473266 #42] INFO -- : Terminating async processes
1071df84c1b6ec1289442814df4d26a4af2efa2f450e177c0424b4791eb1f49d
FAILED TO BOOTSTRAP
[root@localhost discourse]#
稍等,我用软件为电脑全局翻墙后再试试。
补充:
还是失败了。
我准备在美国 IP 的网络下从头开始,再装一次:
这次,从电脑开机开始(我重启电脑,一切从头开始。)。
路由器也重启换一下 IP。
vagrant 也重新建。