最近在把 Discourse 升级到最新版本的时候提示了下面的问题:
/var/www/discourse/plugins
/var/discourse
sv start redis || exit 1 in /etc/service/unicorn/run
I, [2025-07-29T19:50:24.831730 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2025-07-29T19:50:25.731802 #1] INFO -- :
I, [2025-07-29T19:50:25.732019 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://src.isharkfly.com/discourse/discourse-matomo-analytics.git
Cloning into 'discourse-matomo-analytics'...
warning: unable to access '/root/.config/git/ignore': Permission denied
warning: unable to access '/root/.config/git/attributes': Permission denied
I, [2025-07-29T19:50:26.226275 #1] INFO -- :
I, [2025-07-29T19:50:26.226507 #1] INFO -- : > cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://src.isharkfly.com/discourse/discourse-adplugin.git
fatal: destination path 'discourse-adplugin' already exists and is not an empty directory.
I, [2025-07-29T19:50:26.241205 #1] INFO -- :
I, [2025-07-29T19:50:26.242279 #1] INFO -- : Terminating async processes
I, [2025-07-29T19:50:26.242387 #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/15/bin/postmaster -D /etc/postgresql/15/main pid: 45
I, [2025-07-29T19:50:26.242498 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 112
2025-07-29 19:50:26.242 UTC [45] LOG: received fast shutdown request
112:signal-handler (1753818626) Received SIGTERM scheduling shutdown...
112:M 29 Jul 2025 19:50:26.293 # User requested shutdown...
112:M 29 Jul 2025 19:50:26.294 * Saving the final RDB snapshot before exiting.
2025-07-29 19:50:26.296 UTC [45] LOG: aborting any active transactions
2025-07-29 19:50:26.300 UTC [45] LOG: background worker "logical replication launcher" (PID 59) exited with exit code 1
2025-07-29 19:50:26.306 UTC [54] LOG: shutting down
2025-07-29 19:50:26.363 UTC [54] LOG: checkpoint starting: shutdown immediate
112:M 29 Jul 2025 19:50:26.723 * DB saved on disk
112:M 29 Jul 2025 19:50:26.723 # Redis is now ready to exit, bye bye...
2025-07-29 19:50:26.987 UTC [54] LOG: checkpoint complete: wrote 9 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.149 s, sync=0.080 s, total=0.681 s; sync files=7, longest=0.036 s, average=0.012 s; distance=26 kB, estimate=26 kB
2025-07-29 19:50:27.016 UTC [45] LOG: database system is shut down
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse/plugins && sudo -E -u discourse git clone https://src.isharkfly.com/discourse/discourse-adplugin.git failed with return #<Process::Status: pid 283 exit 128>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.3.0/lib/pups/exec_command.rb:131:in `spawn'
exec failed with the params {"cd"=>"$home/plugins", "cmd"=>["git clone https://github.com/discourse/docker_manager.git", "sudo -E -u discourse git clone https://src.isharkfly.com/discourse/discourse-matomo-analytics.git", "sudo -E -u discourse git clone https://src.isharkfly.com/discourse/discourse-adplugin.git", "sudo -E -u discourse git clone https://src.isharkfly.com/discourse/discourse-rewind.git"]}
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.
d9611faf24384b39bdfa642fd16626c6ba64fcbda0dfb0dc99ecfe466bb0aa8f
问题和解决
这个问题的原因还是插件的干扰。
有些插件在已经合并到 Core 里面了。
对合并后的插件不能通过修改 app.yml 配置文件中的内容进行安装。
需要从里面给删掉。
比如说的这个 AI 的配置,现在已经是集成到 Core 里,在配置文件中的仓库配置地址就必须要删除。
否则就显示编译不通过。
如果在代码中看到上面的内容,就表示官方已经处理了。



