IPv6专用VPS的安装与兼容性

大家好,
我正在尝试在一个只有 IPv6 的 VPS(ubuntu server 22.04 LTS)上安装 Discourse,但遇到了这个错误:

103:M 04 Feb 2023 17:27:33.313 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse git fetch --depth 1 origin tests-passed failed with return #<Process::Status: pid 145 exit 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"=>["sudo -H -E -u discourse git reset --hard", "sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse git remote set-branches --add origin main", "sudo -H -E -u discourse git remote set-branches origin $version", "sudo -H -E -u discourse git fetch --depth 1 origin $version", "sudo -H -E -u discourse 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", "[ ! -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.
364d2e22530738ab198f829e14d7d8f4d7513ec7da82e30b774381aaa28f2f63

按照这些指南,我修复了 IPv4 DNS 问题,但仍然无法完成 ./launcher rebuild app
https://gist.github.com/unixfox/bb299ce4f862fad66ee2e6d9024bef98/
https://www.tecmint.com/set-permanent-dns-nameservers-in-ubuntu-debian/

Discourse 不兼容吗?
如果是,我将不再尝试。

IPv6 在其自己的托管上得到了广泛使用,因此 Discourse 本身与 IPv6 兼容。

您能显示更多日志吗?实际错误在您包含的部分之上。我猜测是您的配置中有什么东西导致从 GitHub 拉取内容时出现问题。我看不到任何 GitHub 的 AAAA 记录,所以这可能是问题所在。还有这个:

1 个赞

我很快会添加完整的日志……

添加了此处显示的 DNS 后,我可以毫无问题地使用 github。

1 个赞

嗯。但如果你在遇到现在这些问题之前就这么做了,那可能不足以让 Docker 访问 GitHub。你能从 Docker 容器内部访问 GitHub 吗?

我在安装前更改了DNS,脚本成功安装了docker,但我没有检查是否可以在docker容器内使用github……

我该如何检查?
谢谢 :slight_smile:

我不太清楚,无法告诉你。

你需要启动一个容器,进入其中,然后尝试 git clone 或者甚至只是 curl https://github.com/

我怀疑对于你的仅 IPv6 设置来说,这会很困难且不受支持。我通过 google git+clone+inside+docker+ipv6 找到了这个:tasks have no access to ipv6 services · concourse · Discussion #5919 · GitHub

1 个赞

在阅读了几个网站和指南后,我决定放弃。
太复杂而且不稳定,但还是谢谢你的帮助!