Rebuild failing at "bundle exec rake db:migrate"

I’m having issues with my Discourse installation after updating the Discourse through the web updater. I’ve spent the last 6 hours reading every single post regarding the error I’m seeing, but none of the fixed seem to work for me. Can anyone help me, please?

I’m running Ubuntu 16.04 on a DigitalOcean droplet.

Here is the full output of discourse-doctor:

root@wfot-gniot-discourse:/var/discourse# ./discourse-doctor
DISCOURSE DOCTOR Wed Nov 14 07:17:41 EST 2018
OS: Linux wfot-gniot-discourse 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=gniot.wfot.org
SMTP_ADDRESS=REMOVED
DEVELOPER_EMAILS=REMOVED
SMTP_PASSWORD=REMOVED
SMTP_PORT=REMOVED
SMTP_USER_NAME=REMOVED
LETSENCRYPT_ACCOUNT_EMAIL=REMOVED

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 18.09.0, build 4d60db4

DOCKER PROCESSES (docker ps -a)

CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS                      PORTS               NAMES
0dcc9b4913f0        local_discourse/app   "/sbin/boot"        3 months ago        Exited (5) 15 minutes ago                       app

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
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, [2018-11-14T12:17:53.198916 #14]  INFO -- : Loading --stdin
I, [2018-11-14T12:17:53.210384 #14]  INFO -- : > locale-gen $LANG && update-locale
I, [2018-11-14T12:17:54.312768 #14]  INFO -- : Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

I, [2018-11-14T12:17:54.313536 #14]  INFO -- : > mkdir -p /shared/postgres_run
I, [2018-11-14T12:17:54.316389 #14]  INFO -- : 
I, [2018-11-14T12:17:54.316962 #14]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2018-11-14T12:17:54.319626 #14]  INFO -- : 
I, [2018-11-14T12:17:54.320259 #14]  INFO -- : > chmod 775 /shared/postgres_run
I, [2018-11-14T12:17:54.322542 #14]  INFO -- : 
I, [2018-11-14T12:17:54.323081 #14]  INFO -- : > rm -fr /var/run/postgresql
I, [2018-11-14T12:17:54.326902 #14]  INFO -- : 
I, [2018-11-14T12:17:54.327833 #14]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2018-11-14T12:17:54.331511 #14]  INFO -- : 
I, [2018-11-14T12:17:54.332407 #14]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2018/11/14 12:17:54 socat[46] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2018-11-14T12:17:54.339754 #14]  INFO -- : 
I, [2018-11-14T12:17:54.340609 #14]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2018-11-14T12:17:54.346032 #14]  INFO -- : 
I, [2018-11-14T12:17:54.346916 #14]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2018-11-14T12:17:54.351371 #14]  INFO -- : 
I, [2018-11-14T12:17:54.352091 #14]  INFO -- : > mkdir -p /shared/postgres_run/10-main.pg_stat_tmp
I, [2018-11-14T12:17:54.355071 #14]  INFO -- : 
I, [2018-11-14T12:17:54.355781 #14]  INFO -- : > chown postgres:postgres /shared/postgres_run/10-main.pg_stat_tmp
I, [2018-11-14T12:17:54.358791 #14]  INFO -- : 
I, [2018-11-14T12:17:54.364792 #14]  INFO -- : File > /etc/service/postgres/run  chmod: +x
I, [2018-11-14T12:17:54.370259 #14]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x
I, [2018-11-14T12:17:54.375968 #14]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x
I, [2018-11-14T12:17:54.382002 #14]  INFO -- : File > /root/upgrade_postgres  chmod: +x
I, [2018-11-14T12:17:54.382877 #14]  INFO -- : > chown -R root /var/lib/postgresql/10/main
I, [2018-11-14T12:17:54.539629 #14]  INFO -- : 
I, [2018-11-14T12:17:54.539963 #14]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/10/bin/initdb -D /shared/postgres_data || exit 0
I, [2018-11-14T12:17:54.543071 #14]  INFO -- : 
I, [2018-11-14T12:17:54.543666 #14]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2018-11-14T12:17:54.561102 #14]  INFO -- : 
I, [2018-11-14T12:17:54.562134 #14]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2018-11-14T12:17:54.565442 #14]  INFO -- : 
I, [2018-11-14T12:17:54.566283 #14]  INFO -- : > /root/upgrade_postgres
I, [2018-11-14T12:17:54.571757 #14]  INFO -- : 
I, [2018-11-14T12:17:54.572589 #14]  INFO -- : > rm /root/upgrade_postgres
I, [2018-11-14T12:17:54.575337 #14]  INFO -- : 
I, [2018-11-14T12:17:54.576235 #14]  INFO -- : Replacing data_directory = '/var/lib/postgresql/10/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.577384 #14]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.578205 #14]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.579087 #14]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.579841 #14]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.580692 #14]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.581490 #14]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2018-11-14T12:17:54.585579 #14]  INFO -- : 
I, [2018-11-14T12:17:54.586554 #14]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.587314 #14]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.588158 #14]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.589091 #14]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.589855 #14]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/10/main/postgresql.conf
I, [2018-11-14T12:17:54.590662 #14]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/10/main/pg_hba.conf
I, [2018-11-14T12:17:54.591610 #14]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/10/main/pg_hba.conf
I, [2018-11-14T12:17:54.592390 #14]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main
I, [2018-11-14T12:17:54.594823 #14]  INFO -- : > sleep 5
2018-11-14 12:17:54.619 UTC [69] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2018-11-14 12:17:54.620 UTC [69] LOG:  listening on IPv6 address "::", port 5432
2018-11-14 12:17:54.622 UTC [69] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2018-11-14 12:17:54.642 UTC [72] LOG:  database system was shut down at 2018-11-14 12:11:51 UTC
2018-11-14 12:17:54.649 UTC [69] LOG:  database system is ready to accept connections
I, [2018-11-14T12:17:59.602193 #14]  INFO -- : 
I, [2018-11-14T12:17:59.602532 #14]  INFO -- : > su postgres -c 'createdb discourse' || true
2018-11-14 12:17:59.698 UTC [82] postgres@postgres ERROR:  database "discourse" already exists
2018-11-14 12:17:59.698 UTC [82] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2018-11-14T12:17:59.701510 #14]  INFO -- : 
I, [2018-11-14T12:17:59.702291 #14]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2018-11-14 12:17:59.795 UTC [93] postgres@discourse ERROR:  role "discourse" already exists
2018-11-14 12:17:59.795 UTC [93] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2018-11-14T12:17:59.798263 #14]  INFO -- : 
I, [2018-11-14T12:17:59.798891 #14]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2018-11-14T12:17:59.886042 #14]  INFO -- : GRANT

I, [2018-11-14T12:17:59.886863 #14]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2018-11-14T12:17:59.979895 #14]  INFO -- : ALTER SCHEMA

I, [2018-11-14T12:17:59.980839 #14]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2018-11-14T12:18:00.092907 #14]  INFO -- : CREATE EXTENSION

I, [2018-11-14T12:18:00.093627 #14]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2018-11-14T12:18:00.185382 #14]  INFO -- : CREATE EXTENSION

I, [2018-11-14T12:18:00.186106 #14]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2018-11-14T12:18:00.277465 #14]  INFO -- : CREATE EXTENSION

I, [2018-11-14T12:18:00.278377 #14]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2018-11-14T12:18:00.369325 #14]  INFO -- : CREATE EXTENSION

I, [2018-11-14T12:18:00.370426 #14]  INFO -- : > sudo -u postgres psql discourse
I, [2018-11-14T12:18:00.376906 #14]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2018-11-14T12:18:00.473933 #14]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x
I, [2018-11-14T12:18:00.477789 #14]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod: 
I, [2018-11-14T12:18:00.478728 #14]  INFO -- : > echo postgres installed!
I, [2018-11-14T12:18:00.481724 #14]  INFO -- : postgres installed!

I, [2018-11-14T12:18:00.487693 #14]  INFO -- : File > /etc/service/redis/run  chmod: +x
I, [2018-11-14T12:18:00.493721 #14]  INFO -- : File > /etc/service/redis/log/run  chmod: +x
I, [2018-11-14T12:18:00.500919 #14]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x
I, [2018-11-14T12:18:00.501814 #14]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2018-11-14T12:18:00.502885 #14]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2018-11-14T12:18:00.503752 #14]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2018-11-14T12:18:00.507956 #14]  INFO -- : 
I, [2018-11-14T12:18:00.509073 #14]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2018-11-14T12:18:00.509881 #14]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2018-11-14T12:18:00.511728 #14]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2018-11-14T12:18:00.512559 #14]  INFO -- : > echo redis installed
I, [2018-11-14T12:18:00.515545 #14]  INFO -- : redis installed

I, [2018-11-14T12:18:00.516345 #14]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2018-11-14T12:18:00.521392 #14]  INFO -- : logfile ""

I, [2018-11-14T12:18:00.522194 #14]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2018-11-14T12:18:00.524282 #14]  INFO -- : > sleep 10
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 185
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

185:M 14 Nov 12:18:00.533 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
185:M 14 Nov 12:18:00.533 # Server started, Redis version 3.0.6
185:M 14 Nov 12:18:00.534 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
185:M 14 Nov 12:18:00.534 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
185:M 14 Nov 12:18:00.552 * DB loaded from disk: 0.018 seconds
185:M 14 Nov 12:18:00.553 * The server is now ready to accept connections on port 6379
I, [2018-11-14T12:18:10.530133 #14]  INFO -- : 
I, [2018-11-14T12:18:10.531310 #14]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2018-11-14T12:18:10.538016 #14]  INFO -- : thpoff is installed!

I, [2018-11-14T12:18:10.539127 #14]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2018-11-14T12:18:10.648346 #14]  INFO -- : 
I, [2018-11-14T12:18:10.649171 #14]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2018-11-14T12:18:10.775408 #14]  INFO -- : 
I, [2018-11-14T12:18:10.776235 #14]  INFO -- : > chown -R discourse /home/discourse
I, [2018-11-14T12:18:10.780169 #14]  INFO -- : 
I, [2018-11-14T12:18:10.781034 #14]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2018-11-14T12:18:10.783836 #14]  INFO -- : 
I, [2018-11-14T12:18:10.787389 #14]  INFO -- : File > /etc/cron.d/anacron  chmod: 
I, [2018-11-14T12:18:10.792990 #14]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x
I, [2018-11-14T12:18:10.798568 #14]  INFO -- : File > /etc/runit/1.d/enable-brotli  chmod: +x
I, [2018-11-14T12:18:10.804479 #14]  INFO -- : File > /etc/service/unicorn/run  chmod: +x
I, [2018-11-14T12:18:10.810123 #14]  INFO -- : File > /etc/service/nginx/run  chmod: +x
I, [2018-11-14T12:18:10.815731 #14]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x
I, [2018-11-14T12:18:10.821199 #14]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x
I, [2018-11-14T12:18:10.822015 #14]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2018-11-14T12:18:10.822682 #14]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2018-11-14T12:18:10.825514 #14]  INFO -- : > cd /var/www/discourse && git reset --hard
214:M 14 Nov 12:18:10.833 # Creating Server TCP listening socket *:6379: bind: Address already in use
Checking out files: 100% (26929/26929), done.
I, [2018-11-14T12:18:15.951898 #14]  INFO -- : HEAD is now at 23423ba correct spec and error reporting

I, [2018-11-14T12:18:15.952677 #14]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2018-11-14T12:18:16.136103 #14]  INFO -- : 
I, [2018-11-14T12:18:16.136915 #14]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin master
I, [2018-11-14T12:18:16.142320 #14]  INFO -- : 
I, [2018-11-14T12:18:16.143016 #14]  INFO -- : > cd /var/www/discourse && git pull
From https://github.com/discourse/discourse
   23423ba..f6fb079  master     -> origin/master
   eb54bf9..bbf7bb1  beta       -> origin/beta
 * [new branch]      fontawesome5 -> origin/fontawesome5
 * [new branch]      menu-sliders -> origin/menu-sliders
 * [new branch]      no-category-column -> origin/no-category-column
 + 3982f3c...1a4fbc3 rework-polls -> origin/rework-polls  (forced update)
   5e054e0..05b2c5b  stable     -> origin/stable
   32b1f34..34e4d82  tests-passed -> origin/tests-passed
 * [new tag]         v2.1.3     -> v2.1.3
 * [new tag]         v2.2.0.beta4 -> v2.2.0.beta4
I, [2018-11-14T12:18:22.927965 #14]  INFO -- : Updating 23423ba..f6fb079
Fast-forward
 .travis.yml                                        |   6 +-
...
###SHORTENED THIS SECTION. ALL LOOKS GOOD HERE###
...
 test/javascripts/widgets/post-test.js.es6          |  10 +
 394 files changed, 6668 insertions(+), 2776 deletions(-)
 create mode 100644 app/assets/javascripts/admin/components/site-settings-image-uploader.js.es6
 create mode 100644 app/assets/javascripts/admin/components/user-flag-percentage.js.es6
 create mode 100644 app/assets/javascripts/admin/templates/components/site-settings/upload.hbs
 create mode 100644 app/assets/javascripts/admin/templates/components/user-flag-percentage.hbs
 create mode 100644 app/assets/javascripts/discourse-common/helpers/get-url.js.es6
 create mode 100644 app/assets/javascripts/discourse/components/related-messages.js.es6
 create mode 100644 app/assets/javascripts/discourse/templates/components/related-messages.hbs
 rename app/assets/javascripts/wizard/components/{image-preview-apple-touch-icon-url.js.es6 => image-preview-apple-touch-icon.js.es6} (100%)
 rename app/assets/javascripts/wizard/components/{image-preview-favicon-url.js.es6 => image-preview-favicon.js.es6} (100%)
 rename app/assets/javascripts/wizard/components/{image-preview-logo-small-url.js.es6 => image-preview-logo-small.js.es6} (100%)
 rename app/assets/javascripts/wizard/components/{image-preview-logo-url.js.es6 => image-preview-logo.js.es6} (100%)
 create mode 100644 db/migrate/20181031165343_add_flag_stats_to_user.rb
 create mode 100644 db/post_migrate/20181012123001_drop_group_locked_trust_level_from_user.rb
 create mode 100644 db/post_migrate/20181112013117_migrate_url_site_settings.rb
 delete mode 100644 lib/freedom_patches/net.rb
 create mode 100755 script/push_translations.rb
 create mode 100644 spec/db/post_migrate/migrate_url_site_settings_spec.rb
 create mode 100644 spec/fixtures/emails/attached_eml_file.eml
 create mode 100644 spec/fixtures/images/smallest.ico
 create mode 100644 spec/lib/db_helper_spec.rb
 create mode 100644 test/javascripts/components/image-uploader-test.js.es6

I, [2018-11-14T12:18:22.932123 #14]  INFO -- : > cd /var/www/discourse && git fetch origin tests-passed
From https://github.com/discourse/discourse
 * branch            tests-passed -> FETCH_HEAD
I, [2018-11-14T12:18:24.371386 #14]  INFO -- : 
I, [2018-11-14T12:18:24.372113 #14]  INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2018-11-14T12:18:25.046118 #14]  INFO -- : Branch tests-passed set up to track remote branch tests-passed from origin.

I, [2018-11-14T12:18:25.046782 #14]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2018-11-14T12:18:25.051772 #14]  INFO -- : 
I, [2018-11-14T12:18:25.052655 #14]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2018-11-14T12:18:25.057662 #14]  INFO -- : 
I, [2018-11-14T12:18:25.058510 #14]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2018-11-14T12:18:25.064301 #14]  INFO -- : 
I, [2018-11-14T12:18:25.065131 #14]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2018-11-14T12:18:25.069579 #14]  INFO -- : 
I, [2018-11-14T12:18:25.070250 #14]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log"
I, [2018-11-14T12:18:25.076203 #14]  INFO -- : 
I, [2018-11-14T12:18:25.076938 #14]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log /var/www/discourse/log"
I, [2018-11-14T12:18:25.084067 #14]  INFO -- : 
I, [2018-11-14T12:18:25.084772 #14]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2018-11-14T12:18:25.091580 #14]  INFO -- : 
I, [2018-11-14T12:18:25.092385 #14]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2018-11-14T12:18:25.099545 #14]  INFO -- : 
I, [2018-11-14T12:18:25.100378 #14]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2018-11-14T12:18:25.107643 #14]  INFO -- : 
I, [2018-11-14T12:18:25.108458 #14]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2018-11-14T12:18:25.115747 #14]  INFO -- : 
I, [2018-11-14T12:18:25.116554 #14]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2018-11-14T12:18:25.124203 #14]  INFO -- : 
I, [2018-11-14T12:18:25.125149 #14]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2018-11-14T12:18:25.125941 #14]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2018-11-14T12:18:28.434102 #14]  INFO -- : 
I, [2018-11-14T12:18:28.435108 #14]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2018-11-14T12:18:28.439192 #14]  INFO -- : 
I, [2018-11-14T12:18:28.440113 #14]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2018-11-14T12:18:28.443332 #14]  INFO -- : 
I, [2018-11-14T12:18:28.444034 #14]  INFO -- : > mkdir -p /var/nginx/cache
I, [2018-11-14T12:18:28.447557 #14]  INFO -- : 
I, [2018-11-14T12:18:28.448651 #14]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2018-11-14T12:18:28.449507 #14]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2018-11-14T12:18:28.450299 #14]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2018-11-14T12:18:28.451030 #14]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2018-11-14T12:18:28.451710 #14]  INFO -- : > echo "done configuring web"
I, [2018-11-14T12:18:28.454808 #14]  INFO -- : done configuring web

I, [2018-11-14T12:18:28.455564 #14]  INFO -- : > cd /var/www/discourse && gem update bundler
I, [2018-11-14T12:18:34.128980 #14]  INFO -- : Updating installed gems
Nothing to update

I, [2018-11-14T12:18:34.129904 #14]  INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2018-11-14T12:18:36.499727 #14]  INFO -- : 
I, [2018-11-14T12:18:36.500713 #14]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'
I, [2018-11-14T12:18:45.601795 #14]  INFO -- : Running `bundle install --deployment --jobs 4 --retry 3 --verbose --without "development"` with bundler 1.17.1
Frozen, using resolution from the lockfile
The definition is missing ["rack-2.0.6", "logster-1.3.1", "onebox-1.8.67"]
HTTP GET https://index.rubygems.org/versions
...
###SHORTENED THIS SECTION. ALL LOOKS GOOD HERE###
...
HTTP 200 OK https://index.rubygems.org/info/memoizable
Using rake 12.3.1
2:  rake (12.3.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rake-12.3.1.gemspec
Using concurrent-ruby 1.0.5
2:  concurrent-ruby (1.0.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/concurrent-ruby-1.0.5.gemspec
Using minitest 5.11.3
2:  minitest (5.11.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/minitest-5.11.3.gemspec
Using thread_safe 0.3.6
2:  thread_safe (0.3.6) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/thread_safe-0.3.6.gemspec
Using builder 3.2.3
2:  builder (3.2.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/builder-3.2.3.gemspec
Using erubi 1.7.1
2:  erubi (1.7.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/erubi-1.7.1.gemspec
Using mini_portile2 2.3.0
2:  mini_portile2 (2.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mini_portile2-2.3.0.gemspec
Using crass 1.0.4
Using mini_mime 1.0.0
Fetching rack 2.0.6
2:  crass (1.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/crass-1.0.4.gemspec
Using arel 9.0.0
2:  arel (9.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/arel-9.0.0.gemspec
Using public_suffix 3.0.2
2:  public_suffix (3.0.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/public_suffix-3.0.2.gemspec
Using ast 2.4.0
2:  ast (2.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ast-2.4.0.gemspec
Using aws-eventstream 1.0.1
2:  aws-eventstream (1.0.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/aws-eventstream-1.0.1.gemspec
Using aws-partitions 1.104.0
2:  aws-partitions (1.104.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/aws-partitions-1.104.0.gemspec
Using aws-sigv4 1.0.3
2:  aws-sigv4 (1.0.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/aws-sigv4-1.0.3.gemspec
Using jmespath 1.4.0
2:  jmespath (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/jmespath-1.4.0.gemspec
Using ember-source 2.13.3
2:  ember-source (2.13.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ember-source-2.13.3.gemspec
Using execjs 2.7.0
2:  execjs (2.7.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/execjs-2.7.0.gemspec
Using msgpack 1.2.4
2:  msgpack (1.2.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/msgpack-1.2.4.gemspec
Using bundler 1.17.1
2:  bundler (1.17.1) from /usr/local/lib/ruby/gems/2.5.0/specifications/bundler-1.17.1.gemspec
Using byebug 10.0.2
2:  byebug (10.0.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/byebug-10.0.2.gemspec
Using certified 1.0.0
2:  certified (1.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/certified-1.0.0.gemspec
Using chunky_png 1.3.10
2:  chunky_png (1.3.10) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/chunky_png-1.3.10.gemspec
Using claide 1.0.2
2:  claide (1.0.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/claide-1.0.2.gemspec
Using colored2 3.1.2
2:  colored2 (3.1.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/colored2-3.1.2.gemspec
Using nap 1.1.0
2:  nap (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/nap-1.1.0.gemspec
Using open4 1.3.4
2:  open4 (1.3.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/open4-1.3.4.gemspec
Using coderay 1.1.2
2:  coderay (1.1.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/coderay-1.1.2.gemspec
Using connection_pool 2.2.2
2:  connection_pool (2.2.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/connection_pool-2.2.2.gemspec
Using cppjieba_rb 0.3.0
2:  cppjieba_rb (0.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/cppjieba_rb-0.3.0.gemspec
Using safe_yaml 1.0.4
2:  safe_yaml (1.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/safe_yaml-1.0.4.gemspec
Using multipart-post 2.0.0
2:  multipart-post (2.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/multipart-post-2.0.0.gemspec
Using git 1.4.0
2:  git (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/git-1.4.0.gemspec
Using kramdown 1.17.0
2:  kramdown (1.17.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/kramdown-1.17.0.gemspec
Using no_proxy_fix 0.1.2
2:  no_proxy_fix (0.1.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/no_proxy_fix-0.1.2.gemspec
Using unicode-display_width 1.4.0
2:  unicode-display_width (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/unicode-display_width-1.4.0.gemspec
Using diff-lcs 1.3
2:  diff-lcs (1.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/diff-lcs-1.3.gemspec
Using exifr 1.3.4
2:  exifr (1.3.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/exifr-1.3.4.gemspec
Using fspath 3.1.0
2:  fspath (3.1.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/fspath-3.1.0.gemspec
Using image_size 1.5.0
2:  image_size (1.5.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/image_size-1.5.0.gemspec
Using in_threads 1.5.0
2:  in_threads (1.5.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/in_threads-1.5.0.gemspec
Using progress 3.4.0
2:  progress (3.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/progress-3.4.0.gemspec
Using email_reply_trimmer 0.1.12
2:  email_reply_trimmer (0.1.12) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/email_reply_trimmer-0.1.12.gemspec
Using method_source 0.8.2
2:  method_source (0.8.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/method_source-0.8.2.gemspec
Using thor 0.19.4
2:  thor (0.19.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/thor-0.19.4.gemspec
Using excon 0.62.0
2:  excon (0.62.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/excon-0.62.0.gemspec
Using fabrication 2.20.1
2:  fabrication (2.20.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/fabrication-2.20.1.gemspec
Using fakeweb 1.3.0
2:  fakeweb (1.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/fakeweb-1.3.0.gemspec
Using fast_blank 1.0.0
2:  fast_blank (1.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/fast_blank-1.0.0.gemspec
Using rake-compiler 1.0.4
2:  rake-compiler (1.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rake-compiler-1.0.4.gemspec
Using fast_xs 0.8.0
2:  fast_xs (0.8.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/fast_xs-0.8.0.gemspec
Using fastimage 2.1.3
2:  fastimage (2.1.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/fastimage-2.1.3.gemspec
Using ffi 1.9.25
2:  ffi (1.9.25) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ffi-1.9.25.gemspec
Using flamegraph 0.9.5
2:  flamegraph (0.9.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/flamegraph-0.9.5.gemspec
Using gc_tracer 1.5.1
2:  gc_tracer (1.5.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/gc_tracer-1.5.1.gemspec
Using guess_html_encoding 0.0.11
2:  guess_html_encoding (0.0.11) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/guess_html_encoding-0.0.11.gemspec
Using hashdiff 0.3.7
2:  hashdiff (0.3.7) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/hashdiff-0.3.7.gemspec
Using hashie 3.5.7
2:  hashie (3.5.7) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/hashie-3.5.7.gemspec
Using highline 1.7.10
2:  highline (1.7.10) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/highline-1.7.10.gemspec
Using hiredis 0.6.1
2:  hiredis (0.6.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/hiredis-0.6.1.gemspec
Using hkdf 0.3.0
2:  hkdf (0.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/hkdf-0.3.0.gemspec
Using htmlentities 4.3.4
2:  htmlentities (4.3.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/htmlentities-4.3.4.gemspec
Using http_accept_language 2.0.5
2:  http_accept_language (2.0.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/http_accept_language-2.0.5.gemspec
Using jaro_winkler 1.5.1
2:  jaro_winkler (1.5.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/jaro_winkler-1.5.1.gemspec
Using jwt 1.5.6
2:  jwt (1.5.6) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/jwt-1.5.6.gemspec
Using kgio 2.11.2
2:  kgio (2.11.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/kgio-2.11.2.gemspec
Using libv8 6.7.288.46.1 (x86_64-linux)
2:  libv8 (6.7.288.46.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/libv8-6.7.288.46.1-x86_64-linux.gemspec
Using rb-fsevent 0.10.3
2:  rb-fsevent (0.10.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rb-fsevent-0.10.3.gemspec
Using ruby_dep 1.5.0
2:  ruby_dep (1.5.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ruby_dep-1.5.0.gemspec
Using logstash-event 1.2.02
2:  logstash-event (1.2.02) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/logstash-event-1.2.02.gemspec
0:  mini_mime (1.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mini_mime-1.0.0.gemspec
Using lru_redux 1.1.0
0:  lru_redux (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/lru_redux-1.1.0.gemspec
Using maxminddb 0.1.21
0:  maxminddb (0.1.21) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/maxminddb-0.1.21.gemspec
Using memory_profiler 0.9.12
0:  memory_profiler (0.9.12) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/memory_profiler-0.9.12.gemspec
Using metaclass 0.0.4
0:  metaclass (0.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/metaclass-0.0.4.gemspec
Using mini_scheduler 0.8.1
0:  mini_scheduler (0.8.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mini_scheduler-0.8.1.gemspec
Using mini_sql 0.1.10
0:  mini_sql (0.1.10) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mini_sql-0.1.10.gemspec
Using mock_redis 0.18.0
0:  mock_redis (0.18.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mock_redis-0.18.0.gemspec
Using moneta 1.0.0
0:  moneta (1.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/moneta-1.0.0.gemspec
Using multi_json 1.13.1
0:  multi_json (1.13.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/multi_json-1.13.1.gemspec
Using multi_xml 0.6.0
0:  multi_xml (0.6.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/multi_xml-0.6.0.gemspec
Using mustache 1.0.5
0:  mustache (1.0.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mustache-1.0.5.gemspec
Using oauth 0.5.4
0:  oauth (0.5.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/oauth-0.5.4.gemspec
Using oj 3.6.2
0:  oj (3.6.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/oj-3.6.2.gemspec
Using ruby-openid 2.7.0
0:  ruby-openid (2.7.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ruby-openid-2.7.0.gemspec
Using redis 4.0.1
Fetching logster 1.3.1
0:  redis (4.0.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/redis-4.0.1.gemspec
Using parallel 1.12.1
0:  parallel (1.12.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/parallel-1.12.1.gemspec
Using pg 1.1.3
0:  pg (1.1.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/pg-1.1.3.gemspec
Using powerpack 0.1.2
0:  powerpack (0.1.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/powerpack-0.1.2.gemspec
Using slop 3.6.0
0:  slop (3.6.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/slop-3.6.0.gemspec
Using puma 3.11.4
0:  puma (3.11.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/puma-3.11.4.gemspec
Using r2 0.2.7
0:  r2 (0.2.7) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/r2-0.2.7.gemspec
Using rainbow 3.0.0
0:  rainbow (3.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rainbow-3.0.0.gemspec
Using raindrops 0.19.0
0:  raindrops (0.19.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/raindrops-0.19.0.gemspec
Using trollop 2.1.2
0:  trollop (2.1.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/trollop-2.1.2.gemspec
Using rchardet 1.8.0
0:  rchardet (1.8.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rchardet-1.8.0.gemspec
Using rinku 2.0.4
0:  rinku (2.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rinku-2.0.4.gemspec
Using rotp 3.3.1
0:  rotp (3.3.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rotp-3.3.1.gemspec
Using rspec-support 3.7.1
0:  rspec-support (3.7.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.7.1.gemspec
Using rtlit 0.0.5
0:  rtlit (0.0.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rtlit-0.0.5.gemspec
Using ruby-progressbar 1.9.0
0:  ruby-progressbar (1.9.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ruby-progressbar-1.9.0.gemspec
Using shoulda-context 1.2.2
0:  shoulda-context (1.2.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/shoulda-context-1.2.2.gemspec
Using sshkey 1.9.0
0:  sshkey (1.9.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sshkey-1.9.0.gemspec
Using stackprof 0.2.11
0:  stackprof (0.2.11) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/stackprof-0.2.11.gemspec
Using tilt 2.0.8
0:  tilt (2.0.8) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/tilt-2.0.8.gemspec
Using unf_ext 0.0.7.5
0:  unf_ext (0.0.7.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/unf_ext-0.0.7.5.gemspec
Using i18n 1.0.1
0:  i18n (1.0.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/i18n-1.0.1.gemspec
Using tzinfo 1.2.5
0:  tzinfo (1.2.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/tzinfo-1.2.5.gemspec
Using nokogiri 1.8.5
0:  nokogiri (1.8.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/nokogiri-1.8.5.gemspec
Using addressable 2.5.2
0:  addressable (2.5.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/addressable-2.5.2.gemspec
Using parser 2.5.1.0
0:  parser (2.5.1.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/parser-2.5.1.0.gemspec
Using aws-sdk-core 3.27.0
0:  aws-sdk-core (3.27.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/aws-sdk-core-3.27.0.gemspec
Using barber 0.12.0
0:  barber (0.12.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/barber-0.12.0.gemspec
Using bootsnap 1.3.0
0:  bootsnap (1.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/bootsnap-1.3.0.gemspec
Using cork 0.3.0
0:  cork (0.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/cork-0.3.0.gemspec
Using ember-data-source 3.0.2
0:  ember-data-source (3.0.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ember-data-source-3.0.2.gemspec
Using rqrcode 0.10.1
0:  rqrcode (0.10.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rqrcode-0.10.1.gemspec
Using uglifier 4.1.11
0:  uglifier (4.1.11) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/uglifier-4.1.11.gemspec
Using crack 0.4.3
0:  crack (0.4.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/crack-0.4.3.gemspec
Using faraday 0.12.2
0:  faraday (0.12.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/faraday-0.12.2.gemspec
Using terminal-table 1.8.0
0:  terminal-table (1.8.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/terminal-table-1.8.0.gemspec
Using discourse_image_optim 0.26.2
0:  discourse_image_optim (0.26.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/discourse_image_optim-0.26.2.gemspec
Using fast_xor 1.1.3
0:  fast_xor (1.1.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/fast_xor-1.1.3.gemspec
Using rb-inotify 0.9.10
0:  rb-inotify (0.9.10) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rb-inotify-0.9.10.gemspec
Using mini_suffix 0.3.0
0:  mini_suffix (0.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mini_suffix-0.3.0.gemspec
Using openid-redis-store 0.0.2
0:  openid-redis-store (0.0.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/openid-redis-store-0.0.2.gemspec
Using redis-namespace 1.6.0
0:  redis-namespace (1.6.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/redis-namespace-1.6.0.gemspec
Using webpush 0.3.2
0:  webpush (0.3.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/webpush-0.3.2.gemspec
Using mail 2.7.1.rc1
0:  mail (2.7.1.rc1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mail-2.7.1.rc1.gemspec
Using logstash-logger 0.26.1
0:  logstash-logger (0.26.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/logstash-logger-0.26.1.gemspec
Using mini_racer 0.2.3
0:  mini_racer (0.2.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mini_racer-0.2.3.gemspec
Using mocha 1.5.0
0:  mocha (1.5.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/mocha-1.5.0.gemspec
Using pry 0.10.4
0:  pry (0.10.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/pry-0.10.4.gemspec
Using rbtrace 0.4.10
0:  rbtrace (0.4.10) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rbtrace-0.4.10.gemspec
Using rspec-core 3.7.1
0:  rspec-core (3.7.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.7.1.gemspec
Using rspec-expectations 3.7.0
0:  rspec-expectations (3.7.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.7.0.gemspec
Using rspec-mocks 3.7.0
0:  rspec-mocks (3.7.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.7.0.gemspec
Using unicorn 5.4.0
0:  unicorn (5.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/unicorn-5.4.0.gemspec
Using activesupport 5.2.0
0:  activesupport (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/activesupport-5.2.0.gemspec
Using loofah 2.2.3
0:  loofah (2.2.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/loofah-2.2.3.gemspec
Using aws-sdk-kms 1.9.0
0:  aws-sdk-kms (1.9.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/aws-sdk-kms-1.9.0.gemspec
Using claide-plugins 0.9.2
0:  claide-plugins (0.9.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/claide-plugins-0.9.2.gemspec
Using faraday-http-cache 1.3.1
0:  faraday-http-cache (1.3.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/faraday-http-cache-1.3.1.gemspec
Using sawyer 0.8.1
0:  sawyer (0.8.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sawyer-0.8.1.gemspec
Using nokogumbo 1.5.0
0:  nokogumbo (1.5.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/nokogumbo-1.5.0.gemspec
Using rubocop 0.57.2
0:  rubocop (0.57.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rubocop-0.57.2.gemspec
Using ruby-readability 0.7.0
0:  ruby-readability (0.7.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ruby-readability-0.7.0.gemspec
Using unf 0.1.4
0:  unf (0.1.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/unf-0.1.4.gemspec
Using webmock 3.4.2
0:  webmock (3.4.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/webmock-3.4.2.gemspec
Using sass-listen 4.0.0
0:  sass-listen (4.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sass-listen-4.0.0.gemspec
Using shoulda-matchers 2.8.0
0:  shoulda-matchers (2.8.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/shoulda-matchers-2.8.0.gemspec
Using rails-dom-testing 2.0.3
0:  rails-dom-testing (2.0.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rails-dom-testing-2.0.3.gemspec
Using rails-html-sanitizer 1.0.4
0:  rails-html-sanitizer (1.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rails-html-sanitizer-1.0.4.gemspec
Using globalid 0.4.1
0:  globalid (0.4.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/globalid-0.4.1.gemspec
Using activemodel 5.2.0
0:  activemodel (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/activemodel-5.2.0.gemspec
Using aws-sdk-s3 1.19.0
0:  aws-sdk-s3 (1.19.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/aws-sdk-s3-1.19.0.gemspec
Using octokit 4.9.0
0:  octokit (4.9.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/octokit-4.9.0.gemspec
Using listen 3.1.5
0:  listen (3.1.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/listen-3.1.5.gemspec
Using sanitize 4.6.5
0:  sanitize (4.6.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sanitize-4.6.5.gemspec
Using pry-nav 0.2.4
0:  pry-nav (0.2.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/pry-nav-0.2.4.gemspec
Using pry-rails 0.3.6
0:  pry-rails (0.3.6) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/pry-rails-0.3.6.gemspec
Using rspec 3.7.0
0:  rspec (3.7.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-3.7.0.gemspec
Fetching onebox 1.8.67
Installing onebox 1.8.67
Installing rack 2.0.6
Installing logster 1.3.1
0:  onebox (1.8.67) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/onebox-1.8.67.gemspec
Using rspec-html-matchers 0.9.1
0:  rspec-html-matchers (0.9.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-html-matchers-0.9.1.gemspec
Using sass 3.5.6
0:  sass (3.5.6) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sass-3.5.6.gemspec
Using shoulda 3.5.0
0:  shoulda (3.5.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/shoulda-3.5.0.gemspec
Using actionview 5.2.0
0:  actionview (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/actionview-5.2.0.gemspec
Using activejob 5.2.0
0:  activejob (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/activejob-5.2.0.gemspec
Using active_model_serializers 0.8.4
0:  active_model_serializers (0.8.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/active_model_serializers-0.8.4.gemspec
Using activerecord 5.2.0
0:  activerecord (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/activerecord-5.2.0.gemspec
Using danger 5.6.3
0:  danger (5.6.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/danger-5.6.3.gemspec
Using sassc 1.11.4
0:  sassc (1.11.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sassc-1.11.4.gemspec
Using seed-fu 2.3.9
0:  seed-fu (2.3.9) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/seed-fu-2.3.9.gemspec
1:  rack (2.0.6) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rack-2.0.6.gemspec
Using rack-test 1.0.0
0:  rack-test (1.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rack-test-1.0.0.gemspec
Using sprockets 3.7.2
0:  sprockets (3.7.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sprockets-3.7.2.gemspec
Using request_store 1.4.1
0:  request_store (1.4.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/request_store-1.4.1.gemspec
Using message_bus 2.1.6
0:  message_bus (2.1.6) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/message_bus-2.1.6.gemspec
Using oauth2 1.4.0
0:  oauth2 (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/oauth2-1.4.0.gemspec
Using omniauth 1.8.1
Using rack-openid 1.3.1
0:  omniauth (1.8.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-1.8.1.gemspec
Using rack-mini-profiler 1.0.0
0:  rack-mini-profiler (1.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rack-mini-profiler-1.0.0.gemspec
Using rack-protection 2.0.3
0:  rack-protection (2.0.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rack-protection-2.0.3.gemspec
Using actionpack 5.2.0
0:  actionpack (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/actionpack-5.2.0.gemspec
Using ember-handlebars-template 0.7.5
0:  ember-handlebars-template (0.7.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ember-handlebars-template-0.7.5.gemspec
Using omniauth-oauth2 1.5.0
0:  omniauth-oauth2 (1.5.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-oauth2-1.5.0.gemspec
Using omniauth-oauth 1.1.0
0:  omniauth-oauth (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-oauth-1.1.0.gemspec
1:  rack-openid (1.3.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rack-openid-1.3.1.gemspec
Using actionmailer 5.2.0
0:  actionmailer (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/actionmailer-5.2.0.gemspec
Using railties 5.2.0
0:  railties (5.2.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/railties-5.2.0.gemspec
Using omniauth-facebook 5.0.0
0:  omniauth-facebook (5.0.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-facebook-5.0.0.gemspec
Using omniauth-github 1.3.0
0:  omniauth-github (1.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-github-1.3.0.gemspec
Using omniauth-google-oauth2 0.5.3
0:  omniauth-google-oauth2 (0.5.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-google-oauth2-0.5.3.gemspec
Using omniauth-instagram 1.3.0
0:  omniauth-instagram (1.3.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-instagram-1.3.0.gemspec
Using omniauth-openid 1.0.1
0:  omniauth-openid (1.0.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-openid-1.0.1.gemspec
Using omniauth-twitter 1.4.0
0:  omniauth-twitter (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/omniauth-twitter-1.4.0.gemspec
Using sidekiq 5.1.3
0:  sidekiq (5.1.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sidekiq-5.1.3.gemspec
Using sprockets-rails 3.2.1
0:  sprockets-rails (3.2.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/sprockets-rails-3.2.1.gemspec
Using jquery-rails 4.3.3
0:  jquery-rails (4.3.3) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/jquery-rails-4.3.3.gemspec
Using lograge 0.10.0
0:  lograge (0.10.0) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/lograge-0.10.0.gemspec
Using rails_multisite 2.0.4
0:  rails_multisite (2.0.4) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rails_multisite-2.0.4.gemspec
Using rspec-rails 3.7.2
0:  rspec-rails (3.7.2) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/rspec-rails-3.7.2.gemspec
Using ember-rails 0.18.5
0:  ember-rails (0.18.5) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/ember-rails-0.18.5.gemspec
2:  logster (1.3.1) from /var/www/discourse/vendor/bundle/ruby/2.5.0/specifications/logster-1.3.1.gemspec
Bundle complete! 112 Gemfile dependencies, 202 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into `./vendor/bundle`

I, [2018-11-14T12:18:45.606105 #14]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
/var/www/discourse/lib/final_destination.rb:385:in `safe_session'
/var/www/discourse/lib/final_destination.rb:336:in `safe_get'
/var/www/discourse/lib/final_destination.rb:108:in `get'
/var/www/discourse/lib/file_helper.rb:43:in `download'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:29:in `block (2 levels) in up'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:25:in `loop'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:25:in `block in up'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:14:in `each'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:14:in `up'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:817:in `exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:7:in `block in exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:6:in `exec_migration'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:797:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:414:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:796:in `migrate'
/var/www/discourse/lib/migration/safe_migrate.rb:27:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:977:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `block in transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:230:in `block in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:227:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/transactions.rb:212:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1343:in `ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1262:in `each'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1210:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1210:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1036:in `up'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1011:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/var/www/discourse/lib/migration/safe_migrate.rb:50:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'

Caused by:
OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
/var/www/discourse/lib/final_destination.rb:385:in `safe_session'
/var/www/discourse/lib/final_destination.rb:336:in `safe_get'
/var/www/discourse/lib/final_destination.rb:108:in `get'
/var/www/discourse/lib/file_helper.rb:43:in `download'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:29:in `block (2 levels) in up'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:25:in `loop'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:25:in `block in up'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:14:in `each'
/var/www/discourse/db/post_migrate/20181112013117_migrate_url_site_settings.rb:14:in `up'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:817:in `exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:7:in `block in exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:6:in `exec_migration'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:797:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:414:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:796:in `migrate'
/var/www/discourse/lib/migration/safe_migrate.rb:27:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:977:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `block in transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:230:in `block in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:227:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/transactions.rb:212:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1343:in `ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1262:in `each'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1210:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1210:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1036:in `up'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/migration.rb:1011:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/var/www/discourse/lib/migration/safe_migrate.rb:50:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
I, [2018-11-14T12:18:58.338432 #14]  INFO -- : == 20181112013117 MigrateUrlSiteSettings: migrating ===========================

I, [2018-11-14T12:18:58.339428 #14]  INFO -- : Terminating async processes
I, [2018-11-14T12:18:58.339772 #14]  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/10/bin/postmaster -D /etc/postgresql/10/main pid: 69
I, [2018-11-14T12:18:58.340228 #14]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 185
2018-11-14 12:18:58.340 UTC [69] LOG:  received fast shutdown request
185:signal-handler (1542197938) Received SIGTERM scheduling shutdown...
2018-11-14 12:18:58.345 UTC [69] LOG:  aborting any active transactions
2018-11-14 12:18:58.351 UTC [69] LOG:  worker process: logical replication launcher (PID 78) exited with exit code 1
2018-11-14 12:18:58.352 UTC [73] LOG:  shutting down
2018-11-14 12:18:58.366 UTC [69] LOG:  database system is shut down
185:M 14 Nov 12:18:58.412 # User requested shutdown...
185:M 14 Nov 12:18:58.413 * Saving the final RDB snapshot before exiting.
185:M 14 Nov 12:18:58.437 * DB saved on disk
185:M 14 Nov 12:18:58.438 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 385 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
3b773e7312b1d9b22a487873c6355d1f3f1e31f66d996616c80099df13921f40
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
==================== END REBUILD LOG ====================
app still not running!

Checking your domain name . . .

Connection to gniot.wfot.org succeeded.
You should probably remove any non-standard plugins and rebuild.


==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at gniot.wfot.org: NOT FOUND
Discourse version at localhost: NOT FOUND


==================== MEMORY INFORMATION ====================
RAM (MB): 2048

              total        used        free      shared  buff/cache   available
Mem:           2000         106        1050           3         843        1693
Swap:          2047           0        2047

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        40G   17G   22G  44% /

==================== DISK INFORMATION ====================
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 29B528BA-16C4-402E-BEE9-53555C8B6F10

Device     Start      End  Sectors Size Type
/dev/vda1   2048 83884031 83881984  40G Linux filesystem

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [matteocuellar@me.com]: n
Mail test skipped.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DONE! ====================

You can examine the output of this script with 
LESS=-Ri less /tmp/discourse-debug.txt

BUT FIRST, make sure that you know the first three commands below!!!

Commands to know when viewing the file with the above command (called 'less'): 
q              -- quit
/error<ENTER>  -- search for the word 'error'
n              -- search for the next occurrence
g              -- go to the beginning of the file
f              -- go forward a page
b              -- go back a page
G              -- go to the end of the file
root@wfot-gniot-discourse:/var/discourse# 

The rebuild is failing during bundle exec rake db:migrate. Running the rebuild app command previously showed Failed to open TCP connection to 443 instead of the OpenSSL error.

It seems to be an issue with HTTPS/SSL, however I don’t see how. I had LetsEncrypt enabled, but removed this while trying to debug the error. I’ve also reset iptables to the default values and disabled ufw. Has anyone experienced this before or sees anything I’ve missed? Your help is greatly appreciated!