# Forum offline vanwege mislukte herbouw op Tests-Pass

**URL:** https://meta.discourse.org/t/forum-offline-due-to-failed-rebuilds-on-tests-pass/173019
**Category:** Self-hosting
**Created:** [11 december 2020 om 18:44 UTC](https://meta.discourse.org/t/forum-offline-due-to-failed-rebuilds-on-tests-pass/173019 "2020-12-11T18:44:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [11 december 2020 om 18:44 UTC](https://meta.discourse.org/t/forum-offline-due-to-failed-rebuilds-on-tests-pass/173019/1 "2020-12-11T18:44:18Z")

</div>

Continuing the discussion from [PostgreSQL 13 update](https://meta.discourse.org/t/postgresql-13-update/172563/27):

Run into trouble while updating 2.7.0beta1 Tests-Pass in order to remove some troublesome [plugins](https://meta.discourse.org/t/babble-a-chat-plugin/87297).

> [@PostgreSQL 13 update](https://meta.discourse.org/t/postgresql-13-update/172563/1):
>
> If you need to postpone the update during your next rebuild, you can swap the PostgreSQL template on your app.yml file by changing `"templates/postgres.template.yml"` to `"templates/postgres.12.template.yml"` .

I edited our app.yml to remain on PostgreSQL 12. Rebuild failed and I’m seeing:

```plaintext
FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 1637 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
I, [2020-12-11T18:36:32.257585 #1] INFO -- : Terminating async processes
df2fcc37c368d13eac3b4a6db4b592028405a0ea91ff39fb8cbb8bcbdc4846fd
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

> **Full Log**
>
> $ sudo ./launcher rebuild app  
> Ensuring launcher is up to date  
> Fetching origin  
> Launcher is up-to-date  
> Stopping old container
> 
> - /usr/bin/docker stop -t 60 app  
> app  
> cd /pups && git pull && /pups/bin/pups --stdin  
> Already up to date.  
> I, [2020-12-11T18:35:42.128663 #1] INFO – : Loading --stdin  
> I, [2020-12-11T18:35:42.145184 #1] INFO – : \> DEBIAN\_FRONTEND=noninteractive apt-get purge -y postgresql-13 postgresql-client-13 postgresql-contrib-13  
> I, [2020-12-11T18:35:47.812698 #1] INFO – : Reading package lists…  
> Building dependency tree…  
> Reading state information…  
> The following packages were automatically installed and are no longer required:  
> libllvm7 pgdg-keyring postgresql-client-common postgresql-common ssl-cert  
> Use ‘apt autoremove’ to remove them.  
> The following packages will be REMOVED:  
> postgresql-13\* postgresql-client-13\*  
> 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.  
> After this operation, 54.3 MB disk space will be freed.  
> (Reading database … 43863 files and directories currently installed.)  
> Removing postgresql-13 (13.1-1.pgdg100+1) …  
> invoke-rc.d: could not determine current runlevel  
> invoke-rc.d: policy-rc.d denied execution of stop.  
> Removing postgresql-client-13 (13.1-1.pgdg100+1) …  
> Processing triggers for postgresql-common (223.pgdg100+1) …  
> Building PostgreSQL dictionaries from installed myspell/hunspell packages…  
> Removing obsolete dictionary files:  
> (Reading database … 42050 files and directories currently installed.)  
> Purging configuration files for postgresql-13 (13.1-1.pgdg100+1) …  
> Dropping cluster main…
> 
> I, [2020-12-11T18:35:47.813593 #1] INFO – : \> apt-get update && apt-get install -y postgresql-12 postgresql-client-12 postgresql-contrib-12  
> debconf: delaying package configuration, since apt-utils is not installed  
> I, [2020-12-11T18:36:26.125598 #1] INFO – : Get:1 [Index of /pub/repos/apt/](http://apt.postgresql.org/pub/repos/apt) buster-pgdg InRelease [104 kB]  
> Get:2 [Index of /debian-security](http://security.debian.org/debian-security) buster/updates InRelease [65.4 kB]  
> Hit:3 [Index of /debian](http://deb.debian.org/debian) buster InRelease  
> Get:4 [Index of /debian](http://deb.debian.org/debian) buster-updates InRelease [51.9 kB]  
> Hit:5 [https://deb.nodesource.com/node\_10.x](https://deb.nodesource.com/node_10.x) buster InRelease  
> Get:6 [Index of /pub/repos/apt/](http://apt.postgresql.org/pub/repos/apt) buster-pgdg/main amd64 Packages [216 kB]  
> Get:7 [Index of /debian-security](http://security.debian.org/debian-security) buster/updates/main amd64 Packages [254 kB]  
> Fetched 690 kB in 2s (342 kB/s)  
> Reading package lists…  
> Reading package lists…  
> Building dependency tree…  
> Reading state information…  
> Suggested packages:  
> postgresql-doc-12  
> The following NEW packages will be installed:  
> postgresql-12 postgresql-client-12  
> 0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.  
> Need to get 16.1 MB of archives.  
> After this operation, 54.0 MB of additional disk space will be used.  
> Get:1 [Index of /pub/repos/apt/](http://apt.postgresql.org/pub/repos/apt) buster-pgdg/main amd64 postgresql-client-12 amd64 12.5-1.pgdg100+1 [1,422 kB]  
> Get:2 [Index of /pub/repos/apt/](http://apt.postgresql.org/pub/repos/apt) buster-pgdg/main amd64 postgresql-12 amd64 12.5-1.pgdg100+1 [14.7 MB]  
> Fetched 16.1 MB in 5s (3,052 kB/s)  
> Selecting previously unselected package postgresql-client-12.  
> (Reading database … 42050 files and directories currently installed.)  
> Preparing to unpack …/postgresql-client-12\_12.5-1.pgdg100+1\_amd64.deb …  
> Unpacking postgresql-client-12 (12.5-1.pgdg100+1) …  
> Selecting previously unselected package postgresql-12.  
> Preparing to unpack …/postgresql-12\_12.5-1.pgdg100+1\_amd64.deb …  
> Unpacking postgresql-12 (12.5-1.pgdg100+1) …  
> Setting up postgresql-client-12 (12.5-1.pgdg100+1) …  
> update-alternatives: using /usr/share/postgresql/12/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode  
> Setting up postgresql-12 (12.5-1.pgdg100+1) …  
> Creating new PostgreSQL cluster 12/main …  
> /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/main --auth-local peer --auth-host md5  
> 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 “C.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 /var/lib/postgresql/12/main … ok  
> creating subdirectories … ok  
> selecting dynamic shared memory implementation … posix  
> selecting default max\_connections … 100  
> selecting default shared\_buffers … 128MB  
> selecting default time zone … Etc/UTC  
> creating configuration files … ok  
> running bootstrap script … ok  
> performing post-bootstrap initialization … ok  
> syncing data to disk … ok
> 
> Success. You can now start the database server using:
> 
> ```
> pg_ctlcluster 12 main start
> 
> ```
> 
> Ver Cluster Port Status Owner Data directory Log file  
> 12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log  
> update-alternatives: using /usr/share/postgresql/12/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode  
> invoke-rc.d: could not determine current runlevel  
> invoke-rc.d: policy-rc.d denied execution of start.  
> Processing triggers for postgresql-common (223.pgdg100+1) …  
> Building PostgreSQL dictionaries from installed myspell/hunspell packages…  
> Removing obsolete dictionary files:
> 
> I, [2020-12-11T18:36:26.126230 #1] INFO – : \> mkdir -p /shared/postgres\_run  
> I, [2020-12-11T18:36:26.135185 #1] INFO – :  
> I, [2020-12-11T18:36:26.135798 #1] INFO – : \> chown postgres:postgres /shared/postgres\_run  
> I, [2020-12-11T18:36:26.146730 #1] INFO – :  
> I, [2020-12-11T18:36:26.147724 #1] INFO – : \> chmod 775 /shared/postgres\_run  
> I, [2020-12-11T18:36:26.161275 #1] INFO – :  
> I, [2020-12-11T18:36:26.162652 #1] INFO – : \> rm -fr /var/run/postgresql  
> I, [2020-12-11T18:36:26.175256 #1] INFO – :  
> I, [2020-12-11T18:36:26.176159 #1] INFO – : \> ln -s /shared/postgres\_run /var/run/postgresql  
> I, [2020-12-11T18:36:26.184044 #1] INFO – :  
> I, [2020-12-11T18:36:26.184889 #1] INFO – : \> socat /dev/null UNIX-CONNECT:/shared/postgres\_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1  
> 2020/12/11 18:36:26 socat[1595] E connect(6, AF=1 “/shared/postgres\_run/.s.PGSQL.5432”, 36): No such file or directory  
> I, [2020-12-11T18:36:26.198536 #1] INFO – :  
> I, [2020-12-11T18:36:26.198946 #1] INFO – : \> rm -fr /shared/postgres\_run/.s\*  
> I, [2020-12-11T18:36:26.213075 #1] INFO – :  
> I, [2020-12-11T18:36:26.217247 #1] INFO – : \> rm -fr /shared/postgres\_run/_.pid  
> I, [2020-12-11T18:36:26.234701 #1] INFO – :  
> I, [2020-12-11T18:36:26.235766 #1] INFO – : \> mkdir -p /shared/postgres\_run/12-main.pg\_stat\_tmp  
> I, [2020-12-11T18:36:26.252691 #1] INFO – :  
> I, [2020-12-11T18:36:26.253254 #1] INFO – : \> chown postgres:postgres /shared/postgres\_run/12-main.pg\_stat\_tmp  
> I, [2020-12-11T18:36:26.265460 #1] INFO – :  
> I, [2020-12-11T18:36:26.305117 #1] INFO – : File \> /etc/service/postgres/run chmod: +x chown:  
> I, [2020-12-11T18:36:26.340226 #1] INFO – : File \> /etc/runit/3.d/99-postgres chmod: +x chown:  
> I, [2020-12-11T18:36:26.341055 #1] INFO – : \> chown -R root /var/lib/postgresql/12/main  
> I, [2020-12-11T18:36:26.395341 #1] INFO – :  
> I, [2020-12-11T18:36:26.397567 #1] INFO – : \> [! -e /shared/postgres\_data] && install -d -m 0755 -o postgres -g postgres /shared/postgres\_data && sudo -E -u postgres /usr/lib/postgresql/12/bin/initdb -D /shared/postgres\_data || exit 0  
> I, [2020-12-11T18:36:26.410438 #1] INFO – :  
> I, [2020-12-11T18:36:26.410620 #1] INFO – : \> chown -R postgres:postgres /shared/postgres\_data  
> I, [2020-12-11T18:36:26.483230 #1] INFO – :  
> I, [2020-12-11T18:36:26.483480 #1] INFO – : \> chown -R postgres:postgres /var/run/postgresql  
> I, [2020-12-11T18:36:26.498060 #1] INFO – :  
> I, [2020-12-11T18:36:26.498607 #1] INFO – : Replacing data\_directory = ‘/var/lib/postgresql/12/main’ with data\_directory = ‘/shared/postgres\_data’ in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.499830 #1] INFO – : Replacing (?-mix:#?listen\_addresses =.) with listen\_addresses = '_’ in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.501216 #1] INFO – : Replacing (?-mix:#?synchronous\_commit _=._) with synchronous\_commit = $db\_synchronous\_commit in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.503288 #1] INFO – : Replacing (?-mix:#?shared\_buffers _=._) with shared\_buffers = $db\_shared\_buffers in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.503960 #1] INFO – : Replacing (?-mix:#?work\_mem _=._) with work\_mem = $db\_work\_mem in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.505121 #1] INFO – : Replacing (?-mix:#?default\_text\_search\_config _=._) with default\_text\_search\_config = ‘$db\_default\_text\_search\_config’ in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.509117 #1] INFO – : \> install -d -m 0755 -o postgres -g postgres /shared/postgres\_backup  
> I, [2020-12-11T18:36:26.529609 #1] INFO – :  
> I, [2020-12-11T18:36:26.530771 #1] INFO – : Replacing (?-mix:#?checkpoint\_segments _=._) with checkpoint\_segments = $db\_checkpoint\_segments in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.533329 #1] INFO – : Replacing (?-mix:#?logging\_collector _=._) with logging\_collector = $db\_logging\_collector in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.534342 #1] INFO – : Replacing (?-mix:#?log\_min\_duration\_statement _=._) with log\_min\_duration\_statement = $db\_log\_min\_duration\_statement in /etc/postgresql/12/main/postgresql.conf  
> I, [2020-12-11T18:36:26.535368 #1] INFO – : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/12/main/pg\_hba.conf  
> I, [2020-12-11T18:36:26.536115 #1] INFO – : Replacing (?-mix:^host.\*all.\*all._127._$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/12/main/pg\_hba.conf  
> I, [2020-12-11T18:36:26.536854 #1] INFO – : \> HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/12/bin/postmaster -D /etc/postgresql/12/main  
> I, [2020-12-11T18:36:26.542081 #1] INFO – : \> sleep 5  
> 2020-12-11 18:36:26.649 UTC [1611] FATAL: database files are incompatible with server  
> 2020-12-11 18:36:26.649 UTC [1611] DETAIL: The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 12.5 (Debian 12.5-1.pgdg100+1).  
> I, [2020-12-11T18:36:31.555237 #1] INFO – :  
> I, [2020-12-11T18:36:31.556039 #1] INFO – : \> su postgres -c ‘createdb discourse’ || true  
> createdb: error: 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, [2020-12-11T18:36:31.718921 #1] INFO – :  
> I, [2020-12-11T18:36:31.719321 #1] INFO – : \> su postgres -c ‘psql discourse -c “create user discourse;”’ || true  
> psql: error: 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, [2020-12-11T18:36:31.892475 #1] INFO – :  
> I, [2020-12-11T18:36:31.893214 #1] INFO – : \> su postgres -c ‘psql discourse -c “grant all privileges on database discourse to discourse;”’ || true  
> psql: error: 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, [2020-12-11T18:36:32.067027 #1] INFO – :  
> I, [2020-12-11T18:36:32.067426 #1] INFO – : \> su postgres -c ‘psql discourse -c “alter schema public owner to discourse;”’  
> psql: error: 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, [2020-12-11T18:36:32.256513 #1] INFO – :
> 
> ## FAILED
> 
> Pups::ExecError: su postgres -c ‘psql discourse -c “alter schema public owner to discourse;”’ failed with return #\<Process::Status: pid 1637 exit 2\>  
> Location of failure: /pups/lib/pups/exec\_command.rb:112:in `spawn’  
> exec failed with the params “su postgres -c ‘psql $db\_name -c "alter schema public owner to $db\_user;"’”  
> I, [2020-12-11T18:36:32.257585 #1] INFO – : Terminating async processes  
> df2fcc37c368d13eac3b4a6db4b592028405a0ea91ff39fb8cbb8bcbdc4846fd  
> \*\* FAILED TO BOOTSTRAP \*\* please scroll up and look for earlier error messages, there may be more than one.  
> ./discourse-doctor may help diagnose the problem.

---

<div class="post-metadata">

### Author: ![sunjam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sunjam/32/175682_2.png) [@sunjam](https://meta.discourse.org/u/sunjam)
#### Post date: [11 december 2020 om 19:12 UTC](https://meta.discourse.org/t/forum-offline-due-to-failed-rebuilds-on-tests-pass/173019/2 "2020-12-11T19:12:11Z")

</div>

I’m a bit confused, but seems we are already on version 13 of PostgreSQL. Restored app.yml for default postgres, re-ran rebuild and the forum is back up and running. Solved.
