Hi, I’m struggling to install discourse for the first time. After failing ./discourse-setup
and ./launcher rebuild app
, I get the following output from ./discourse-doctor
which contains the same behaviour during the rebuild.
DISCOURSE DOCTOR Sun Feb 27 14:14:17 CET 2022
OS: Linux debian-discourse 5.10.0-11-amd64 #1 SMP Debian 5.10.92-1 (2022-01-18) x86_64 GNU/Linux
Found containers/app.yml
==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=forum.mydomain.com
SMTP_ADDRESS=mail.mydomain.com
DEVELOPER_EMAILS=admin@mydomain.com
SMTP_PASSWORD=mypassword
SMTP_PORT=587
SMTP_USER_NAME=noreply@mydomain.com
LETSENCRYPT_ACCOUNT_EMAIL=me@example.com
==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 20.10.12, build e91ed57
DOCKER PROCESSES (docker ps -a)
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
x86_64 arch detected.
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
/usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2022-02-27T13:14:40.211696 #1] INFO -- : Reading from stdin
I, [2022-02-27T13:14:40.220344 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2022-02-27T13:14:40.258913 #1] INFO -- : Generating locales (this might take a while)...
Generation complete.
I, [2022-02-27T13:14:40.259380 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2022-02-27T13:14:40.264481 #1] INFO -- :
I, [2022-02-27T13:14:40.265241 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2022-02-27T13:14:40.268881 #1] INFO -- :
I, [2022-02-27T13:14:40.269295 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2022-02-27T13:14:40.272763 #1] INFO -- :
I, [2022-02-27T13:14:40.272999 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2022-02-27T13:14:40.276546 #1] INFO -- :
I, [2022-02-27T13:14:40.276820 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2022-02-27T13:14:40.280134 #1] INFO -- :
I, [2022-02-27T13:14:40.280369 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2022/02/27 13:14:40 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2022-02-27T13:14:40.288971 #1] INFO -- :
I, [2022-02-27T13:14:40.289190 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2022-02-27T13:14:40.293475 #1] INFO -- :
I, [2022-02-27T13:14:40.293677 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2022-02-27T13:14:40.297588 #1] INFO -- :
I, [2022-02-27T13:14:40.297786 #1] INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-02-27T13:14:40.301263 #1] INFO -- :
I, [2022-02-27T13:14:40.301849 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2022-02-27T13:14:40.304979 #1] INFO -- :
I, [2022-02-27T13:14:40.312270 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2022-02-27T13:14:40.318971 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown:
I, [2022-02-27T13:14:40.325763 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2022-02-27T13:14:40.332281 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown:
I, [2022-02-27T13:14:40.332909 #1] INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2022-02-27T13:15:07.631079 #1] INFO -- :
I, [2022-02-27T13:15:07.631961 #1] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2022-02-27T13:15:07.635691 #1] INFO -- :
I, [2022-02-27T13:15:07.635980 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2022-02-27T13:15:07.653147 #1] INFO -- :
I, [2022-02-27T13:15:07.653742 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2022-02-27T13:15:07.657676 #1] INFO -- :
I, [2022-02-27T13:15:07.658155 #1] INFO -- : > /root/upgrade_postgres
I, [2022-02-27T13:15:07.664610 #1] INFO -- :
I, [2022-02-27T13:15:07.665202 #1] INFO -- : > rm /root/upgrade_postgres
I, [2022-02-27T13:15:07.668622 #1] INFO -- :
I, [2022-02-27T13:15:07.669307 #1] INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.670471 #1] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.671259 #1] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.672181 #1] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.673070 #1] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.673941 #1] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.674713 #1] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2022-02-27T13:15:07.679131 #1] INFO -- :
I, [2022-02-27T13:15:07.679903 #1] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.680809 #1] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.681702 #1] INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/13/main/postgresql.conf
I, [2022-02-27T13:15:07.682604 #1] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/13/main/pg_hba.conf
I, [2022-02-27T13:15:07.683423 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2022-02-27T13:15:07.684256 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2022-02-27T13:15:07.684957 #1] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main
I, [2022-02-27T13:15:07.687522 #1] INFO -- : > sleep 5
2022-02-27 13:15:07.838 UTC [42] LOG: starting PostgreSQL 13.5 (Debian 13.5-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-02-27 13:15:07.838 UTC [42] LOG: listening on IPv4 address "0.0.0.0", port 5432
2022-02-27 13:15:07.838 UTC [42] LOG: listening on IPv6 address "::", port 5432
2022-02-27 13:15:07.887 UTC [42] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-02-27 13:15:07.929 UTC [45] LOG: database system was shut down at 2022-02-27 13:06:07 UTC
2022-02-27 13:15:07.962 UTC [42] LOG: database system is ready to accept connections
I, [2022-02-27T13:15:12.691185 #1] INFO -- :
I, [2022-02-27T13:15:12.691781 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2022-02-27 13:15:12.768 UTC [55] postgres@postgres ERROR: database "discourse" already exists
2022-02-27 13:15:12.768 UTC [55] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
I, [2022-02-27T13:15:12.771177 #1] INFO -- :
I, [2022-02-27T13:15:12.771774 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2022-02-27 13:15:12.836 UTC [59] postgres@discourse ERROR: role "discourse" already exists
2022-02-27 13:15:12.836 UTC [59] postgres@discourse STATEMENT: create user discourse;
ERROR: role "discourse" already exists
I, [2022-02-27T13:15:12.839812 #1] INFO -- :
I, [2022-02-27T13:15:12.840513 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2022-02-27T13:15:12.902932 #1] INFO -- : GRANT
I, [2022-02-27T13:15:12.903783 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2022-02-27T13:15:12.963912 #1] INFO -- : ALTER SCHEMA
I, [2022-02-27T13:15:12.964720 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE: extension "hstore" already exists, skipping
I, [2022-02-27T13:15:13.030209 #1] INFO -- : CREATE EXTENSION
I, [2022-02-27T13:15:13.030918 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE: extension "pg_trgm" already exists, skipping
I, [2022-02-27T13:15:13.090523 #1] INFO -- : CREATE EXTENSION
I, [2022-02-27T13:15:13.091201 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE: extension "hstore" already exists, skipping
I, [2022-02-27T13:15:13.150759 #1] INFO -- : CREATE EXTENSION
I, [2022-02-27T13:15:13.151302 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE: extension "pg_trgm" already exists, skipping
I, [2022-02-27T13:15:13.210963 #1] INFO -- : CREATE EXTENSION
I, [2022-02-27T13:15:13.211547 #1] INFO -- : > sudo -u postgres psql discourse
I, [2022-02-27T13:15:13.214480 #1] INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');
I, [2022-02-27T13:15:13.281034 #1] INFO -- : File > /var/lib/postgresql/take-database-backup chmod: +x chown: postgres:postgres
I, [2022-02-27T13:15:13.285330 #1] INFO -- : File > /var/spool/cron/crontabs/postgres chmod: chown:
I, [2022-02-27T13:15:13.285864 #1] INFO -- : > echo postgres installed!
I, [2022-02-27T13:15:13.288953 #1] INFO -- : postgres installed!
I, [2022-02-27T13:15:13.295719 #1] INFO -- : File > /etc/service/redis/run chmod: +x chown:
I, [2022-02-27T13:15:13.302598 #1] INFO -- : File > /etc/service/redis/log/run chmod: +x chown:
I, [2022-02-27T13:15:13.309776 #1] INFO -- : File > /etc/runit/3.d/10-redis chmod: +x chown:
I, [2022-02-27T13:15:13.310579 #1] INFO -- : Replacing daemonize yes with in /etc/redis/redis.conf
I, [2022-02-27T13:15:13.311721 #1] INFO -- : Replacing (?-mix:^pidfile.*$) with in /etc/redis/redis.conf
I, [2022-02-27T13:15:13.312613 #1] INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2022-02-27T13:15:13.317020 #1] INFO -- :
I, [2022-02-27T13:15:13.317935 #1] INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2022-02-27T13:15:13.318912 #1] INFO -- : Replacing (?-mix:^bind .*$) with in /etc/redis/redis.conf
I, [2022-02-27T13:15:13.319881 #1] INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2022-02-27T13:15:13.320844 #1] INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2022-02-27T13:15:13.321738 #1] INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2022-02-27T13:15:13.322478 #1] INFO -- : > echo redis installed
I, [2022-02-27T13:15:13.326308 #1] INFO -- : redis installed
I, [2022-02-27T13:15:13.326960 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2022-02-27T13:15:13.332396 #1] INFO -- : logfile ""
I, [2022-02-27T13:15:13.332993 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-27T13:15:13.335499 #1] INFO -- : > sleep 10
103:C 27 Feb 2022 13:15:13.340 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
103:C 27 Feb 2022 13:15:13.341 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=103, just started
103:C 27 Feb 2022 13:15:13.341 # Configuration loaded
103:M 27 Feb 2022 13:15:13.341 * monotonic clock: POSIX clock_gettime
103:M 27 Feb 2022 13:15:13.342 * Running mode=standalone, port=6379.
103:M 27 Feb 2022 13:15:13.342 # Server initialized
103:M 27 Feb 2022 13:15:13.343 * Loading RDB produced by version 6.2.6
103:M 27 Feb 2022 13:15:13.343 * RDB age 546 seconds
103:M 27 Feb 2022 13:15:13.343 * RDB memory usage when created 0.77 Mb
103:M 27 Feb 2022 13:15:13.343 # Done loading RDB, keys loaded: 0, keys expired: 0.
103:M 27 Feb 2022 13:15:13.343 * DB loaded from disk: 0.000 seconds
103:M 27 Feb 2022 13:15:13.343 * Ready to accept connections
I, [2022-02-27T13:15:23.339851 #1] INFO -- :
I, [2022-02-27T13:15:23.340705 #1] INFO -- : > thpoff echo "thpoff is installed!"
I, [2022-02-27T13:15:23.346062 #1] INFO -- : thpoff is installed!
I, [2022-02-27T13:15:23.346888 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2022-02-27T13:15:23.455351 #1] INFO -- :
I, [2022-02-27T13:15:23.456160 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2022-02-27T13:15:23.534625 #1] INFO -- :
I, [2022-02-27T13:15:23.535120 #1] INFO -- : > /usr/local/bin/ruby -e 'if (ENV["DISCOURSE_CDN_URL"] || "")[0..1] == "//"; puts "Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts."; exit 1; end'
I, [2022-02-27T13:15:23.610977 #1] INFO -- :
I, [2022-02-27T13:15:23.611991 #1] INFO -- : > rm -f /etc/cron.d/anacron
I, [2022-02-27T13:15:23.616191 #1] INFO -- :
I, [2022-02-27T13:15:23.620358 #1] INFO -- : File > /etc/cron.d/anacron chmod: chown:
I, [2022-02-27T13:15:23.627573 #1] INFO -- : File > /etc/runit/1.d/copy-env chmod: +x chown:
I, [2022-02-27T13:15:23.635113 #1] INFO -- : File > /etc/service/unicorn/run chmod: +x chown:
I, [2022-02-27T13:15:23.642512 #1] INFO -- : File > /etc/service/nginx/run chmod: +x chown:
I, [2022-02-27T13:15:23.649389 #1] INFO -- : File > /etc/runit/3.d/01-nginx chmod: +x chown:
I, [2022-02-27T13:15:23.656276 #1] INFO -- : File > /etc/runit/3.d/02-unicorn chmod: +x chown:
I, [2022-02-27T13:15:23.656857 #1] INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2022-02-27T13:15:23.657499 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2022-02-27T13:15:23.660628 #1] INFO -- : > cd /var/www/discourse && git reset --hard
130:C 27 Feb 2022 13:15:23.664 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
130:C 27 Feb 2022 13:15:23.664 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=130, just started
130:C 27 Feb 2022 13:15:23.664 # Configuration loaded
130:M 27 Feb 2022 13:15:23.665 * monotonic clock: POSIX clock_gettime
130:M 27 Feb 2022 13:15:23.666 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
130:M 27 Feb 2022 13:15:23.666 # Failed listening on port 6379 (TCP), aborting.
Updating files: 100% (30947/30947), done.
I, [2022-02-27T13:15:29.169205 #1] INFO -- : HEAD is now at e1367cde I18N: Improve copy on blocked words error messages (#15741)
I, [2022-02-27T13:15:29.169470 #1] INFO -- : > cd /var/www/discourse && git clean -f
I, [2022-02-27T13:15:29.344280 #1] INFO -- :
I, [2022-02-27T13:15:29.344569 #1] INFO -- : > cd /var/www/discourse && git remote set-branches --add origin main
I, [2022-02-27T13:15:29.350087 #1] INFO -- :
I, [2022-02-27T13:15:29.350318 #1] INFO -- : > cd /var/www/discourse && git remote set-branches origin tests-passed
I, [2022-02-27T13:15:29.355709 #1] INFO -- :
I, [2022-02-27T13:15:29.355974 #1] INFO -- : > cd /var/www/discourse && git fetch --depth 1 origin tests-passed
fatal: unable to access 'https://github.com/discourse/discourse.git/': Could not resolve host: github.com
I, [2022-02-27T13:15:49.400103 #1] INFO -- :
I, [2022-02-27T13:15:49.400811 #1] INFO -- : Terminating async processes
I, [2022-02-27T13:15:49.400896 #1] 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/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
I, [2022-02-27T13:15:49.401433 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 103
103:signal-handler (1645967749) Received SIGTERM scheduling shutdown...
2022-02-27 13:15:49.401 UTC [42] LOG: received fast shutdown request
103:M 27 Feb 2022 13:15:49.411 # User requested shutdown...
103:M 27 Feb 2022 13:15:49.411 * Saving the final RDB snapshot before exiting.
2022-02-27 13:15:49.448 UTC [42] LOG: aborting any active transactions
2022-02-27 13:15:49.451 UTC [42] LOG: background worker "logical replication launcher" (PID 51) exited with exit code 1
2022-02-27 13:15:49.452 UTC [46] LOG: shutting down
103:M 27 Feb 2022 13:15:49.469 * DB saved on disk
103:M 27 Feb 2022 13:15:49.469 # Redis is now ready to exit, bye bye...
2022-02-27 13:15:49.655 UTC [42] LOG: database system is shut down
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && git fetch --depth 1 origin tests-passed failed with return #<Process::Status: pid 141 exit 128>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin main", "git remote set-branches origin $version", "git fetch --depth 1 origin $version", "git checkout $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p /shared/tmp/{backups,restores}\"", "bash -c \"ln -s /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "find public/plugins/ -maxdepth 1 -xtype l -delete"]}
ff0cb1ccb91cf850a403193099c4cebdad079869235786bba2dad57d49cf9151
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
==================== END REBUILD LOG ====================
Failed to rebuild app.
Checking your domain name . . .
Connection to forum.mydomain.com succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . .
x86_64 arch detected.
+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -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_FORCE_HTTPS=true -e LC_ALL=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e EMBER_CLI_PROD_ASSETS=1 -e DISCOURSE_HOSTNAME=forum.mydomain.com -e DISCOURSE_DEVELOPER_EMAILS=admin@mydomain.com -e DISCOURSE_SMTP_ADDRESS=mail.mydomain.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=noreply@mydomain.com -e DISCOURSE_SMTP_PASSWORD=mypassword -e DISCOURSE_SMTP_DOMAIN=forum.mydomain.com -e DISCOURSE_NOTIFICATION_EMAIL=noreply@mydomain.com -e LETSENCRYPT_ACCOUNT_EMAIL=me@example.com -h debian-discourse-app -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 02:ea:03:0c:77:53 local_discourse/app /sbin/boot
Unable to find image 'local_discourse/app:latest' locally
docker: Error response from daemon: pull access denied for local_discourse/app, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Failed to restart the container.
==================== PLUGINS ====================
- git clone https://github.com/discourse/docker_manager.git
No non-official plugins detected.
See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.
========================================
Discourse version at forum.mydomain.com: NOT FOUND
Discourse version at localhost: NOT FOUND
==================== MEMORY INFORMATION ====================
RAM (MB): 2078
total used free shared buff/cache available
Mem: 1982 204 470 0 1307 1593
Swap: 2047 0 2047
==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 96G 5.5G 86G 6% /
==================== DISK INFORMATION ====================
Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: BHYVE SATA DISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 16384 bytes
I/O size (minimum/optimal): 16384 bytes / 16384 bytes
Disklabel type: gpt
Disk identifier: 0744CFC1-F98B-4694-9EBF-7F0697C68B40
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 205518847 204468224 97.5G Linux filesystem
/dev/sda3 205518848 209713151 4194304 2G Linux swap
==================== 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) [admin@mydomain.com]:
Sending mail to admin@mydomain.com. . .
Error: No such container: app
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to
==================== DONE! ====================
In the end, it will run behind a reverse proxy (why I didn’t configure letsencrypt), but this log was generated with ports 80 and 443 forwarded directly to this VM so the doctor could see that the domain routed correctly to it. Below I have some thoughts about what the problem might be, but I don’t know what troubleshooting steps to try next.
My guesses
I run a mailserver at mail.mydomain.com, which I was planning to use, and perhaps it’s not configured correctly. On it, I made the admin@ and noreply@ accounts, and I can send mail through it from mail.mydomain.com:587, and on the machine I can access it through telnet as expected. In any case, it seems like it fails to send mail because there is no docker container for the app.
Loading config incorrectly
No matter what I write in the config, I get lines like these ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
in the build log, even though it clearly loads the config correctly at the top. I’m not sure if that’s normal?
Redis port occupied
It seems like Redis starts twice, and the second time gets 130:M 27 Feb 2022 13:15:23.666 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
Can’t resolve github
There’s this troubling line [2022-02-27T13:15:29.355974 #1] INFO -- : > cd /var/www/discourse && git fetch --depth 1 origin tests-passed fatal: unable to access 'https://github.com/discourse/discourse.git/': Could not resolve host: github.com
but on the box I can resolve, ping and clone from github with no problem, and my firewall allows all outbound requests, so I’m not sure what I would do about it?
Thanks in advance for any help