Fatal: unable to access 'https://github.com/discourse/discourse.git/': getaddrinfo() thread failed to start

Cannot build new versions of Discourse, keep getting this error:

But when I test the same link from the command line, it works fine.

The Discourse build process been giving this error for the past 5 days.

@vbe , any discussions on this over at meta discourse?

:frowning:

Try git clone on it.
See also

1 Like

This is from the last 2 days:

But now:

and
Laucher rebuild app fails - #2 by pinder99 - installation - Discourse Meta :rofl: Hello, I spent some time searching for a solution to my problem, so I decided to post a request for help here. Any help would be greatly appreciated.
thank you.

My Discourse update failed when trying to rebuild using the sudo ./launcher rebuild app command.

here is the error :

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 612 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** 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.

and here is the complete output.

x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
Ensuring launcher is up to date
Fetching origin
remote: Enumerating objects: 98, done.
remote: Counting objects: 100% (98/98), done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 98 (delta 44), reused 91 (delta 41), pack-reused 0 (from 0)
Unpacking objects: 100% (98/98), 33.85 KiB | 1.30 MiB/s, done.
From https://github.com/discourse/discourse_docker
   595dd6a..cfe8aa0  main               -> origin/main
 * [new branch]      clean-bundle-cache -> origin/clean-bundle-cache
 * [new branch]      launcher2-runtime  -> origin/launcher2-runtime
Updating Launcher...
Updating 595dd6a..cfe8aa0
Fast-forward
 .github/workflows/build.yml             |   8 +++++++-
 .github/workflows/launcher_go.yml       |  45 +++++++++++++++++++++++++++++++++++++++++++++
 image/base/install-nginx                |   2 ++
 image/base/install-oxipng               |   2 +-
 launcher_go/v2/cli_build.go             |  63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 launcher_go/v2/cli_build_test.go        | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
 launcher_go/v2/config/config.go         |  23 ++++++++++++-----------
 launcher_go/v2/docker/commands.go       |  48 +++++++++++++++++++++++++++++++++++-------------
 launcher_go/v2/main.go                  |   2 ++
 launcher_go/v2/test/containers/test.yml |   3 ++-
 10 files changed, 286 insertions(+), 42 deletions(-)
 create mode 100644 .github/workflows/launcher_go.yml
