Advertisement
Guest User

Discourse rebuild error: the database system is starting up

a guest
May 28th, 2015
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.51 KB | None | 0 0
  1. # ./launcher rebuild discourse
  2. which: no docker.io in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
  3. Ensuring discourse docker is up to date
  4. Fetching origin
  5. Discourse Docker is up-to-date
  6. Stopping old container
  7. + /usr/bin/docker stop -t 10 discourse
  8. discourse
  9. cd /pups && git pull && /pups/bin/pups --stdin
  10. From https://github.com/SamSaffron/pups
  11.    8d972ab..7d741e1  master     -> origin/master
  12. Updating 8d972ab..7d741e1
  13. Fast-forward
  14.  README.md | 16 ++++++++++++++++
  15.  1 file changed, 16 insertions(+)
  16. I, [2015-05-28T10:34:03.372918 #48]  INFO -- : Loading --stdin
  17. I, [2015-05-28T10:34:03.375957 #48]  INFO -- : > mkdir -p /shared/postgres_run
  18. I, [2015-05-28T10:34:03.377588 #48]  INFO -- :
  19. I, [2015-05-28T10:34:03.377948 #48]  INFO -- : > chown postgres:postgres /shared/postgres_run
  20. I, [2015-05-28T10:34:03.379225 #48]  INFO -- :
  21. I, [2015-05-28T10:34:03.379725 #48]  INFO -- : > chmod 775 /shared/postgres_run
  22. I, [2015-05-28T10:34:03.381061 #48]  INFO -- :
  23. I, [2015-05-28T10:34:03.381543 #48]  INFO -- : > rm -fr /var/run/postgresql
  24. I, [2015-05-28T10:34:03.382887 #48]  INFO -- :
  25. I, [2015-05-28T10:34:03.383380 #48]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
  26. I, [2015-05-28T10:34:03.384758 #48]  INFO -- :
  27. I, [2015-05-28T10:34:03.385206 #48]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
  28. 2015/05/28 10:34:03 socat[56] E connect(4, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
  29. I, [2015-05-28T10:34:03.387421 #48]  INFO -- :
  30. I, [2015-05-28T10:34:03.387708 #48]  INFO -- : > rm -fr /shared/postgres_run/.s*
  31. I, [2015-05-28T10:34:03.389428 #48]  INFO -- :
  32. I, [2015-05-28T10:34:03.389736 #48]  INFO -- : > rm -fr /shared/postgres_run/*.pid
  33. I, [2015-05-28T10:34:03.391189 #48]  INFO -- :
  34. I, [2015-05-28T10:34:03.391535 #48]  INFO -- : > mkdir -p /shared/postgres_run/9.3-main.pg_stat_tmp
  35. I, [2015-05-28T10:34:03.392664 #48]  INFO -- :
  36. I, [2015-05-28T10:34:03.392991 #48]  INFO -- : > chown postgres:postgres /shared/postgres_run/9.3-main.pg_stat_tmp
  37. I, [2015-05-28T10:34:03.394252 #48]  INFO -- :
  38. I, [2015-05-28T10:34:03.396879 #48]  INFO -- : File > /etc/service/postgres/run  chmod: +x
  39. I, [2015-05-28T10:34:03.399447 #48]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x
  40. I, [2015-05-28T10:34:03.402050 #48]  INFO -- : File > /root/upgrade_postgres  chmod: +x
  41. I, [2015-05-28T10:34:03.402906 #48]  INFO -- : > chown -R root /var/lib/postgresql/9.3/main
  42. I, [2015-05-28T10:34:03.405810 #48]  INFO -- :
  43. I, [2015-05-28T10:34:03.405869 #48]  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
  44. I, [2015-05-28T10:34:03.406954 #48]  INFO -- :
  45. I, [2015-05-28T10:34:03.406998 #48]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
  46. I, [2015-05-28T10:34:03.882268 #48]  INFO -- :
  47. I, [2015-05-28T10:34:03.882424 #48]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
  48. I, [2015-05-28T10:34:03.884181 #48]  INFO -- :
  49. I, [2015-05-28T10:34:03.884698 #48]  INFO -- : > /root/upgrade_postgres
  50. I, [2015-05-28T10:34:03.887300 #48]  INFO -- :
  51. I, [2015-05-28T10:34:03.887611 #48]  INFO -- : > rm /root/upgrade_postgres
  52. I, [2015-05-28T10:34:03.888849 #48]  INFO -- :
  53. I, [2015-05-28T10:34:03.888970 #48]  INFO -- : Replacing data_directory = '/var/lib/postgresql/9.3/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.3/main/postgresql.conf
  54. I, [2015-05-28T10:34:03.889408 #48]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
  55. I, [2015-05-28T10:34:04.790641 #48]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.3/main/postgresql.conf
  56. I, [2015-05-28T10:34:05.880818 #48]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.3/main/postgresql.conf
  57. I, [2015-05-28T10:34:06.443334 #48]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.3/main/postgresql.conf
  58. I, [2015-05-28T10:34:06.907986 #48]  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
  59. I, [2015-05-28T10:34:07.455097 #48]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
  60. I, [2015-05-28T10:34:07.457531 #48]  INFO -- :
  61. I, [2015-05-28T10:34:07.457710 #48]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.3/main/postgresql.conf
  62. I, [2015-05-28T10:34:08.176993 #48]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.3/main/postgresql.conf
  63. I, [2015-05-28T10:34:09.242463 #48]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.3/main/postgresql.conf
  64. I, [2015-05-28T10:34:09.938451 #48]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.3/main/postgresql.conf
  65. I, [2015-05-28T10:34:10.456631 #48]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.3/main/postgresql.conf
  66. I, [2015-05-28T10:34:12.341850 #48]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/9.3/main/pg_hba.conf
  67. I, [2015-05-28T10:34:12.342248 #48]  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
  68. I, [2015-05-28T10:34:12.351432 #48]  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
  69. I, [2015-05-28T10:34:12.361424 #48]  INFO -- : > sleep 5
  70. I, [2015-05-28T10:34:17.363332 #48]  INFO -- :
  71. I, [2015-05-28T10:34:17.363914 #48]  INFO -- : > su postgres -c 'createdb discourse' || true
  72. 2015-05-28 10:34:18 UTC [83-1] LOG:  database system was shut down at 2015-05-28 10:31:41 UTC
  73. 2015-05-28 10:34:18 UTC [84-1] postgres@postgres FATAL:  the database system is starting up
  74. 2015-05-28 10:34:18 UTC [85-1] postgres@template1 FATAL:  the database system is starting up
  75. createdb: could not connect to database template1: FATAL:  the database system is starting up
  76. I, [2015-05-28T10:34:18.852345 #48]  INFO -- :
  77. I, [2015-05-28T10:34:18.853083 #48]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
  78. 2015-05-28 10:34:18 UTC [96-1] postgres@discourse FATAL:  the database system is starting up
  79. psql: FATAL:  the database system is starting up
  80. I, [2015-05-28T10:34:18.882284 #48]  INFO -- :
  81. I, [2015-05-28T10:34:18.882856 #48]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
  82. 2015-05-28 10:34:18 UTC [107-1] postgres@discourse FATAL:  the database system is starting up
  83. psql: FATAL:  the database system is starting up
  84. I, [2015-05-28T10:34:18.910570 #48]  INFO -- :
  85. I, [2015-05-28T10:34:18.911116 #48]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
  86. 2015-05-28 10:34:18 UTC [118-1] postgres@discourse FATAL:  the database system is starting up
  87. psql: FATAL:  the database system is starting up
  88. I, [2015-05-28T10:34:18.940385 #48]  INFO -- :
  89. I, [2015-05-28T10:34:18.940639 #48]  INFO -- : Terminating async processes
  90. I, [2015-05-28T10:34:18.940686 #48]  INFO -- : Sending INT to 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 pid: 77
  91. 2015-05-28 10:34:18 UTC [77-1] LOG:  received fast shutdown request
  92. 2015-05-28 10:34:19 UTC [121-1] LOG:  shutting down
  93. 2015-05-28 10:34:24 UTC [121-2] LOG:  database system is shut down
  94.  
  95.  
  96. FAILED
  97. --------------------
  98. RuntimeError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 108 exit 2>
  99. Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
  100. exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
  101. 87a5d6aeff98d3c44fb9b3aeed6bb2c592cdf3efcfc9462ea0f90efd44f8aa23
  102. FAILED TO BOOTSTRAP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement