安装失败是因为其他 Redis 容器吗?

你好,我尝试在我的 vServer 上安装 Discourse,该服务器上运行着 mailcow-dockerized,并且位于 nginx 反向代理之后。
但安装失败,我认为问题出在 Redis 上。mailcow 也使用了一个 Redis 容器。
在 Discourse 安装过程中,我从 Redis 收到以下错误:

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

这很可能是另一个 Redis 容器导致的问题:

6c26bfa0f7f8        redis:5-alpine           "docker-entrypoint.s…"   17 hours ago        Up 17 hours         127.0.0.1:7654->6379/tcp                                                                                                                 mailcowdockerized_redis-mailcow_1

inspect 命令显示了以下网络部分:

            },
            "NetworkMode": "mailcowdockerized_mailcow-network",
            "PortBindings": {
                "6379/tcp": [
                    {
                        "HostIp": "127.0.0.1",
                        "HostPort": "7654"
                    }
                ]
            },

最终我得到以下输出:

66:signal-handler (1586076474) Received SIGTERM scheduling shutdown...
I, [2020-04-05T08:47:54.319315 #1]  INFO -- : Terminating async processes
I, [2020-04-05T08:47:54.319352 #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/10/bin/postmaster -D /etc/postgresql/10/main pid: 49
I, [2020-04-05T08:47:54.319398 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 166
2020-04-05 08:47:54.319 UTC [49] LOG:  received fast shutdown request
2020-04-05 08:47:54.320 UTC [49] LOG:  aborting any active transactions
2020-04-05 08:47:54.324 UTC [49] LOG:  worker process: logical replication launcher (PID 58) exited with exit code 1
2020-04-05 08:47:54.325 UTC [53] LOG:  shutting down
2020-04-05 08:47:54.345 UTC [49] LOG:  database system is shut down
166:M 05 Apr 2020 08:47:54.361 # User requested shutdown...
166:M 05 Apr 2020 08:47:54.361 * Saving the final RDB snapshot before exiting.
166:M 05 Apr 2020 08:47:54.364 * DB saved on disk
166:M 05 Apr 2020 08:47:54.364 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development' failed with return #<Process::Status: pid 323 exit 5>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'"]}
fdf2b6ce4844ea7a562afd146bc67a92b48f40fd1f288f89a64617fa2924b0e9
** FAILED TO BOOTSTRAP ** 请向上滚动并查找更早的错误消息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。

听起来确实如此。一个解决方案是使用现有的 Redis 容器,而不是再包含一个。请参阅 如何从独立容器迁移到分离的 Web 容器和数据容器 以及其他两个容器主题以获取一些提示。

这需要您对 Discourse、Redis 和 Docker 有相当深入的了解,以便您能够自定义这些说明。如果您需要简单的操作指南,那么最好另外申请一台虚拟机,或者在 Marketplace 频道中说明预算以寻求帮助。