Launcher updated, restarting...
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 600 app
app
2.0.20240825-0027: Pulling from discourse/base
Digest: sha256:6de68cb49198b5281f79ed9401b3fe818c854d220dcf0238549fe2f2adb19146
Status: Image is up to date for discourse/base:2.0.20240825-0027
docker.io/discourse/base:2.0.20240825-0027
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-08-30T06:56:18.948183 #1]  INFO -- : Reading from stdin
I, [2024-08-30T06:56:18.964205 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown: 
I, [2024-08-30T06:56:18.968049 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2024-08-30T06:56:18.971804 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2024-08-30T06:56:18.975928 #1]  INFO -- : File > /root/install_postgres  chmod: +x  chown: 
I, [2024-08-30T06:56:18.980242 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown: 
I, [2024-08-30T06:56:18.981315 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/13/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/13/main/postgresql.conf
I, [2024-08-30T06:56:18.982464 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/13/main/postgresql.conf
I, [2024-08-30T06:56:18.983257 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/13/main/postgresql.conf
I, [2024-08-30T06:56:18.983946 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/13/main/postgresql.conf
I, [2024-08-30T06:56:18.984609 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/13/main/postgresql.conf
I, [2024-08-30T06:56:18.985516 #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, [2024-08-30T06:56:18.986191 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/13/main/postgresql.conf
I, [2024-08-30T06:56:18.986778 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/13/main/postgresql.conf
I, [2024-08-30T06:56:18.987367 #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, [2024-08-30T06:56:18.988402 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/13/main/pg_hba.conf
I, [2024-08-30T06:56:18.988907 #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, [2024-08-30T06:56:18.989381 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*::1\/128.*$) with host all all ::/0 md5 in /etc/postgresql/13/main/pg_hba.conf
I, [2024-08-30T06:56:18.989926 #1]  INFO -- : > if [ -f /root/install_postgres ]; then
  /root/install_postgres && rm -f /root/install_postgres
elif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then
  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi

I, [2024-08-30T06:56:20.337068 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2024-08-30T06:56:20.337989 #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, [2024-08-30T06:56:20.346153 #1]  INFO -- : File > /usr/local/bin/create_db  chmod: +x  chown: 
I, [2024-08-30T06:56:20.361384 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2024-08-30T06:56:20.368046 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2024-08-30T06:56:20.368835 #1]  INFO -- : > sleep 5
2024-08-30 06:56:20.427 UTC [36] LOG:  starting PostgreSQL 13.16 (Debian 13.16-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-08-30 06:56:20.427 UTC [36] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-08-30 06:56:20.428 UTC [36] LOG:  listening on IPv6 address "::", port 5432
2024-08-30 06:56:20.431 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-08-30 06:56:20.436 UTC [45] LOG:  database system was shut down at 2024-08-30 06:56:09 UTC
2024-08-30 06:56:20.444 UTC [36] LOG:  database system is ready to accept connections
I, [2024-08-30T06:56:25.374933 #1]  INFO -- : 
I, [2024-08-30T06:56:25.375218 #1]  INFO -- : > /usr/local/bin/create_db
2024-08-30 06:56:25.471 UTC [55] postgres@postgres ERROR:  database "discourse" already exists
2024-08-30 06:56:25.471 UTC [55] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: error: database creation failed: ERROR:  database "discourse" already exists
2024-08-30 06:56:25.550 UTC [58] postgres@discourse ERROR:  role "discourse" already exists
2024-08-30 06:56:25.550 UTC [58] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
NOTICE:  extension "hstore" already exists, skipping
NOTICE:  extension "pg_trgm" already exists, skipping
NOTICE:  extension "vector" already exists, skipping
NOTICE:  version "0.7.4" of extension "vector" is already installed
NOTICE:  extension "hstore" already exists, skipping
NOTICE:  extension "pg_trgm" already exists, skipping
NOTICE:  extension "vector" already exists, skipping
NOTICE:  version "0.7.4" of extension "vector" is already installed
I, [2024-08-30T06:56:26.292454 #1]  INFO -- : GRANT
ALTER SCHEMA
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
ALTER EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
ALTER EXTENSION
UPDATE 0

I, [2024-08-30T06:56:26.293093 #1]  INFO -- : > echo postgres installed!
I, [2024-08-30T06:56:26.295550 #1]  INFO -- : postgres installed!

I, [2024-08-30T06:56:26.300606 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown: 
I, [2024-08-30T06:56:26.309609 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2024-08-30T06:56:26.315683 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2024-08-30T06:56:26.316967 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2024-08-30T06:56:26.318451 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2024-08-30T06:56:26.319623 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2024-08-30T06:56:26.323067 #1]  INFO -- : 
I, [2024-08-30T06:56:26.323773 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2024-08-30T06:56:26.324542 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2024-08-30T06:56:26.325226 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2024-08-30T06:56:26.326011 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2024-08-30T06:56:26.326740 #1]  INFO -- : Replacing # io-threads 4 with io-threads $redis_io_threads in /etc/redis/redis.conf
I, [2024-08-30T06:56:26.327389 #1]  INFO -- : > echo redis installed
I, [2024-08-30T06:56:26.330197 #1]  INFO -- : redis installed

I, [2024-08-30T06:56:26.330677 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2024-08-30T06:56:26.336165 #1]  INFO -- : logfile ""

I, [2024-08-30T06:56:26.336499 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-08-30T06:56:26.337966 #1]  INFO -- : > sleep 10
104:C 30 Aug 2024 06:56:26.348 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
104:C 30 Aug 2024 06:56:26.348 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=104, just started
104:C 30 Aug 2024 06:56:26.348 # Configuration loaded
104:M 30 Aug 2024 06:56:26.349 * monotonic clock: POSIX clock_gettime
104:M 30 Aug 2024 06:56:26.349 * Running mode=standalone, port=6379.
104:M 30 Aug 2024 06:56:26.349 # Server initialized
104:M 30 Aug 2024 06:56:26.350 # 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.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
104:M 30 Aug 2024 06:56:26.350 * Loading RDB produced by version 7.0.7
104:M 30 Aug 2024 06:56:26.350 * RDB age 17 seconds
104:M 30 Aug 2024 06:56:26.350 * RDB memory usage when created 3.73 Mb
104:M 30 Aug 2024 06:56:26.362 * Done loading RDB, keys loaded: 2858, keys expired: 0.
104:M 30 Aug 2024 06:56:26.362 * DB loaded from disk: 0.012 seconds
104:M 30 Aug 2024 06:56:26.362 * Ready to accept connections
I, [2024-08-30T06:56:36.342328 #1]  INFO -- : 
I, [2024-08-30T06:56:36.342654 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2024-08-30T06:56:36.348798 #1]  INFO -- : thpoff is installed!

I, [2024-08-30T06:56:36.349280 #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, [2024-08-30T06:56:36.454702 #1]  INFO -- : 
I, [2024-08-30T06:56:36.454873 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2024-08-30T06:56:36.556018 #1]  INFO -- : 
I, [2024-08-30T06:56:36.556202 #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, [2024-08-30T06:56:36.657888 #1]  INFO -- : 
I, [2024-08-30T06:56:36.658084 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2024-08-30T06:56:36.660378 #1]  INFO -- : 
I, [2024-08-30T06:56:36.662911 #1]  INFO -- : File > /etc/cron.d/anacron  chmod:   chown: 
I, [2024-08-30T06:56:36.668033 #1]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2024-08-30T06:56:36.672293 #1]  INFO -- : File > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2024-08-30T06:56:36.676557 #1]  INFO -- : File > /etc/service/nginx/run  chmod: +x  chown: 
I, [2024-08-30T06:56:36.680699 #1]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2024-08-30T06:56:36.684848 #1]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2024-08-30T06:56:36.684970 #1]  INFO -- : Replacing # postgres with if [ -f /root/install_postgres ]; then
  /root/install_postgres
  rm /root/install_postgres
fi
sv start postgres || exit 1
 in /etc/service/unicorn/run
I, [2024-08-30T06:56:36.686390 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
Updating files: 100% (34680/34680), done.
I, [2024-08-30T06:56:40.963927 #1]  INFO -- : HEAD is now at 274e18622 FIX: Video uploads sometimes hang indefinitely (#28523)

I, [2024-08-30T06:56:40.964459 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2024-08-30T06:56:41.127206 #1]  INFO -- : 
I, [2024-08-30T06:56:41.128273 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
'
From https://github.com/discourse/discourse
 - [deleted]             (none)     -> origin/0-a-gjs-ace
 - [deleted]             (none)     -> origin/better-respect-End-key-in-topics
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/ember-cli-deprecation-workflow-3.0.2
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/ember/test-helpers-4.0.1
 - [deleted]             (none)     -> origin/dependabot/npm_and_yarn/eslint-9.7.0
 - [deleted]             (none)     -> origin/feature/site-text-result-selected-lang
 - [deleted]             (none)     -> origin/fix/add-user-to-user-directory-when-activated
 - [deleted]             (none)     -> origin/issue/fix-bookmark-clearing-reminder
 - [deleted]             (none)     -> origin/native-class-components-2
 - [deleted]             (none)     -> origin/native-class-components-3
 - [deleted]             (none)     -> origin/notifications_id_bigint
 - [deleted]             (none)     -> origin/prevent-desktop-notifications-on-mobile
 - [deleted]             (none)     -> origin/ux/admin-plugins-ui-guidelines
   274e18622..361e954c5  main                    -> origin/main
 * [new branch]          add-ability-to-watch-chat-threads -> origin/add-ability-to-watch-chat-threads
   3729ac14c..0fafa0bb4  category-experts-approved-webhook-event -> origin/category-experts-approved-webhook-event
 * [new branch]          class-initializer       -> origin/class-initializer
 * [new branch]          dependabot/bundler/ruby-readability-0.7.2 -> origin/dependabot/bundler/ruby-readability-0.7.2
 * [new branch]          dependabot/npm_and_yarn/ace-builds-1.36.1 -> origin/dependabot/npm_and_yarn/ace-builds-1.36.1
 * [new branch]          dependabot/npm_and_yarn/babel-fcd205ed66 -> origin/dependabot/npm_and_yarn/babel-fcd205ed66
 * [new branch]          dependabot/npm_and_yarn/puppeteer-core-23.2.1 -> origin/dependabot/npm_and_yarn/puppeteer-core-23.2.1
 * [new branch]          dev-make-user-1-1-with-user-password -> origin/dev-make-user-1-1-with-user-password
 * [new branch]          dev/glimmer-post-menu   -> origin/dev/glimmer-post-menu
 * [new branch]          dev/port-outlet-wrapper-to-stable -> origin/dev/port-outlet-wrapper-to-stable
 * [new branch]          dev/remove-deprecated-respect-plugin-positional-argument -> origin/dev/remove-deprecated-respect-plugin-positional-argument
 * [new branch]          drop-old-notification-id-columns -> origin/drop-old-notification-id-columns
 * [new branch]          ember-native-class      -> origin/ember-native-class
 * [new branch]          feature/add-user-to-topic_tags_changed-event -> origin/feature/add-user-to-topic_tags_changed-event
 * [new branch]          feature/support-multiple-moderation-groups-on-category -> origin/feature/support-multiple-moderation-groups-on-category
 * [new branch]          fix-bookmarks-filtering -> origin/fix-bookmarks-filtering
 * [new branch]          fix/check-existing-custom-flags-before-creation -> origin/fix/check-existing-custom-flags-before-creation
 * [new branch]          login-buttons-multiple-class -> origin/login-buttons-multiple-class
 + a25ac32bc...97bd38cf4 mt/converter            -> origin/mt/converter  (forced update)
   d3ad2ecda..15f036baf  stable                  -> origin/stable
   274e18622..361e954c5  tests-passed            -> origin/tests-passed
 * [new branch]          translations-from-crowdin-stable -> origin/translations-from-crowdin-stable
 * [new branch]          unique-tag-user-notification -> origin/unique-tag-user-notification
 * [new branch]          ux-1pw-ignore           -> origin/ux-1pw-ignore
 * [new branch]          ux/convert-chat-plugin-ui -> origin/ux/convert-chat-plugin-ui
 * [new branch]          ux_form_template_flash  -> origin/ux_form_template_flash
 t [tag update]          beta                    -> beta
 t [tag update]          latest-release          -> latest-release
 * [new tag]             v3.3.1                  -> v3.3.1
 * [new tag]             v3.4.0.beta1            -> v3.4.0.beta1
I, [2024-08-30T06:56:42.073269 #1]  INFO -- : 
I, [2024-08-30T06:56:42.073714 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [[ $(git symbolic-ref --short HEAD) == tests-passed ]] ; then
      git pull
  else
      git -c advice.detachedHead=false checkout tests-passed
  fi
'
Switched to a new branch 'tests-passed'
I, [2024-08-30T06:56:44.851651 #1]  INFO -- : branch 'tests-passed' set up to track 'origin/tests-passed'.

I, [2024-08-30T06:56:44.852217 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git config user.discourse-version tests-passed
I, [2024-08-30T06:56:44.865672 #1]  INFO -- : 
I, [2024-08-30T06:56:44.865986 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp
I, [2024-08-30T06:56:44.868951 #1]  INFO -- : 
I, [2024-08-30T06:56:44.869247 #1]  INFO -- : > cd /var/www/discourse && chown discourse:www-data tmp
I, [2024-08-30T06:56:44.872276 #1]  INFO -- : 
I, [2024-08-30T06:56:44.872501 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2024-08-30T06:56:44.875816 #1]  INFO -- : 
I, [2024-08-30T06:56:44.876029 #1]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2024-08-30T06:56:44.879320 #1]  INFO -- : 
I, [2024-08-30T06:56:44.879578 #1]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2024-08-30T06:56:44.882918 #1]  INFO -- : 
I, [2024-08-30T06:56:44.883194 #1]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2024-08-30T06:56:44.886219 #1]  INFO -- : 
I, [2024-08-30T06:56:44.886447 #1]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log"
I, [2024-08-30T06:56:44.890808 #1]  INFO -- : 
I, [2024-08-30T06:56:44.891103 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log /var/www/discourse/log"
I, [2024-08-30T06:56:44.895797 #1]  INFO -- : 
I, [2024-08-30T06:56:44.896013 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2024-08-30T06:56:44.900610 #1]  INFO -- : 
I, [2024-08-30T06:56:44.901011 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2024-08-30T06:56:44.905409 #1]  INFO -- : 
I, [2024-08-30T06:56:44.905624 #1]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/tmp/{backups,restores}"
I, [2024-08-30T06:56:44.910429 #1]  INFO -- : 
I, [2024-08-30T06:56:44.910686 #1]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/tmp/{backups,restores} /var/www/discourse/tmp"
I, [2024-08-30T06:56:44.915057 #1]  INFO -- : 
I, [2024-08-30T06:56:44.915356 #1]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
I, [2024-08-30T06:56:44.938455 #1]  INFO -- : 
I, [2024-08-30T06:56:44.938891 #1]  INFO -- : > cd /var/www/discourse && [ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete
I, [2024-08-30T06:56:44.941762 #1]  INFO -- : 
I, [2024-08-30T06:56:44.942235 #1]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2024-08-30T06:56:44.942951 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2024-08-30T06:56:45.959336 #1]  INFO -- : 
I, [2024-08-30T06:56:45.959554 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/discourse-calendar
Cloning into 'discourse-calendar'...
I, [2024-08-30T06:56:46.979465 #1]  INFO -- : 
I, [2024-08-30T06:56:46.979867 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/paviliondev/discourse-events
Cloning into 'discourse-events'...
I, [2024-08-30T06:56:47.680698 #1]  INFO -- : 
I, [2024-08-30T06:56:47.681126 #1]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/xomads/discourse-video-upload
Cloning into 'discourse-video-upload'...
I, [2024-08-30T06:56:48.323561 #1]  INFO -- : 
I, [2024-08-30T06:56:48.324134 #1]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2024-08-30T06:56:48.328453 #1]  INFO -- : 
I, [2024-08-30T06:56:48.329067 #1]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2024-08-30T06:56:48.331726 #1]  INFO -- : 
I, [2024-08-30T06:56:48.332230 #1]  INFO -- : > mkdir -p /var/nginx/cache
I, [2024-08-30T06:56:48.335070 #1]  INFO -- : 
I, [2024-08-30T06:56:48.335953 #1]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2024-08-30T06:56:48.336609 #1]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2024-08-30T06:56:48.337166 #1]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2024-08-30T06:56:48.337686 #1]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2024-08-30T06:56:48.338218 #1]  INFO -- : Replacing (?-mix:worker_connections.+$) with worker_connections $nginx_worker_connections ; in /etc/nginx/nginx.conf
I, [2024-08-30T06:56:48.338673 #1]  INFO -- : > echo "done configuring web"
I, [2024-08-30T06:56:48.340760 #1]  INFO -- : done configuring web

I, [2024-08-30T06:56:48.341186 #1]  INFO -- : > cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock)
I, [2024-08-30T06:56:48.663785 #1]  INFO -- : 
I, [2024-08-30T06:56:48.663958 #1]  INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
I, [2024-08-30T06:56:50.010467 #1]  INFO -- : 
I, [2024-08-30T06:56:50.010985 #1]  INFO -- : > cd /var/www/discourse && if [ "tests-passed" != "tests-passed" ]; then
  rm -rf app/assets/javascripts/node_modules
fi
I, [2024-08-30T06:56:50.012899 #1]  INFO -- : 
I, [2024-08-30T06:56:50.013108 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn config set network-timeout 60000 -g'
I, [2024-08-30T06:56:50.386384 #1]  INFO -- : yarn config v1.22.22
success Set "network-timeout" to "60000".
Done in 0.08s.

I, [2024-08-30T06:56:50.386945 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
warning Resolution field "unset-value@2.0.1" is incompatible with requested version "unset-value@^1.0.0"
warning " > @discourse/lint-configs@1.3.9" has incorrect peer dependency "ember-template-lint@6.0.0".
warning " > @glint/environment-ember-loose@1.4.0" has unmet peer dependency "@glimmer/component@^1.1.2".
warning " > discourse-markdown-it@1.0.0" has unmet peer dependency "xss@*".
warning "workspace-aggregator-f15441dd-2a2f-4d3b-8279-019453a69d41 > discourse > @uppy/aws-s3@3.0.6" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-f15441dd-2a2f-4d3b-8279-019453a69d41 > discourse > @uppy/aws-s3-multipart@3.1.3" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-f15441dd-2a2f-4d3b-8279-019453a69d41 > discourse > @uppy/xhr-upload@3.1.1" has incorrect peer dependency "@uppy/core@^3.1.2".
warning "workspace-aggregator-f15441dd-2a2f-4d3b-8279-019453a69d41 > discourse-plugins > ember-this-fallback@0.4.0" has unmet peer dependency "ember-source@^3.28.11 || ^4.0.0".
warning "workspace-aggregator-f15441dd-2a2f-4d3b-8279-019453a69d41 > admin > ember-source > router_js@8.0.3" has unmet peer dependency "rsvp@^4.8.5".
warning "workspace-aggregator-f15441dd-2a2f-4d3b-8279-019453a69d41 > discourse > @uppy/aws-s3 > @uppy/xhr-upload@3.3.0" has incorrect peer dependency "@uppy/core@^3.2.1".
I, [2024-08-30T06:59:00.836576 #1]  INFO -- : yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
$ ./app/assets/javascripts/run-patch-package && rm -rf app/assets/javascripts/node_modules
patch-package 8.0.0
Applying patches...
babel-plugin-debug-macros@0.3.4 ✔
content-tag@2.0.1 ✔
decorator-transforms@2.0.0 ✔
ember-this-fallback@0.4.0 (1 deprecation-name) ✔
ember-this-fallback@0.4.0 (2 themes) ✔
ember-this-fallback@0.4.0 (3 exclude-strict-mode) ✔
virtual-dom@2.1.1 ✔
Done in 121.86s.
yarn cache v1.22.22
success Cleared cache.
Done in 7.97s.

I, [2024-08-30T06:59:00.838203 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
I, [2024-08-30T06:59:08.967237 #1]  INFO -- : Fetching gem metadata from https://rubygems.org/........
Fetching net-imap 0.4.15
Installing net-imap 0.4.15
Fetching css_parser 1.19.0
Installing css_parser 1.19.0
Fetching uri 0.13.1
Installing uri 0.13.1
Fetching faraday-net_http 3.3.0
Installing faraday-net_http 3.3.0
Fetching faraday 2.11.0
Installing faraday 2.11.0
Fetching google-protobuf 4.28.0 (x86_64-linux)
Installing google-protobuf 4.28.0 (x86_64-linux)
Fetching highline 3.1.1
Installing highline 3.1.1
Fetching thor 1.3.2
Installing thor 1.3.2
Fetching omniauth-oauth 1.2.1
Installing omniauth-oauth 1.2.1
Bundle complete! 142 Gemfile dependencies, 184 gems now installed.
Gems in the groups 'test' and 'development' were not installed.
Bundled gems are installed into `./vendor/bundle`
1 installed gem you directly depend on is looking for funding.
  Run `bundle fund` for details

I, [2024-08-30T06:59:08.967865 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2024-08-30T06:59:13.800474 #1]  INFO -- : discourse-calendar is already at latest compatible version
discourse-events is already at latest compatible version
discourse-video-upload is already at latest compatible version
docker_manager is already at latest compatible version

I, [2024-08-30T06:59:13.801181 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-08-30T06:59:13.803288 #1]  INFO -- : > sleep 10
608:C 30 Aug 2024 06:59:13.823 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
608:C 30 Aug 2024 06:59:13.823 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=608, just started
608:C 30 Aug 2024 06:59:13.823 # Configuration loaded
608:M 30 Aug 2024 06:59:13.824 * monotonic clock: POSIX clock_gettime
608:M 30 Aug 2024 06:59:13.824 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
608:M 30 Aug 2024 06:59:13.824 # Failed listening on port 6379 (TCP), aborting.
I, [2024-08-30T06:59:23.807920 #1]  INFO -- : 
I, [2024-08-30T06:59:23.808747 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
[DiscourseVideoUpload] Javascript files under `assets/javascripts` are automatically included in JS bundles.
Manual register_asset calls should be removed. (attempted to add javascripts/lib/vimeo-upload.js)
/var/www/discourse/lib/plugin/instance.rb:717:in `register_asset'
/var/www/discourse/plugins/discourse-video-upload/plugin.rb:13:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:778:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:778:in `activate!'
/var/www/discourse/lib/discourse.rb:348:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:345:in `each'
/var/www/discourse/lib/discourse.rb:345:in `activate_plugins!'
/var/www/discourse/config/application.rb:232:in `block in <class:Application>'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:232:in `<class:Application>'
/var/www/discourse/config/application.rb:75:in `<module:Discourse>'
/var/www/discourse/config/application.rb:74:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)
I, [2024-08-30T06:59:55.564695 #1]  INFO -- : gem install uuidtools -v 2.2.0 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed uuidtools-2.2.0
1 gem installed
gem install iso-639 -v 0.3.5 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed iso-639-0.3.5
1 gem installed
gem install ice_cube -v 0.16.4 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed ice_cube-0.16.4
1 gem installed
gem install icalendar -v 2.8.0 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
ActiveSupport is required for TimeWithZone support, but not required for general use.
Successfully installed icalendar-2.8.0
1 gem installed
gem install icalendar-recurrence -v 1.1.3 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed icalendar-recurrence-1.1.3
1 gem installed
gem install date -v 3.3.4 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Building native extensions. This could take a while...
Successfully installed date-3.3.4
1 gem installed
gem install time -v 0.2.0 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed time-0.2.0
1 gem installed
gem install stringio -v 3.1.1 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Building native extensions. This could take a while...
Successfully installed stringio-3.1.1
1 gem installed
gem install omnievent -v 0.1.0.pre3 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed omnievent-0.1.0.pre3
1 gem installed
gem install omnievent-icalendar -v 0.1.0.pre5 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed omnievent-icalendar-0.1.0.pre5
1 gem installed
gem install omnievent-api -v 0.1.0.pre2 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed omnievent-api-0.1.0.pre2
1 gem installed
gem install omnievent-eventbrite -v 0.1.0.pre2 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed omnievent-eventbrite-0.1.0.pre2
1 gem installed
gem install omnievent-eventzilla -v 0.1.0.pre2 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed omnievent-eventzilla-0.1.0.pre2
1 gem installed
gem install omnievent-meetup -v 0.1.0.pre1 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed omnievent-meetup-0.1.0.pre1
1 gem installed
gem install omnievent-outlook -v 0.1.0.pre2 -i /var/www/discourse/plugins/discourse-events/gems/3.3.4 --no-document --ignore-dependencies --no-user-install
Successfully installed omnievent-outlook-0.1.0.pre2
1 gem installed

I, [2024-08-30T06:59:55.565538 #1]  INFO -- : Terminating async processes
I, [2024-08-30T06:59:55.565618 #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: 36
I, [2024-08-30T06:59:55.565721 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 104
104:signal-handler (1725001195) Received SIGTERM scheduling shutdown...
2024-08-30 06:59:55.566 UTC [36] LOG:  received fast shutdown request
2024-08-30 06:59:55.568 UTC [36] LOG:  aborting any active transactions
2024-08-30 06:59:55.572 UTC [36] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2024-08-30 06:59:55.578 UTC [46] LOG:  shutting down
104:M 30 Aug 2024 06:59:55.599 # User requested shutdown...
104:M 30 Aug 2024 06:59:55.599 * Saving the final RDB snapshot before exiting.
2024-08-30 06:59:55.612 UTC [36] LOG:  database system is shut down
104:M 30 Aug 2024 06:59:55.622 * DB saved on disk
104:M 30 Aug 2024 06:59:55.622 # 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 612 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
** 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.
df03c3401b35e1722e269363f40677ac73227c543d2bac52730700a30795f531

Reply

17views

read12 min

Summarize

last visit

Pushpender Singhpinder99Theme Author

2

1h

remove the plugin discourse-events and try rebuild again

Reply

RobertmerefieldPlugin Author

1h

No I don’t think it’s that. Why do you say that @pinder99 ?

It’s DiscourseVideoUpload, remove that plugin.

You can see from the log it has issues.

I don’t see any issues in the log related to events.

1 Like

Thanks. That is the first thing I tried. It works fine from the command line.

neo@unix:~$ sudo -i
[sudo] password for neo: 
unix:~# cd /tmp
unix:/tmp# git clone https://github.com/discourse/discourse.git/
Cloning into 'discourse'...
remote: Enumerating objects: 758208, done.
remote: Counting objects: 100% (1369/1369), done.
remote: Compressing objects: 100% (898/898), done.
receiving objects:  26% (197135/758208), 170.41 MiB | 29.14 MiB/s 
.... # blah blah blah

We don't use that plugin.

We don't have that plugin either.

Appendix: Snippet from Failed Build

I, [2024-08-30T11:44:37.526671 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2024-08-30T11:44:37.644229 #1]  INFO -- : 
I, [2024-08-30T11:44:37.644292 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
'
fatal: unable to access 'https://github.com/discourse/discourse.git/': getaddrinfo() thread failed to start
I, [2024-08-30T11:44:37.717196 #1]  INFO -- : 


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
      git remote set-branches --add origin main
      git remote set-branches origin tests-passed
      git fetch --depth 1 origin tests-passed
  else
      git fetch --tags --prune-tags --prune --force origin
  fi
' failed with return #<Process::Status: pid 32 exit 128>

FWIW, outside of specific Discourse issues (which I know next to zero about) and talking generally about 'git', this error is usually caused by a firewall getting in the way. And yes, many people have seen this occur suddenly after having no issues for years.

I appreciate that you are almost certainly remote from the server but can you turn off the firewall whilst the build is taking place?

Alternatively, sometimes this type of error can be circumvented by using one of the workarounds:-

$ git remote set-url origin http://<IP>:<http_port>/<repository>.git

or

$ git remote set-url origin ssh://<username>@<FQDN>:<ssh_port>/<repository>.git

That's my two cents.

To be brutally honest, there is no firewall and so there is no firewall to "turn off".

As I mentioned, git clone works fine from the command line outside the container.

This git clone process error occurs inside the container while the Discourse the build process is in progress.

So, it seems there is an issue with how Discourse script builds it's own container and sets up the container ports - that is (at least) my guess.

So, I checked the current running container:

docker exec -it socket2 bash
cd /tmp
git clone https://github.com/discourse/discourse.git/

and of course it works.... the most sensible (in my mind) conclusion is that there is an issue with the build script for the Discourse docker container .

From current container...

Cloning into 'discourse'...
remote: Enumerating objects: 758448, done.
remote: Counting objects: 100% (1609/1609), done.
remote: Compressing objects: 100% (968/968), done.
receiving objects:   9% (68662/758448), 15.92 MiB | 31.83 MiB/s
.... # blah blah
1 Like

Test-run git commands in the right context: docker container and in sudo -H -E -u discourse bash

I asked @vbe to check the Discourse forums; just to see if anyone else has posted this problem in the newest release; since we always run the latest release. Maybe someone else at this time is reporting the same issue, if not, that's fine.

On another note, I rebuild Discourse almost twice weekly (100s of times over the years) on average; and nothing has changed on the server. There are no firewalls, nothing has changed except Discourse.

The only thing which has definately changed is that I pulled the latest Discourse repo. When we we pull repos we get new files; and so the only thing which has changed is Discourse.

This is pretty basic right? You pull a repo, the app breaks. No other changes are on the platform (except everyday log file updates of course, hahaha)

So, to repeat! There have been zero changes on the server except pulling the Discourse repo and after pulling the repo, the app will not build for our site.

The container I built before pulling the "deadly repo" is the container we are all reading and typing in now; so obviously there is no platform error on the server :slight_smile:

I simply cannot rebuild Discourse after the last repo pull which changed many of the install and build templates.

There is no doubt I can fix this issue sooner or later; and I am posting this in case others Google'ing around for a similar issue will benefit from our problem and problem resolution process and fix (when we eventually find a fix).

..... and I had hoped @vbe might have seen something similar posted on Meta over there, if not, I'm perfectly happy either way.

Thank you @vbe for checking !!!

If I am not mistaken, I think this suggested answer came from a Google search result here:

Because I found the same reply from my own Google search a few days ago:

Google Search

"getaddrinfo() thread failed to start" docker

And the second search result (from here) was:

I like the idea of checking to see if changing the FQDN of the repo in the build script to the IP address to see if that solves the issue and will try that next.

Interesting, I have already tested that in the current running container we are all using now, and there is no issue with IP address resolution in the container, but maybe the build process has changed.

Lemme try some blind guesses.

What does docker image ls produce, do you see newer stuff pulled regarding image version during build e.g alpine:latest or whatever gets pulled ?

Can you try (while using image which build process uses) to issue getent hosts <FQDN> or using curl to simulate the error as mentioned in some search results ?
If you curl or wget some file from the git repo from OS, does https work without -k option ?

Can you also try adding the github IP address <-> host mapping in /etc/hosts file (on the host hosting the containers) and then test.

Regards.
Peasant.

I tried that in the current working container, and it works fine:

root@-socket2:/ sudo -H -E -u discourse bash
discourse@socket2:/$ cd /tmp
discourse@socket2:/tmp$ git clone https://github.com/discourse/discourse.git/
...blah blah, clones just fine

Changed the .git config github.com to the IP address, and same error.

Adding a bunch of echo statements to launcher to see if that yields any clues.

None so far.

Nothing remarkable:

ubuntu:/var/disco/templates# docker image ls
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
local_discourse/socket2   latest              de1cecbacd9e        7 days ago          4.42GB
discourse/base            2.0.20240825-0027   9dc96b6115cb        7 days ago          3.38GB
local_discourse/socket1   latest              e83b019bdcf5        10 days ago         4.41GB
local_discourse/pg13      latest              8ccbab0fb0ad        2 years ago         2.62GB 

We are currently running on socket2 which built fine 7 days ago.

The socket1 rebuild is the problem child.

No joy in adding the IP to /etc/hosts... same error

Yes, it has no problem with the IP addr on the host, resolves fine.

unix:/tmp# curl https://github.com/discourse/discourse.git/
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

I still think the error is in the container build process.

ubuntu:/tmp# docker -v
Docker version 18.09.7, build 2d0083d

It's an older version, but it should still be OK and not causing that host resolution error, "all of a sudden", since I have not upgrade docker in "forever".... :slight_smile:

This appears to be the line in the launcher script where the failure happens:

git fetch --tags --prune-tags --prune --force origin

I put a bunch of echo statements in the script and that appears to be line which caused the fatal error.

Everything before that line is fine, nothing echos after that line.

The error is generated from this file, line 132, which calls the git command:

.... anyway, I need to eat and go to the gym and enjoy the weekend.... have spent too many hours on this today!

OK!

I manually changed the Discourse launcher script to revert back to a prior base Discourse docker image:

2.0.20240820-1401

Which was before this annoying build problem cropped up, and now all is OK.

It's building normally again.

#image="discourse/base:2.0.20240825-0027"
image="discourse/base:2.0.20240820-1401"

This proves, at least in my mind, there is an error in the latest image discourse/base:2.0.20240825-0027, because as soon as I made the change above, everything is fine.

1 Like

This is not the first time we have experienced a fatal error when Discourse updates their base docker image.

Probally will not be the last time either .....

PS: I am not going to to the analysis to determine why the latest discourse docker images causes a fatal error during the build process; I have too many other higher priority tasks on my list.

:slight_smile:

However, I will share with you the Discourse commit which caused this problem:

So, the problem seems obvious.... at least to me and it's not the first time (as I said earlier) we have seen a fatal error when Discourse updates their base docker image!

Very Truly Yours Fearlessly,

Neo

2 Likes

Finally......

Reminder to Self

When there is a fatal error in a new Discourse build, always first check to see if there has been a Discourse commit which changed the base docker image before wasting time debugging everything else imaginable!

It turns out I was right in my first assessment and guess:

The error was caused by a flawed new base image committed to the Discourse Docker repo build script, and this problem has happened in the past when there were unresolved Ruby gem version upgrade issues in the new build.

Your Fearless Founder,

Neo

:slight_smile:

3 Likes

FYI, I tested the following Discourse base images:

image="discourse/base:2.0.20240903-0412" # fails
image="discourse/base:2.0.20240825-0027" # fails (current  image in repo)
image="discourse/base:2.0.20240822-0434" # fails
image="discourse/base:2.0.20240822-0024" # ok
image="discourse/base:2.0.20240820-1401" # ok

Reference:

Official Discourse Base Images by Tag

1 Like

Do you still notice that 'git clone' fails on all of those 3 docker images but still works on the host? On all 3 of them?

If so, I agree that Discourse should not be issuing such an image but it doesn't point to a pedigree Discourse issue. Surely it's a container config problem that Discourse aren't noticing because most other users aren't seeing it. Interesting.

git clone does not build containers, it only downloads files which are later built by a complex build process where the container is the 'easy part'.....

The 'hard part' is all the dependances when the app is built and the errors in the build which are fatal like this are related to the build process and dependance issues with the myriad Ruby gems and other libs.

I don't think it's that simple; and understanding the issue requires a lot of hands-on experience with building complex Ruby / Javascript / Ember apps using a base docker image.

"Container config problem" is pretty vague.

Generally, the problem is that the base image has dependances which do not exist or have version mismatches in the code used to build the app in the container.

Of course it is a core Discourse issue, because it's a problem with their base image being out of sync with their repo; similar to the last issue we had with base images:

Reference:

The reason we see these issues is in part because I rebuild often, not like most self-hosted sites who rebild rarely. We are much more "leading edge" than most sites because we can reaily easily rebuild because I use unix sockets and two containers so there is zero downtime when we rebuild and switch to a new container.

Most people do not run this kind of configuration so they have downtime when they rebuild and hence they rebuild not so often.

1 Like