Greetings of the day, experts!
Thanks to you all, I have always been able to sort out issues related to Discourse. I am planning to run another website, which is part of ideation of an idea.
However, I am getting the following error:
root@swapspace:/var/discourse# ./discourse rebuild app
-bash: ./discourse: No such file or directory
root@swapspace:/var/discourse# ./launcher rebuild app
WARNING: Support for aarch64 is experimental at the moment. Please report any problems at https://meta.dis course.org/tag/arm
Press any key to continue
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed
Please be patient
aarch64: Pulling from discourse/base
Digest: sha256:fb622774bd51f5cbc06e293e3aaf9b49c9b38166010365ef733a3b50d0e545bc
Status: Image is up to date for discourse/base:aarch64
docker.io/discourse/base:aarch64
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
aarch64: Pulling from discourse/base
Digest: sha256:fb622774bd51f5cbc06e293e3aaf9b49c9b38166010365ef733a3b50d0e545bc
Status: Image is up to date for discourse/base:aarch64
docker.io/discourse/base:aarch64
/usr/local/lib/ruby/gems/3.1.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-01-30T13:12:16.960651 #1] INFO -- : Reading from stdin
I, [2023-01-30T13:12:16.965317 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2023-01-30T13:12:16.989891 #1] INFO -- : Generating locales (this might take a while)...
Generation complete.
I, [2023-01-30T13:12:16.990061 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2023-01-30T13:12:16.993567 #1] INFO -- :
I, [2023-01-30T13:12:16.993720 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-01-30T13:12:16.996555 #1] INFO -- :
I, [2023-01-30T13:12:16.996699 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2023-01-30T13:12:16.999425 #1] INFO -- :
I, [2023-01-30T13:12:16.999561 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2023-01-30T13:12:17.002735 #1] INFO -- :
I, [2023-01-30T13:12:17.002877 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-01-30T13:12:17.005453 #1] INFO -- :
I, [2023-01-30T13:12:17.005593 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL .5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/01/30 13:12:17 socat[19] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2023-01-30T13:12:17.011034 #1] INFO -- :
I, [2023-01-30T13:12:17.011165 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-01-30T13:12:17.014169 #1] INFO -- :
I, [2023-01-30T13:12:17.014304 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-01-30T13:12:17.017208 #1] INFO -- :
I, [2023-01-30T13:12:17.017327 #1] INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-01-30T13:12:17.020248 #1] INFO -- :
I, [2023-01-30T13:12:17.020425 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_st at_tmp
I, [2023-01-30T13:12:17.023531 #1] INFO -- :
I, [2023-01-30T13:12:17.030362 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2023-01-30T13:12:17.036686 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown:
I, [2023-01-30T13:12:17.042787 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2023-01-30T13:12:17.048171 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown:
I, [2023-01-30T13:12:17.048529 #1] INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-01-30T13:12:19.018805 #1] INFO -- :
I, [2023-01-30T13:12:19.018957 #1] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o po stgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shar ed/postgres_data || exit 0
I, [2023-01-30T13:12:19.021611 #1] INFO -- :
I, [2023-01-30T13:12:19.021685 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-01-30T13:12:19.028927 #1] INFO -- :
I, [2023-01-30T13:12:19.029030 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-01-30T13:12:19.032323 #1] INFO -- :
I, [2023-01-30T13:12:19.032501 #1] INFO -- : > /root/upgrade_postgres
I, [2023-01-30T13:12:19.037473 #1] INFO -- :
I, [2023-01-30T13:12:19.037616 #1] INFO -- : > rm /root/upgrade_postgres
I, [2023-01-30T13:12:19.040384 #1] INFO -- :
I, [2023-01-30T13:12:19.040665 #1] INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' wit h data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.041163 #1] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addres ses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.042571 #1] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous _commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.043662 #1] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.044781 #1] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_m em in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.045770 #1] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with def ault_text_search_config = '$db_default_text_search_config' in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.046800 #1] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgre s_backup
I, [2023-01-30T13:12:19.050143 #1] INFO -- :
I, [2023-01-30T13:12:19.050475 #1] INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint _segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.050758 #1] INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_coll ector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2023-01-30T13:12:19.052086 #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, [2023-01-30T13:12:19.053245 #1] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/13/main/pg_hba.conf
I, [2023-01-30T13:12:19.053508 #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, [2023-01-30T13:12:19.054435 #1] INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2023-01-30T13:12:19.055129 #1] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postg res:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgres ql/13/main
I, [2023-01-30T13:12:19.057460 #1] INFO -- : > sleep 5
2023-01-30 13:12:19.085 UTC [42] LOG: starting PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on aarch64-unkno wn-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-01-30 13:12:19.085 UTC [42] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-01-30 13:12:19.085 UTC [42] LOG: listening on IPv6 address "::", port 5432
2023-01-30 13:12:19.090 UTC [42] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-01-30 13:12:19.096 UTC [45] LOG: database system was shut down at 2023-01-30 13:01:17 UTC
2023-01-30 13:12:19.102 UTC [42] LOG: database system is ready to accept connections
I, [2023-01-30T13:12:24.060600 #1] INFO -- :
I, [2023-01-30T13:12:24.060902 #1] INFO -- : > su postgres -c 'createdb discourse' || true
2023-01-30 13:12:24.106 UTC [55] postgres@postgres ERROR: database "discourse" already exists
2023-01-30 13:12:24.106 UTC [55] postgres@postgres STATEMENT: CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR: database "discourse" already exists
I, [2023-01-30T13:12:24.108125 #1] INFO -- :
I, [2023-01-30T13:12:24.108475 #1] INFO -- : > su postgres -c 'psql discourse -c "create user discourse;" ' || true
2023-01-30 13:12:24.153 UTC [59] postgres@discourse ERROR: role "discourse" already exists
2023-01-30 13:12:24.153 UTC [59] postgres@discourse STATEMENT: create user discourse;
ERROR: role "discourse" already exists
I, [2023-01-30T13:12:24.155493 #1] INFO -- :
I, [2023-01-30T13:12:24.155687 #1] INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-01-30T13:12:24.199357 #1] INFO -- : GRANT
I, [2023-01-30T13:12:24.199559 #1] INFO -- : > su postgres -c 'psql discourse -c "alter schema public own er to discourse;"'
I, [2023-01-30T13:12:24.242399 #1] INFO -- : ALTER SCHEMA
I, [2023-01-30T13:12:24.242694 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE: extension "hstore" already exists, skipping
I, [2023-01-30T13:12:24.289624 #1] INFO -- : CREATE EXTENSION
I, [2023-01-30T13:12:24.289961 #1] INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE: extension "pg_trgm" already exists, skipping
I, [2023-01-30T13:12:24.334433 #1] INFO -- : CREATE EXTENSION
I, [2023-01-30T13:12:24.334619 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE: extension "hstore" already exists, skipping
I, [2023-01-30T13:12:24.377306 #1] INFO -- : CREATE EXTENSION
I, [2023-01-30T13:12:24.377683 #1] INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE: extension "pg_trgm" already exists, skipping
I, [2023-01-30T13:12:24.420738 #1] INFO -- : CREATE EXTENSION
I, [2023-01-30T13:12:24.421047 #1] INFO -- : > sudo -u postgres psql discourse
I, [2023-01-30T13:12:24.423610 #1] INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8' ) where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');
I, [2023-01-30T13:12:24.474466 #1] INFO -- : File > /var/lib/postgresql/take-database-backup chmod: +x chown: postgres:postgres
I, [2023-01-30T13:12:24.478033 #1] INFO -- : File > /var/spool/cron/crontabs/postgres chmod: chown:
I, [2023-01-30T13:12:24.478139 #1] INFO -- : > echo postgres installed!
I, [2023-01-30T13:12:24.480672 #1] INFO -- : postgres installed!
I, [2023-01-30T13:12:24.486789 #1] INFO -- : File > /etc/service/redis/run chmod: +x chown:
I, [2023-01-30T13:12:24.493042 #1] INFO -- : File > /etc/service/redis/log/run chmod: +x chown:
I, [2023-01-30T13:12:24.499564 #1] INFO -- : File > /etc/runit/3.d/10-redis chmod: +x chown:
I, [2023-01-30T13:12:24.499790 #1] INFO -- : Replacing daemonize yes with in /etc/redis/redis.conf
I, [2023-01-30T13:12:24.500400 #1] INFO -- : Replacing (?-mix:^pidfile.*$) with in /etc/redis/redis.conf
I, [2023-01-30T13:12:24.502474 #1] INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-01-30T13:12:24.505510 #1] INFO -- :
I, [2023-01-30T13:12:24.505878 #1] INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/ redis.conf
I, [2023-01-30T13:12:24.506470 #1] INFO -- : Replacing (?-mix:^bind .*$) with in /etc/redis/redis.conf
I, [2023-01-30T13:12:24.508039 #1] INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /e tc/redis/redis.conf
I, [2023-01-30T13:12:24.509741 #1] INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2023-01-30T13:12:24.511760 #1] INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads i n /etc/redis/redis.conf
I, [2023-01-30T13:12:24.513175 #1] INFO -- : > echo redis installed
I, [2023-01-30T13:12:24.516185 #1] INFO -- : redis installed
I, [2023-01-30T13:12:24.516343 #1] INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-01-30T13:12:24.521028 #1] INFO -- : logfile ""
I, [2023-01-30T13:12:24.521181 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/re dis/redis.conf
I, [2023-01-30T13:12:24.523403 #1] INFO -- : > sleep 10
103:C 30 Jan 2023 13:12:24.529 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
103:C 30 Jan 2023 13:12:24.529 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=103, just started
103:C 30 Jan 2023 13:12:24.529 # Configuration loaded
103:M 30 Jan 2023 13:12:24.529 * monotonic clock: POSIX clock_gettime
103:M 30 Jan 2023 13:12:24.530 * Running mode=standalone, port=6379.
103:M 30 Jan 2023 13:12:24.530 # Server initialized
103:M 30 Jan 2023 13:12:24.530 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.ove rcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
103:M 30 Jan 2023 13:12:24.532 * Loading RDB produced by version 7.0.7
103:M 30 Jan 2023 13:12:24.532 * RDB age 667 seconds
103:M 30 Jan 2023 13:12:24.532 * RDB memory usage when created 0.85 Mb
103:M 30 Jan 2023 13:12:24.532 * Done loading RDB, keys loaded: 0, keys expired: 0.
103:M 30 Jan 2023 13:12:24.532 * DB loaded from disk: 0.000 seconds
103:M 30 Jan 2023 13:12:24.532 * Ready to accept connections
I, [2023-01-30T13:12:34.526480 #1] INFO -- :
I, [2023-01-30T13:12:34.526718 #1] INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-01-30T13:12:34.531166 #1] INFO -- : thpoff is installed!
I, [2023-01-30T13:12:34.531343 #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, [2023-01-30T13:12:34.595811 #1] INFO -- :
I, [2023-01-30T13:12:34.596054 #1] INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "d iscourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2023-01-30T13:12:34.662522 #1] INFO -- :
I, [2023-01-30T13:12:34.662839 #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 pos ts now to correct all posts."; exit 1; end'
I, [2023-01-30T13:12:34.727810 #1] INFO -- :
I, [2023-01-30T13:12:34.728212 #1] INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-01-30T13:12:34.731658 #1] INFO -- :
I, [2023-01-30T13:12:34.735393 #1] INFO -- : File > /etc/cron.d/anacron chmod: chown:
I, [2023-01-30T13:12:34.741917 #1] INFO -- : File > /etc/runit/1.d/copy-env chmod: +x chown:
I, [2023-01-30T13:12:34.748443 #1] INFO -- : File > /etc/service/unicorn/run chmod: +x chown:
I, [2023-01-30T13:12:34.754938 #1] INFO -- : File > /etc/service/nginx/run chmod: +x chown:
I, [2023-01-30T13:12:34.761618 #1] INFO -- : File > /etc/runit/3.d/01-nginx chmod: +x chown:
I, [2023-01-30T13:12:34.768619 #1] INFO -- : File > /etc/runit/3.d/02-unicorn chmod: +x chown:
I, [2023-01-30T13:12:34.768972 #1] INFO -- : Replacing # postgres with sv start postgres || exit 1 in /et c/service/unicorn/run
I, [2023-01-30T13:12:34.769874 #1] INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/re dis/redis.conf
I, [2023-01-30T13:12:34.773312 #1] INFO -- : > cd /var/www/discourse && git reset --hard
fatal: detected dubious ownership in repository at '/var/www/discourse'
To add an exception for this directory, call:
git config --global --add safe.directory /var/www/discourse
I, [2023-01-30T13:12:34.778171 #1] INFO -- :
131:C 30 Jan 2023 13:12:34.778 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
131:C 30 Jan 2023 13:12:34.778 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=131, just started
131:C 30 Jan 2023 13:12:34.778 # Configuration loaded
131:signal-handler (1675084354) Received SIGTERM scheduling shutdown...
103:signal-handler (1675084354) Received SIGTERM scheduling shutdown...
I, [2023-01-30T13:12:34.778513 #1] INFO -- : Terminating async processes
I, [2023-01-30T13:12:34.778546 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec c hpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 42
I, [2023-01-30T13:12:34.778589 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis- server /etc/redis/redis.conf pid: 103
I, [2023-01-30T13:12:34.778609 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis- server /etc/redis/redis.conf pid: 131
2023-01-30 13:12:34.778 UTC [42] LOG: received fast shutdown request
131:M 30 Jan 2023 13:12:34.779 * monotonic clock: POSIX clock_gettime
131:M 30 Jan 2023 13:12:34.779 # Warning: Could not create server TCP listening socket *:6379: bind: Addre ss already in use
131:M 30 Jan 2023 13:12:34.779 # Failed listening on port 6379 (TCP), aborting.
2023-01-30 13:12:34.781 UTC [42] LOG: aborting any active transactions
2023-01-30 13:12:34.784 UTC [42] LOG: background worker "logical replication launcher" (PID 51) exited wi th exit code 1
2023-01-30 13:12:34.786 UTC [46] LOG: shutting down
2023-01-30 13:12:34.810 UTC [42] LOG: database system is shut down
103:M 30 Jan 2023 13:12:34.852 # User requested shutdown...
103:M 30 Jan 2023 13:12:34.852 * Saving the final RDB snapshot before exiting.
103:M 30 Jan 2023 13:12:34.857 * DB saved on disk
103:M 30 Jan 2023 13:12:34.857 # Redis is now ready to exit, bye bye...
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && git reset --hard failed with return #<Process::Status: pid 133 e xit 128>
Location of failure: /usr/local/lib/ruby/gems/3.1.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", "g it 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", "bas h -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,si dekiq}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdou t,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "b ash -c \"ln -s /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p /shar ed/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", "[ ! -d public /plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128
** 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.
18ae8309291a1462106c7ac875cda6ff6f8d81189596e16b51e64715da39a324
I am a noob, not sure where the error is. That’s why, I am here. I hope one of the experts will come up to help me out.
By the way, the firewall status is disabled. My server is using an ARM based CPU; however, my main instance is running on a different server with the same CPU, working fine!
Thanks a lot