"User requested shutdown" every time I run `./launcher rebuild app` although I never request shutdown

I added an env variable to my app.yml and now my launcher is failing. It was taking a very long time (~30+ minutes) and I think I cancelled it mid-build accidentally. I tried removing the env variable and rebuilding and it is still failing. Not sure where to go from here, please help!

Below is the end of the logs. You can see it says “User requested shutdown” but I never requested shutdown??

Thank you in advance for any help.

Done compiling CSS: 2019-06-24 00:17:08 UTC
I, [2019-06-24T00:17:09.623312 #14]  INFO -- : Downloading MaxMindDB...
Compressing Javascript and Generating Source Maps

I, [2019-06-24T00:17:09.661620 #14]  INFO -- : File > /usr/local/bin/discourse  chmod: +x
I, [2019-06-24T00:17:09.681642 #14]  INFO -- : File > /usr/local/bin/rails  chmod: +x
I, [2019-06-24T00:17:09.700648 #14]  INFO -- : File > /usr/local/bin/rake  chmod: +x
I, [2019-06-24T00:17:09.729493 #14]  INFO -- : File > /usr/local/bin/rbtrace  chmod: +x
I, [2019-06-24T00:17:09.757723 #14]  INFO -- : File > /usr/local/bin/stackprof  chmod: +x
I, [2019-06-24T00:17:09.767635 #14]  INFO -- : File > /etc/update-motd.d/10-web  chmod: +x
I, [2019-06-24T00:17:09.772558 #14]  INFO -- : File > /etc/logrotate.d/rails  chmod:
I, [2019-06-24T00:17:09.777528 #14]  INFO -- : File > /etc/logrotate.d/nginx  chmod:
I, [2019-06-24T00:17:09.786525 #14]  INFO -- : File > /etc/runit/1.d/00-ensure-links  chmod: +x
I, [2019-06-24T00:17:09.815006 #14]  INFO -- : File > /root/.bash_profile  chmod: 644
I, [2019-06-24T00:17:09.837938 #14]  INFO -- : Replacing (?-mix:server.+{) with limit_req_zone $binary_remote_addr zone=flood:10m rate=$reqs_per_secondr/s;
limit_req_zone $binary_remote_addr zone=bot:10m rate=$reqs_per_minuter/m;
limit_req_status 429;
limit_conn_zone $binary_remote_addr zone=connperip:10m;
limit_conn_status 429;
server {
 in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:09.841405 #14]  INFO -- : Replacing (?-mix:location @discourse {) with location @discourse {
  limit_conn connperip $conn_per_ip;
  limit_req zone=flood burst=$burst_per_second nodelay;
  limit_req zone=bot burst=$burst_per_minute nodelay; in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:09.846794 #14]  INFO -- : > mkdir -p /shared/ssl/
I, [2019-06-24T00:17:09.854136 #14]  INFO -- :
I, [2019-06-24T00:17:09.858114 #14]  INFO -- : Replacing (?-mix:server.+{) with server {
  listen 80;
  return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri;
}
server {
 in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:09.862650 #14]  INFO -- : Replacing (?m-ix:listen 80;\s+gzip on;) with listen 443 ssl http2;
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA;
ssl_prefer_server_ciphers on;
ssl_ecdh_curve secp384r1:prime256v1;

ssl_certificate /shared/ssl/ssl.crt;
ssl_certificate_key /shared/ssl/ssl.key;

ssl_session_tickets off;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:1m;

gzip on;

add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain

if ($http_host != $$ENV_DISCOURSE_HOSTNAME) {
   rewrite (.*) https://$$ENV_DISCOURSE_HOSTNAME$1 permanent;
}
 in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:09.868562 #14]  INFO -- : > if [ -z "$LETSENCRYPT_ACCOUNT_EMAIL" ]; then echo "LETSENCRYPT_ACCOUNT_EMAIL ENV variable is required and has not been set."; exit 1; fi
I, [2019-06-24T00:17:09.880029 #14]  INFO -- :
I, [2019-06-24T00:17:09.882228 #14]  INFO -- : > /bin/bash -c "if [[ ! \"$LETSENCRYPT_ACCOUNT_EMAIL\" =~ ([^@]+)@([^\.]+) ]]; then echo \"LETSENCRYPT_ACCOUNT_EMAIL is not a valid email address\"; exit 1; fi"
I, [2019-06-24T00:17:09.909988 #14]  INFO -- :
I, [2019-06-24T00:17:09.912794 #14]  INFO -- : > cd /root && git clone https://github.com/Neilpang/acme.sh.git && cd /root/acme.sh && git reset --hard f62a4a0c0ccf6cd73b5746dd8b8790ce3c512833
Cloning into 'acme.sh'...
I, [2019-06-24T00:17:11.719232 #14]  INFO -- : HEAD is now at f62a4a0 Merge pull request #2056 from Neilpang/dev

I, [2019-06-24T00:17:11.720042 #14]  INFO -- : > touch /var/spool/cron/crontabs/root
I, [2019-06-24T00:17:11.739956 #14]  INFO -- :
I, [2019-06-24T00:17:11.741155 #14]  INFO -- : > install -d -m 0755 -g root -o root $LETSENCRYPT_DIR
I, [2019-06-24T00:17:11.751813 #14]  INFO -- :
I, [2019-06-24T00:17:11.752471 #14]  INFO -- : > cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --install --log "${LETSENCRYPT_DIR}/acme.sh.log"
I, [2019-06-24T00:17:12.841025 #14]  INFO -- : [Mon Jun 24 00:17:11 UTC 2019] Installing to /shared/letsencrypt
[Mon Jun 24 00:17:11 UTC 2019] Installed to /shared/letsencrypt/acme.sh
[Mon Jun 24 00:17:11 UTC 2019] Installing alias to '/root/.profile'
[Mon Jun 24 00:17:11 UTC 2019] OK, Close and reopen your terminal to start using acme.sh
[Mon Jun 24 00:17:12 UTC 2019] Installing cron job
[Mon Jun 24 00:17:12 UTC 2019] Good, bash is found, so change the shebang to use bash as preferred.
[Mon Jun 24 00:17:12 UTC 2019] OK

I, [2019-06-24T00:17:12.841986 #14]  INFO -- : > cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --upgrade --auto-upgrade
I, [2019-06-24T00:17:14.484714 #14]  INFO -- : [Mon Jun 24 00:17:12 UTC 2019] Installing from online archive.
[Mon Jun 24 00:17:12 UTC 2019] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz
[Mon Jun 24 00:17:13 UTC 2019] Extracting master.tar.gz
[Mon Jun 24 00:17:13 UTC 2019] Installing to /shared/letsencrypt
[Mon Jun 24 00:17:13 UTC 2019] Installed to /shared/letsencrypt/acme.sh
[Mon Jun 24 00:17:13 UTC 2019] Good, bash is found, so change the shebang to use bash as preferred.
[Mon Jun 24 00:17:14 UTC 2019] OK
[Mon Jun 24 00:17:14 UTC 2019] Install success!
[Mon Jun 24 00:17:14 UTC 2019] Upgrade success!

I, [2019-06-24T00:17:14.490745 #14]  INFO -- : File > /etc/nginx/letsencrypt.conf  chmod:
I, [2019-06-24T00:17:14.497176 #14]  INFO -- : File > /etc/runit/1.d/letsencrypt  chmod: +x
I, [2019-06-24T00:17:14.498980 #14]  INFO -- : Replacing (?-mix:ssl_certificate.+) with ssl_certificate /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.cer;
 in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:14.503607 #14]  INFO -- : Replacing (?-mix:#?ACCOUNT_EMAIL=.+) with ACCOUNT_EMAIL=$$ENV_LETSENCRYPT_ACCOUNT_EMAIL
 in /shared/letsencrypt/account.conf
I, [2019-06-24T00:17:14.509542 #14]  INFO -- : Replacing (?-mix:ssl_certificate_key.+) with ssl_certificate_key /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.key;
 in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:14.512425 #14]  INFO -- : Replacing (?-mix:add_header.+) with add_header Strict-Transport-Security 'max-age=63072000'; in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:14.513979 #14]  INFO -- : Replacing location @discourse { with location @discourse {
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain in /etc/nginx/conf.d/discourse.conf
I, [2019-06-24T00:17:14.516594 #14]  INFO -- : > echo "Beginning of custom commands"
I, [2019-06-24T00:17:14.521352 #14]  INFO -- : Beginning of custom commands

I, [2019-06-24T00:17:14.522787 #14]  INFO -- : > echo "End of custom commands"
I, [2019-06-24T00:17:14.525675 #14]  INFO -- : End of custom commands

I, [2019-06-24T00:17:14.530113 #14]  INFO -- : Terminating async processes
I, [2019-06-24T00:17:14.531859 #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: 68
2019-06-24 00:17:14.533 UTC [68] LOG:  received fast shutdown request
I, [2019-06-24T00:17:14.535525 #14]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 184
184:signal-handler (1561335434) Received SIGTERM scheduling shutdown...
2019-06-24 00:17:14.538 UTC [68] LOG:  aborting any active transactions
2019-06-24 00:17:14.551 UTC [68] LOG:  worker process: logical replication launcher (PID 77) exited with exit code 1
2019-06-24 00:17:14.553 UTC [72] LOG:  shutting down
184:M 24 Jun 2019 00:17:14.592 # User requested shutdown...
184:M 24 Jun 2019 00:17:14.592 * Saving the final RDB snapshot before exiting.
2019-06-24 00:17:14.660 UTC [68] LOG:  database system is shut down
184:M 24 Jun 2019 00:17:14.785 * DB saved on disk
184:M 24 Jun 2019 00:17:14.785 # Redis is now ready to exit, bye bye...
sha256:16d5e294733e7e1e377f6ae26eb2b70be88f017118f63258fce116776b66d4ca
e990d1b35be61d90d36f25bc273ff096a4e4a40a1757f1cc55760cc7906ecb54
Removing old container
+ /usr/bin/docker rm app
app

+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=2 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_HOSTNAME=forum.[my-site-name-removed].com -e DISCOURSE_DEVELOPER_EMAILS=admin@[my-site-name-removed].com -e DISCOURSE_SMTP_ADDRESS=smtp.sendgrid.net -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=apikey -e DISCOURSE_SMTP_PASSWORD= -e LETSENCRYPT_ACCOUNT_EMAIL=admin@[my-site-name-removed].com -h [droplet name removed] -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address [mac address removed] local_discourse/app /sbin/boot
eca901b6d499de67610ec1deda238f75087c1999b988114583e7e07c03893801

Looks like the launcher somehow repaired itself… site is magically up an hour later :man_shrugging:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.