-
-
Save YesThatAllen/cc1bdb3bcea3fe6d5abda9db35e5541d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@community:/var/discourse# ./launcher rebuild app | |
Ensuring launcher is up to date | |
Fetching origin | |
Launcher is up-to-date | |
Stopping old container | |
+ /usr/bin/docker stop -t 10 app | |
app | |
cd /pups && git pull && /pups/bin/pups --stdin | |
Already up-to-date. | |
I, [2016-08-25T02:36:24.707948 #13] INFO -- : Loading --stdin | |
I, [2016-08-25T02:36:24.718060 #13] INFO -- : > echo cron is now included in base image, remove from templates | |
I, [2016-08-25T02:36:24.720800 #13] INFO -- : cron is now included in base image, remove from templates | |
I, [2016-08-25T02:36:24.721293 #13] INFO -- : > mkdir -p /shared/postgres_run | |
I, [2016-08-25T02:36:24.724685 #13] INFO -- : | |
I, [2016-08-25T02:36:24.725463 #13] INFO -- : > chown postgres:postgres /shared/postgres_run | |
I, [2016-08-25T02:36:24.728590 #13] INFO -- : | |
I, [2016-08-25T02:36:24.729064 #13] INFO -- : > chmod 775 /shared/postgres_run | |
I, [2016-08-25T02:36:24.731180 #13] INFO -- : | |
I, [2016-08-25T02:36:24.731458 #13] INFO -- : > rm -fr /var/run/postgresql | |
I, [2016-08-25T02:36:24.734256 #13] INFO -- : | |
I, [2016-08-25T02:36:24.734442 #13] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql | |
I, [2016-08-25T02:36:24.736711 #13] INFO -- : | |
I, [2016-08-25T02:36:24.736950 #13] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 | |
2016/08/25 02:36:24 socat[22] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory | |
I, [2016-08-25T02:36:24.771046 #13] INFO -- : | |
I, [2016-08-25T02:36:24.771569 #13] INFO -- : > rm -fr /shared/postgres_run/.s* | |
I, [2016-08-25T02:36:24.775296 #13] INFO -- : | |
I, [2016-08-25T02:36:24.775558 #13] INFO -- : > rm -fr /shared/postgres_run/*.pid | |
I, [2016-08-25T02:36:24.778130 #13] INFO -- : | |
I, [2016-08-25T02:36:24.778427 #13] INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp | |
I, [2016-08-25T02:36:24.780316 #13] INFO -- : | |
I, [2016-08-25T02:36:24.780698 #13] INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp | |
I, [2016-08-25T02:36:24.782794 #13] INFO -- : | |
I, [2016-08-25T02:36:24.786874 #13] INFO -- : File > /etc/service/postgres/run chmod: +x | |
I, [2016-08-25T02:36:24.790484 #13] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x | |
I, [2016-08-25T02:36:24.793918 #13] INFO -- : File > /root/upgrade_postgres chmod: +x | |
I, [2016-08-25T02:36:24.794393 #13] INFO -- : > chown -R root /var/lib/postgresql/9.5/main | |
I, [2016-08-25T02:36:25.239043 #13] INFO -- : | |
I, [2016-08-25T02:36:25.239658 #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-08-25T02:36:25.242063 #13] INFO -- : | |
I, [2016-08-25T02:36:25.242183 #13] INFO -- : > chown -R postgres:postgres /shared/postgres_data | |
I, [2016-08-25T02:36:25.279248 #13] INFO -- : | |
I, [2016-08-25T02:36:25.279758 #13] INFO -- : > chown -R postgres:postgres /var/run/postgresql | |
I, [2016-08-25T02:36:25.283953 #13] INFO -- : | |
I, [2016-08-25T02:36:25.284361 #13] INFO -- : > /root/upgrade_postgres | |
WARNING: enabling "trust" authentication for local connections | |
You can change this by editing pg_hba.conf or using the option -A, or | |
--auth-local and --auth-host, the next time you run initdb. | |
dpkg-preconfigure: unable to re-open stdin: | |
I, [2016-08-25T02:36:48.598113 #13] INFO -- : Upgrading PostgreSQL to from version 9.3 to 9.5 | |
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_new ... ok | |
creating subdirectories ... ok | |
selecting default max_connections ... 100 | |
selecting default shared_buffers ... 128MB | |
selecting dynamic shared memory implementation ... posix | |
creating configuration files ... ok | |
creating template1 database in /shared/postgres_data_new/base/1 ... ok | |
initializing pg_authid ... ok | |
initializing dependencies ... ok | |
creating system views ... ok | |
loading system objects' descriptions ... ok | |
creating collations ... ok | |
creating conversions ... ok | |
creating dictionaries ... ok | |
setting privileges on built-in objects ... ok | |
creating information schema ... ok | |
loading PL/pgSQL server-side language ... ok | |
vacuuming database template1 ... ok | |
copying template1 to template0 ... ok | |
copying template1 to postgres ... ok | |
syncing data to disk ... ok | |
Success. You can now start the database server using: | |
/usr/lib/postgresql/9.5/bin/pg_ctl -D /shared/postgres_data_new -l logfile start | |
Get:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease [26.5 kB] | |
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease | |
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB] | |
Get:4 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 Packages [68.1 kB] | |
Get:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB] | |
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [480 kB] | |
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [400 kB] | |
Get:8 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [167 kB] | |
Get:9 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [48.2 kB] | |
Get:10 https://deb.nodesource.com/node_4.x xenial InRelease [3,914 B] | |
Get:11 https://deb.nodesource.com/node_4.x xenial/main Sources [764 B] | |
Get:12 https://deb.nodesource.com/node_4.x xenial/main amd64 Packages [961 B] | |
Fetched 1,386 kB in 2s (585 kB/s) | |
Reading package lists... | |
Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
The following additional packages will be installed: | |
libossp-uuid16 postgresql-client-9.3 postgresql-contrib-9.3 | |
Suggested packages: | |
uuid locales-all postgresql-doc-9.3 libdbd-pg-perl | |
The following NEW packages will be installed: | |
libossp-uuid16 postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 | |
0 upgraded, 4 newly installed, 0 to remove and 87 not upgraded. | |
Need to get 5,001 kB of archives. | |
After this operation, 23.9 MB of additional disk space will be used. | |
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libossp-uuid16 amd64 1.6.2-1.5build2 [28.6 kB] | |
Get:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-client-9.3 amd64 9.3.14-1.pgdg16.04+1 [1,041 kB] | |
Get:3 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-9.3 amd64 9.3.14-1.pgdg16.04+1 [3,521 kB] | |
Get:4 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-contrib-9.3 amd64 9.3.14-1.pgdg16.04+1 [410 kB] | |
Fetched 5,001 kB in 1s (3,966 kB/s) | |
Selecting previously unselected package libossp-uuid16:amd64. | |
(Reading database ... 34207 files and directories currently installed.) | |
Preparing to unpack .../libossp-uuid16_1.6.2-1.5build2_amd64.deb ... | |
Unpacking libossp-uuid16:amd64 (1.6.2-1.5build2) ... | |
Selecting previously unselected package postgresql-client-9.3. | |
Preparing to unpack .../postgresql-client-9.3_9.3.14-1.pgdg16.04+1_amd64.deb ... | |
Unpacking postgresql-client-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Selecting previously unselected package postgresql-9.3. | |
Preparing to unpack .../postgresql-9.3_9.3.14-1.pgdg16.04+1_amd64.deb ... | |
Unpacking postgresql-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Selecting previously unselected package postgresql-contrib-9.3. | |
Preparing to unpack .../postgresql-contrib-9.3_9.3.14-1.pgdg16.04+1_amd64.deb ... | |
Unpacking postgresql-contrib-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Processing triggers for libc-bin (2.23-0ubuntu3) ... | |
Processing triggers for postgresql-common (174.pgdg16.04+1) ... | |
Building PostgreSQL dictionaries from installed myspell/hunspell packages... | |
Removing obsolete dictionary files: | |
Setting up libossp-uuid16:amd64 (1.6.2-1.5build2) ... | |
Setting up postgresql-client-9.3 (9.3.14-1.pgdg16.04+1) ... | |
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.5/man/man1/psql.1.gz because link group psql.1.gz is broken | |
Setting up postgresql-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Creating new cluster 9.3/main ... | |
config /etc/postgresql/9.3/main | |
data /var/lib/postgresql/9.3/main | |
locale C | |
socket /var/run/postgresql | |
port 5433 | |
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.5/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken | |
invoke-rc.d: could not determine current runlevel | |
invoke-rc.d: policy-rc.d denied execution of start. | |
Setting up postgresql-contrib-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Processing triggers for libc-bin (2.23-0ubuntu3) ... | |
* Stopping PostgreSQL 9.3 database server | |
...done. | |
* Stopping PostgreSQL 9.5 database server | |
* Error: Config owner (postgres:107) and data owner (root:0) do not match, and config owner is not root | |
...fail! | |
Performing Consistency Checks | |
----------------------------- | |
Checking cluster versions ok | |
Checking database user is the install user ok | |
Checking database connection settings ok | |
Checking for prepared transactions ok | |
Checking for reg* system OID user data types ok | |
Checking for contrib/isn with bigint-passing mismatch ok | |
Checking for invalid "line" user columns ok | |
Creating dump of global objects ok | |
Creating dump of database schemas | |
discourse | |
postgres | |
template1 | |
ok | |
encodings for database "postgres" do not match: old "SQL_ASCII", new "UTF8" | |
Failure, exiting | |
------------------------------------------------------------------------------------- | |
UPGRADE OF POSTGRES FAILED | |
You are going to need to export your data and import into a clean instance: | |
In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.3.template.yml" | |
Run ./launcher rebuild app again | |
When your instance is running: | |
Run ./launcher enter app | |
Run cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db | |
Undo the postgres template in your container config | |
Run: ./launcher stop app | |
Run: sudo mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old | |
Run: ./launcher rebuild app | |
Run: ./launcher enter app | |
Run: cd /shared/postgres_backup | |
Run: sv stop unicorn | |
Run: sudo -iu postgres dropdb discourse | |
Run: sudo -iu postgres createdb discourse | |
Run: sudo -iu postgres psql discourse < backup.db | |
Run: exit | |
Run: ./launcher rebuild app | |
FAILED | |
-------------------- | |
Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 39 exit 1> | |
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn' | |
exec failed with the params "/root/upgrade_postgres" | |
c72ca2670e577d3a36872b755192c56d65379d948992026be25662c814800347 | |
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one | |
root@community:/var/discourse# ./launcher rebuild app | |
Ensuring launcher is up to date | |
Fetching origin | |
Launcher is up-to-date | |
Stopping old container | |
+ /usr/bin/docker stop -t 10 app | |
app | |
cd /pups && git pull && /pups/bin/pups --stdin | |
Already up-to-date. | |
I, [2016-08-25T02:38:25.650688 #13] INFO -- : Loading --stdin | |
I, [2016-08-25T02:38:25.659231 #13] INFO -- : > echo cron is now included in base image, remove from templates | |
I, [2016-08-25T02:38:25.661510 #13] INFO -- : cron is now included in base image, remove from templates | |
I, [2016-08-25T02:38:25.661693 #13] INFO -- : > mkdir -p /shared/postgres_run | |
I, [2016-08-25T02:38:25.663807 #13] INFO -- : | |
I, [2016-08-25T02:38:25.663977 #13] INFO -- : > chown postgres:postgres /shared/postgres_run | |
I, [2016-08-25T02:38:25.666213 #13] INFO -- : | |
I, [2016-08-25T02:38:25.666387 #13] INFO -- : > chmod 775 /shared/postgres_run | |
I, [2016-08-25T02:38:25.667940 #13] INFO -- : | |
I, [2016-08-25T02:38:25.668263 #13] INFO -- : > rm -fr /var/run/postgresql | |
I, [2016-08-25T02:38:25.670189 #13] INFO -- : | |
I, [2016-08-25T02:38:25.670361 #13] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql | |
I, [2016-08-25T02:38:25.671985 #13] INFO -- : | |
I, [2016-08-25T02:38:25.672217 #13] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 | |
2016/08/25 02:38:25 socat[22] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory | |
I, [2016-08-25T02:38:25.704334 #13] INFO -- : | |
I, [2016-08-25T02:38:25.704639 #13] INFO -- : > rm -fr /shared/postgres_run/.s* | |
I, [2016-08-25T02:38:25.707473 #13] INFO -- : | |
I, [2016-08-25T02:38:25.707666 #13] INFO -- : > rm -fr /shared/postgres_run/*.pid | |
I, [2016-08-25T02:38:25.710295 #13] INFO -- : | |
I, [2016-08-25T02:38:25.710458 #13] INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp | |
I, [2016-08-25T02:38:25.712092 #13] INFO -- : | |
I, [2016-08-25T02:38:25.712346 #13] INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp | |
I, [2016-08-25T02:38:25.714249 #13] INFO -- : | |
I, [2016-08-25T02:38:25.717714 #13] INFO -- : File > /etc/service/postgres/run chmod: +x | |
I, [2016-08-25T02:38:25.721125 #13] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x | |
I, [2016-08-25T02:38:25.724535 #13] INFO -- : File > /root/upgrade_postgres chmod: +x | |
I, [2016-08-25T02:38:25.724834 #13] INFO -- : > chown -R root /var/lib/postgresql/9.5/main | |
I, [2016-08-25T02:38:25.901806 #13] INFO -- : | |
I, [2016-08-25T02:38:25.902186 #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-08-25T02:38:25.904257 #13] INFO -- : | |
I, [2016-08-25T02:38:25.904354 #13] INFO -- : > chown -R postgres:postgres /shared/postgres_data | |
I, [2016-08-25T02:38:25.923732 #13] INFO -- : | |
I, [2016-08-25T02:38:25.923889 #13] INFO -- : > chown -R postgres:postgres /var/run/postgresql | |
I, [2016-08-25T02:38:25.928706 #13] INFO -- : | |
I, [2016-08-25T02:38:25.929223 #13] INFO -- : > /root/upgrade_postgres | |
WARNING: enabling "trust" authentication for local connections | |
You can change this by editing pg_hba.conf or using the option -A, or | |
--auth-local and --auth-host, the next time you run initdb. | |
dpkg-preconfigure: unable to re-open stdin: | |
I, [2016-08-25T02:38:47.609449 #13] INFO -- : Upgrading PostgreSQL to from version 9.3 to 9.5 | |
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_new ... ok | |
creating subdirectories ... ok | |
selecting default max_connections ... 100 | |
selecting default shared_buffers ... 128MB | |
selecting dynamic shared memory implementation ... posix | |
creating configuration files ... ok | |
creating template1 database in /shared/postgres_data_new/base/1 ... ok | |
initializing pg_authid ... ok | |
initializing dependencies ... ok | |
creating system views ... ok | |
loading system objects' descriptions ... ok | |
creating collations ... ok | |
creating conversions ... ok | |
creating dictionaries ... ok | |
setting privileges on built-in objects ... ok | |
creating information schema ... ok | |
loading PL/pgSQL server-side language ... ok | |
vacuuming database template1 ... ok | |
copying template1 to template0 ... ok | |
copying template1 to postgres ... ok | |
syncing data to disk ... ok | |
Success. You can now start the database server using: | |
/usr/lib/postgresql/9.5/bin/pg_ctl -D /shared/postgres_data_new -l logfile start | |
Get:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease [26.5 kB] | |
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease | |
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB] | |
Get:4 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 Packages [68.1 kB] | |
Get:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB] | |
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [480 kB] | |
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [400 kB] | |
Get:8 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [167 kB] | |
Get:9 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [48.2 kB] | |
Get:10 https://deb.nodesource.com/node_4.x xenial InRelease [3,914 B] | |
Get:11 https://deb.nodesource.com/node_4.x xenial/main Sources [764 B] | |
Get:12 https://deb.nodesource.com/node_4.x xenial/main amd64 Packages [961 B] | |
Fetched 1,386 kB in 2s (602 kB/s) | |
Reading package lists... | |
Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
The following additional packages will be installed: | |
libossp-uuid16 postgresql-client-9.3 postgresql-contrib-9.3 | |
Suggested packages: | |
uuid locales-all postgresql-doc-9.3 libdbd-pg-perl | |
The following NEW packages will be installed: | |
libossp-uuid16 postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 | |
0 upgraded, 4 newly installed, 0 to remove and 87 not upgraded. | |
Need to get 5,001 kB of archives. | |
After this operation, 23.9 MB of additional disk space will be used. | |
Get:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-client-9.3 amd64 9.3.14-1.pgdg16.04+1 [1,041 kB] | |
Get:2 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libossp-uuid16 amd64 1.6.2-1.5build2 [28.6 kB] | |
Get:3 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-9.3 amd64 9.3.14-1.pgdg16.04+1 [3,521 kB] | |
Get:4 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-contrib-9.3 amd64 9.3.14-1.pgdg16.04+1 [410 kB] | |
Fetched 5,001 kB in 0s (6,918 kB/s) | |
Selecting previously unselected package libossp-uuid16:amd64. | |
(Reading database ... 34207 files and directories currently installed.) | |
Preparing to unpack .../libossp-uuid16_1.6.2-1.5build2_amd64.deb ... | |
Unpacking libossp-uuid16:amd64 (1.6.2-1.5build2) ... | |
Selecting previously unselected package postgresql-client-9.3. | |
Preparing to unpack .../postgresql-client-9.3_9.3.14-1.pgdg16.04+1_amd64.deb ... | |
Unpacking postgresql-client-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Selecting previously unselected package postgresql-9.3. | |
Preparing to unpack .../postgresql-9.3_9.3.14-1.pgdg16.04+1_amd64.deb ... | |
Unpacking postgresql-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Selecting previously unselected package postgresql-contrib-9.3. | |
Preparing to unpack .../postgresql-contrib-9.3_9.3.14-1.pgdg16.04+1_amd64.deb ... | |
Unpacking postgresql-contrib-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Processing triggers for libc-bin (2.23-0ubuntu3) ... | |
Processing triggers for postgresql-common (174.pgdg16.04+1) ... | |
Building PostgreSQL dictionaries from installed myspell/hunspell packages... | |
Removing obsolete dictionary files: | |
Setting up libossp-uuid16:amd64 (1.6.2-1.5build2) ... | |
Setting up postgresql-client-9.3 (9.3.14-1.pgdg16.04+1) ... | |
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.5/man/man1/psql.1.gz because link group psql.1.gz is broken | |
Setting up postgresql-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78. | |
Creating new cluster 9.3/main ... | |
config /etc/postgresql/9.3/main | |
data /var/lib/postgresql/9.3/main | |
locale C | |
socket /var/run/postgresql | |
port 5433 | |
update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/9.5/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken | |
invoke-rc.d: could not determine current runlevel | |
invoke-rc.d: policy-rc.d denied execution of start. | |
Setting up postgresql-contrib-9.3 (9.3.14-1.pgdg16.04+1) ... | |
Processing triggers for libc-bin (2.23-0ubuntu3) ... | |
* Stopping PostgreSQL 9.3 database server | |
...done. | |
* Stopping PostgreSQL 9.5 database server | |
* Error: Config owner (postgres:107) and data owner (root:0) do not match, and config owner is not root | |
...fail! | |
Performing Consistency Checks | |
----------------------------- | |
Checking cluster versions ok | |
Checking database user is the install user ok | |
Checking database connection settings ok | |
Checking for prepared transactions ok | |
Checking for reg* system OID user data types ok | |
Checking for contrib/isn with bigint-passing mismatch ok | |
Checking for invalid "line" user columns ok | |
Creating dump of global objects ok | |
Creating dump of database schemas | |
discourse | |
postgres | |
template1 | |
ok | |
encodings for database "postgres" do not match: old "SQL_ASCII", new "UTF8" | |
Failure, exiting | |
------------------------------------------------------------------------------------- | |
UPGRADE OF POSTGRES FAILED | |
You are going to need to export your data and import into a clean instance: | |
In containers/app.yml: Change "templates/postgres.template.yml" TO "templates/postgres.9.3.template.yml" | |
Run ./launcher rebuild app again | |
When your instance is running: | |
Run ./launcher enter app | |
Run cd /shared/postgres_backup && sudo -u postgres pg_dump discourse > backup.db | |
Undo the postgres template in your container config | |
Run: ./launcher stop app | |
Run: sudo mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old | |
Run: ./launcher rebuild app | |
Run: ./launcher enter app | |
Run: cd /shared/postgres_backup | |
Run: sv stop unicorn | |
Run: sudo -iu postgres dropdb discourse | |
Run: sudo -iu postgres createdb discourse | |
Run: sudo -iu postgres psql discourse < backup.db | |
Run: exit | |
Run: ./launcher rebuild app | |
FAILED | |
-------------------- | |
Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 39 exit 1> | |
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn' | |
exec failed with the params "/root/upgrade_postgres" | |
ab0695f5688b3b1e569834fad969d0347d3216daa7a4d72a5c3c30b829b58359 | |
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one | |
root@community:/var/discourse# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment