警告:无法创建服务器 TCP 侦听套接字 *:6379:bind:地址已在使用中

你好

我在干净的 Ubuntu 22.04 系统上尝试安装 Discourse 时遇到了这个错误。
我想我可能需要更改 Redis 端口!

附:我正在尝试通过 AAAA 记录配置 IPv6。

警告:无法创建服务器 TCP 监听套接字 
*:6379: bind: 地址已在使用中

完整错误信息

root@ubuntu:/var/discourse# ./launcher rebuild app 
检测到 x86_64 架构。
确保启动器为最新版本
获取 origin
启动器已是最新版本
停止旧容器
+ /usr/bin/docker stop -t 60 app
app
2.0.20230313-1023: 正在从 discourse/base 拉取
摘要:sha256:f7467469ab9e39c3548d4478e3f416c05b34a0ee58eb6e40b963e562005669cc
状态:discourse/base:2.0.20230313-1023 镜像已是最新
docker.io/discourse/base:2.0.20230313-1023
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2023-04-09T15:14:17.655847 #1]  INFO -- : 从标准输入读取
I, [2023-04-09T15:14:17.660188 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2023-04-09T15:14:17.729019 #1]  INFO -- : 正在生成区域设置(这可能需要一段时间)...
生成完成。

I, [2023-04-09T15:14:17.729175 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2023-04-09T15:14:17.735055 #1]  INFO -- : 
I, [2023-04-09T15:14:17.735910 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2023-04-09T15:14:17.738546 #1]  INFO -- : 
I, [2023-04-09T15:14:17.738767 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2023-04-09T15:14:17.741161 #1]  INFO -- : 
I, [2023-04-09T15:14:17.741406 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2023-04-09T15:14:17.744038 #1]  INFO -- : 
I, [2023-04-09T15:14:17.744331 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2023-04-09T15:14:17.746825 #1]  INFO -- : 
I, [2023-04-09T15:14:17.747051 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2023/04/09 15:14:17 socat[18] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): 没有那个文件或目录
I, [2023-04-09T15:14:17.777743 #1]  INFO -- : 
I, [2023-04-09T15:14:17.777978 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2023-04-09T15:14:17.780674 #1]  INFO -- : 
I, [2023-04-09T15:14:17.780774 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2023-04-09T15:14:17.783086 #1]  INFO -- : 
I, [2023-04-09T15:14:17.783187 #1]  INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-04-09T15:14:17.785212 #1]  INFO -- : 
I, [2023-04-09T15:14:17.785572 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2023-04-09T15:14:17.787419 #1]  INFO -- : 
I, [2023-04-09T15:14:17.792028 #1]  INFO -- : 文件 > /etc/service/postgres/run  chmod: +x  chown: 
I, [2023-04-09T15:14:17.795856 #1]  INFO -- : 文件 > /etc/service/postgres/log/run  chmod: +x  chown: 
I, [2023-04-09T15:14:17.800063 #1]  INFO -- : 文件 > /etc/runit/3.d/99-postgres  chmod: +x  chown: 
I, [2023-04-09T15:14:17.803729 #1]  INFO -- : 文件 > /root/upgrade_postgres  chmod: +x  chown: 
I, [2023-04-09T15:14:17.803973 #1]  INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2023-04-09T15:14:20.700845 #1]  INFO -- : 
I, [2023-04-09T15:14:20.701049 #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, [2023-04-09T15:14:20.702825 #1]  INFO -- : 
I, [2023-04-09T15:14:20.702966 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2023-04-09T15:14:20.721467 #1]  INFO -- : 
I, [2023-04-09T15:14:20.721608 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2023-04-09T15:14:20.723772 #1]  INFO -- : 
I, [2023-04-09T15:14:20.724078 #1]  INFO -- : > /root/upgrade_postgres
I, [2023-04-09T15:14:20.729475 #1]  INFO -- : 
I, [2023-04-09T15:14:20.729627 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2023-04-09T15:14:20.731329 #1]  INFO -- : 
I, [2023-04-09T15:14:20.732920 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 data_directory = '/var/lib/postgresql/13/main' 替换为 data_directory = '/shared/postgres_data'
I, [2023-04-09T15:14:20.733526 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?listen_addresses *=.*) 替换为 listen_addresses = '*'
I, [2023-04-09T15:14:20.734037 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?synchronous_commit *=.*) 替换为 synchronous_commit = $db_synchronous_commit
I, [2023-04-09T15:14:20.734534 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?shared_buffers *=.*) 替换为 shared_buffers = $db_shared_buffers
I, [2023-04-09T15:14:20.735044 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?work_mem *=.*) 替换为 work_mem = $db_work_mem
I, [2023-04-09T15:14:20.735529 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?default_text_search_config *=.*) 替换为 default_text_search_config = '$db_default_text_search_config'
I, [2023-04-09T15:14:20.735970 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2023-04-09T15:14:20.740651 #1]  INFO -- : 
I, [2023-04-09T15:14:20.741067 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?checkpoint_segments *=.*) 替换为 checkpoint_segments = $db_checkpoint_segments
I, [2023-04-09T15:14:20.741412 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?logging_collector *=.*) 替换为 logging_collector = $db_logging_collector
I, [2023-04-09T15:14:20.742000 #1]  INFO -- : 在 /etc/postgresql/13/main/postgresql.conf 中将 (?-mix:#?log_min_duration_statement *=.*) 替换为 log_min_duration_statement = $db_log_min_duration_statement
I, [2023-04-09T15:14:20.742832 #1]  INFO -- : 在 /etc/postgresql/13/main/pg_hba.conf 中将 (?-mix:^#local +replication +postgres +peer$) 替换为 local replication postgres  peer
I, [2023-04-09T15:14:20.743206 #1]  INFO -- : 在 /etc/postgresql/13/main/pg_hba.conf 中将 (?-mix:^host.*all.*all.*127.*$) 替换为 host all all 0.0.0.0/0 md5
I, [2023-04-09T15:14:20.743634 #1]  INFO -- : 在 /etc/postgresql/13/main/pg_hba.conf 中将 (?-mix:^host.*all.*all.*::1\/128.*$) 替换为 host all all ::/0 md5
I, [2023-04-09T15:14:20.744069 #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, [2023-04-09T15:14:20.745220 #1]  INFO -- : > sleep 5
2023-04-09 15:14:20.905 UTC [41] LOG:  正在启动 PostgreSQL 13.10 (Debian 13.10-1.pgdg110+1),运行在 x86_64-pc-linux-gnu 上,由 gcc (Debian 10.2.1-6) 10.2.1 20210110 编译,64 位
2023-04-09 15:14:20.905 UTC [41] LOG:  正在监听 IPv4 地址 "0.0.0.0",端口 5432
2023-04-09 15:14:20.906 UTC [41] LOG:  正在监听 IPv6 地址 "::",端口 5432
2023-04-09 15:14:20.910 UTC [41] LOG:  正在监听 Unix 套接字 "/var/run/postgresql/.s.PGSQL.5432"
2023-04-09 15:14:20.917 UTC [44] LOG:  数据库系统于 2023-04-09 15:14:06 UTC 关闭
2023-04-09 15:14:20.938 UTC [41] LOG:  数据库系统已准备好接受连接
I, [2023-04-09T15:14:25.748877 #1]  INFO -- : 
I, [2023-04-09T15:14:25.749295 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2023-04-09 15:14:25.870 UTC [54] postgres@postgres ERROR:  数据库 "discourse" 已存在
2023-04-09 15:14:25.870 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: 错误:数据库创建失败:ERROR:  数据库 "discourse" 已存在
I, [2023-04-09T15:14:25.872274 #1]  INFO -- : 
I, [2023-04-09T15:14:25.872476 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2023-04-09 15:14:25.943 UTC [58] postgres@discourse ERROR:  角色 "discourse" 已存在
2023-04-09 15:14:25.943 UTC [58] postgres@discourse STATEMENT:  create user discourse;
ERROR:  角色 "discourse" 已存在
I, [2023-04-09T15:14:25.946885 #1]  INFO -- : 
I, [2023-04-09T15:14:25.947058 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2023-04-09T15:14:25.993550 #1]  INFO -- : GRANT

I, [2023-04-09T15:14:25.993813 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2023-04-09T15:14:26.045311 #1]  INFO -- : ALTER SCHEMA

I, [2023-04-09T15:14:26.045719 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  扩展 "hstore" 已存在,跳过
I, [2023-04-09T15:14:26.109929 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-09T15:14:26.110387 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  扩展 "pg_trgm" 已存在,跳过
I, [2023-04-09T15:14:26.159901 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-09T15:14:26.160347 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  扩展 "hstore" 已存在,跳过
I, [2023-04-09T15:14:26.208779 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-09T15:14:26.208956 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  扩展 "pg_trgm" 已存在,跳过
I, [2023-04-09T15:14:26.254074 #1]  INFO -- : CREATE EXTENSION

I, [2023-04-09T15:14:26.254400 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2023-04-09T15:14:26.256780 #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-04-09T15:14:26.338125 #1]  INFO -- : 文件 > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2023-04-09T15:14:26.343406 #1]  INFO -- : 文件 > /var/spool/cron/crontabs/postgres  chmod:   chown: 
I, [2023-04-09T15:14:26.343640 #1]  INFO -- : > echo postgres installed!
I, [2023-04-09T15:14:26.346487 #1]  INFO -- : postgres 已安装!

I, [2023-04-09T15:14:26.350869 #1]  INFO -- : 文件 > /etc/service/redis/run  chmod: +x  chown: 
I, [2023-04-09T15:14:26.355067 #1]  INFO -- : 文件 > /etc/service/redis/log/run  chmod: +x  chown: 
I, [2023-04-09T15:14:26.358918 #1]  INFO -- : 文件 > /etc/runit/3.d/10-redis  chmod: +x  chown: 
I, [2023-04-09T15:14:26.360582 #1]  INFO -- : 在 /etc/redis/redis.conf 中将 daemonize yes 替换为空
I, [2023-04-09T15:14:26.361325 #1]  INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^pidfile.*$) 替换为空
I, [2023-04-09T15:14:26.362334 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2023-04-09T15:14:26.364621 #1]  INFO -- : 
I, [2023-04-09T15:14:26.365066 #1]  INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^logfile.*$) 替换为 logfile ""
I, [2023-04-09T15:14:26.365723 #1]  INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^bind .*$) 替换为空
I, [2023-04-09T15:14:26.366633 #1]  INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^dir .*$) 替换为 dir /shared/redis_data
I, [2023-04-09T15:14:26.367731 #1]  INFO -- : 在 /etc/redis/redis.conf 中将 (?-mix:^protected-mode yes) 替换为 protected-mode no
I, [2023-04-09T15:14:26.368927 #1]  INFO -- : 在 /etc/redis/redis.conf 中将 # io-threads 4 替换为 io-threads $redis_io_threads
I, [2023-04-09T15:14:26.369973 #1]  INFO -- : > echo redis installed
I, [2023-04-09T15:14:26.371760 #1]  INFO -- : redis 已安装

I, [2023-04-09T15:14:26.372049 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2023-04-09T15:14:26.378137 #1]  INFO -- : logfile ""

I, [2023-04-09T15:14:26.378305 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-04-09T15:14:26.379515 #1]  INFO -- : > sleep 10
102:C 09 Apr 2023 15:14:26.398 # oO0OoO0OoO0Oo Redis 正在启动 oO0OoO0OoO0Oo
102:C 09 Apr 2023 15:14:26.398 # Redis 版本=7.0.7, bits=64, commit=00000000, modified=0, pid=102, 刚刚启动
102:C 09 Apr 2023 15:14:26.398 # 已加载配置
102:M 09 Apr 2023 15:14:26.399 * 单调时钟:POSIX clock_gettime
102:M 09 Apr 2023 15:14:26.401 * 运行模式=独立,端口=6379。
102:M 09 Apr 2023 15:14:26.401 # 警告:无法强制执行 TCP  backlog 设置 511,因为 /proc/sys/net/core/somaxconn 被设置为较低的值 128。
102:M 09 Apr 2023 15:14:26.401 # 服务器已初始化
102:M 09 Apr 2023 15:14:26.402 * 正在加载由版本 7.0.7 生成的 RDB
102:M 09 Apr 2023 15:14:26.402 * RDB 年龄 20 秒
102:M 09 Apr 2023 15:14:26.402 * 创建时 RDB 内存使用量为 0.82 Mb
102:M 09 Apr 2023 15:14:26.402 * RDB 加载完成,已加载键:0,已过期键:0。
102:M 09 Apr 2023 15:14:26.402 * 从磁盘加载数据库耗时:0.001 秒
102:M 09 Apr 2023 15:14:26.402 * 已准备好接受连接
I, [2023-04-09T15:14:36.382275 #1]  INFO -- : 
I, [2023-04-09T15:14:36.382538 #1]  INFO -- : > thpoff echo "thpoff is installed!"
I, [2023-04-09T15:14:36.386122 #1]  INFO -- : thpoff 已安装!

I, [2023-04-09T15:14:36.386354 #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-04-09T15:14:36.448247 #1]  INFO -- : 
I, [2023-04-09T15:14:36.448457 #1]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2023-04-09T15:14:36.512976 #1]  INFO -- : 
I, [2023-04-09T15:14:36.513150 #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, [2023-04-09T15:14:36.577994 #1]  INFO -- : 
I, [2023-04-09T15:14:36.578227 #1]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2023-04-09T15:14:36.584694 #1]  INFO -- : 
I, [2023-04-09T15:14:36.587187 #1]  INFO -- : 文件 > /etc/cron.d/anacron  chmod:   chown: 
I, [2023-04-09T15:14:36.591590 #1]  INFO -- : 文件 > /etc/runit/1.d/copy-env  chmod: +x  chown: 
I, [2023-04-09T15:14:36.595502 #1]  INFO -- : 文件 > /etc/service/unicorn/run  chmod: +x  chown: 
I, [2023-04-09T15:14:36.599519 #1]  INFO -- : 文件 > /etc/service/nginx/run  chmod: +x  chown: 
I, [2023-04-09T15:14:36.603302 #1]  INFO -- : 文件 > /etc/runit/3.d/01-nginx  chmod: +x  chown: 
I, [2023-04-09T15:14:36.607130 #1]  INFO -- : 文件 > /etc/runit/3.d/02-unicorn  chmod: +x  chown: 
I, [2023-04-09T15:14:36.607239 #1]  INFO -- : 在 /etc/service/unicorn/run 中将 # postgres 替换为 sv start postgres || exit 1
I, [2023-04-09T15:14:36.607535 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2023-04-09T15:14:36.609301 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git reset --hard
129:C 09 Apr 2023 15:14:36.615 # oO0OoO0OoO0Oo Redis 正在启动 oO0OoO0OoO0Oo
129:C 09 Apr 2023 15:14:36.615 # Redis 版本=7.0.7, bits=64, commit=00000000, modified=0, pid=129, 刚刚启动
129:C 09 Apr 2023 15:14:36.616 # 已加载配置
129:M 09 Apr 2023 15:14:36.616 * 单调时钟:POSIX clock_gettime
129:M 09 Apr 2023 15:14:36.616 # 警告:无法创建服务器 TCP 监听套接字 *:6379: bind: 地址已在使用中
129:M 09 Apr 2023 15:14:36.616 # 监听端口 6379 (TCP) 失败,正在中止。
正在更新文件:100% (32972/32972),完成。
I, [2023-04-09T15:16:49.208465 #1]  INFO -- : HEAD 现在位于 59e548540 Build(deps): 将 /app/assets/javascripts 中的 sass 从 1.58.3 升级到 1.59.2 (#20656)

I, [2023-04-09T15:16:49.208977 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse git clean -f
I, [2023-04-09T15:16:49.382100 #1]  INFO -- : 
I, [2023-04-09T15:16:49.382245 #1]  INFO -- : > cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  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 --prune --prune-tags origin tests-passed
  fi
'
fatal: 无法访问 'https://github.com/discourse/discourse.git/':无法解析主机 github.com
I, [2023-04-09T15:17:29.506241 #1]  INFO -- : 
I, [2023-04-09T15:17:29.506599 #1]  INFO -- : 正在终止异步进程
I, [2023-04-09T15:17:29.506724 #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 pid: 41 发送 INT
2023-04-09 15:17:29.506 UTC [41] LOG:  收到快速关闭请求
I, [2023-04-09T15:17:29.506972 #1]  INFO -- : 向 exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 102 发送 TERM
102:signal-handler (1681053449) 收到 SIGTERM,计划关闭...
2023-04-09 15:17:29.509 UTC [41] LOG:  中止任何活跃事务
2023-04-09 15:17:29.511 UTC [41] LOG:  后台工作进程 "logical replication launcher" (PID 50) 以退出代码 1 退出
2023-04-09 15:17:29.512 UTC [45] LOG:  正在关闭
2023-04-09 15:17:29.546 UTC [41] LOG:  数据库系统已关闭
102:M 09 Apr 2023 15:17:29.591 # 用户请求关闭...
102:M 09 Apr 2023 15:17:29.591 * 在退出前保存最终 RDB 快照。
102:M 09 Apr 2023 15:17:29.596 * 数据库已保存到磁盘
102:M 09 Apr 2023 15:17:29.596 # Redis 现在已准备好退出,再见...


失败
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  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 --prune --prune-tags origin tests-passed
  fi
' 失败,返回 #<Process::Status: pid 144 exit 128>
失败位置:/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
执行失败,参数为 {"cd"=>"$home", "hook"=>"code", "cmd"=>["sudo -H -E -u discourse git reset --hard", "sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n  if [ $(git rev-parse --is-shallow-repository) == \"true\" ]; then\n      git remote set-branches --add origin main\n      git remote set-branches origin $version\n      git fetch --depth 1 origin $version\n  else\n      git fetch --prune --prune-tags origin $version\n  fi\n'", "sudo -H -E -u discourse bash -c '\n  if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then\n      git pull\n  else\n      git -c advice.detachedHead=false checkout $version\n  fi\n'", "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", "[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
引导失败,退出代码为 128
** 引导失败 ** 请向上滚动查找更早的错误消息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。
4a1c0166ec59d1b6a4cc0fc19b6a03ebdd78386d5e4bb5f7f5cc3ea3f905f4d7

那只是一个警告,问题是这样的:

fatal: 无法访问 'https://github.com/discourse/discourse.git/':无法解析主机:github.com

你需要排查为什么从服务器无法访问 Github。

我可以在服务器上手动克隆,我不明白为什么设置不克隆?

git clone https://github.com/discourse/discourse.git
Cloning into 'discourse'...
remote: Enumerating objects: 651082, done.
remote: Counting objects: 100% (504/504), done.
remote: Compressing objects: 100% (323/323), done.
remote: Total 651082 (delta 242), reused 412 (delta 178), pack-reused 650578
Receiving objects: 100% (651082/651082), 556.51 MiB | 41.56 MiB/s, done.
Resolving deltas: 100% (425147/425147), done.
Updating files: 100% (33083/33083), done.

可能是 Docker 容器中的 MTU?请参阅