Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' 失败,返回

Pups::ExecError: su postgres -c ‘psql discourse -c “alter schema public owner to discourse;”’ 失败,返回 #<Process::Status: pid 54 exit 2>

目录“/shared/postgres_data”的权限无效

我的 app.yml 文件

## 插件放在这里 ## 请参阅 https://meta.discourse.org/t/19157 获取详细信息
$hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse$
          - git clone https://github.com/Ebsy/disc$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/davidtayl$
          - git clone https://github.com/discourse$
##          - git clone https://github.com/pavilio$
## 官方插件 ##
          - git clone https://github.com/discour$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
          - git clone https://github.com/discourse$
## 新安装的插件 ##
          - git clone https://github.com/Ahmedgaga$
##          - git clone https://github.com/gdpelic$
##          - git clone https://github.com/paviliond$
## 构建后运行的任何自定义命令
run:
  - exec: echo "Beginning of custom commands" ## 如果您想设置“发件人”电子邮件地址
  ## 获取第一个注册电子邮件后,重新启用
  ## - exec: rails r "SiteSetting.notification_email$"
  - exec: echo "End of custom commands"

复制并粘贴此内容以查看是否存在任何格式错误。

不确定如何将其包装成列表形式…

2023-02-11 19:55:35.034 GMT [42] LOG: 跳过缺失的配置文件 “/shared/postgres_data/postgresql.auto.conf”
2023-02-11 19:55:35.035 UTC [42] FATAL: 无法读取目录 “/shared/postgres_data” 的权限:权限被拒绝

我无法进一步帮助您,因为您只是在重复错误。请尝试 discourse doctor,您需要向上滚动查找原因并验证您的 app.yml 文件。

如果您定期执行服务器备份和/或 discourse 备份,您也可以通过这种方式进行恢复。但我认为您会丢失备份之后创建的帖子。

您好 Ratnam,

也许最好解释一下您想实现的目标以及您使用的软件,因为目前有些令人困惑。您主要发布错误消息,但缺乏完整的上下文来完全理解。

请先回答这些问题,然后我们再从这里开始进行下一步 :slight_smile:

  1. 您是按照此处的说明 discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub 使用常规的 docker 安装来安装生产环境的 Discourse 吗?

  2. 您的操作系统是什么?

  3. 您的服务器规格是什么?

2 个赞

这看起来是问题所在,尽管我想不出更改插件如何会导致 postgres 权限问题。您是否更改了其他设置?这是一个标准安装,对吧?

安全模式无济于事,因为网站无法正常运行。

2 个赞

我通过更改 postgres 数据权限解决了该问题 @Canapin @Heliosurge 感谢您的支持

3 个赞

我使用了以下 Slack
GitHub - discourse/discourse_docker: A Docker image for Discourse /var/discoursed
操作系统 - Ubuntu 20.04 LTS
服务器 - 8GB RAM 30GB

谢谢并致敬

1 个赞

恭喜。很高兴您解决了问题。如果您打算安装插件,我建议您进行服务器备份。

不过说实话,只要您正确输入插件安装信息,应该就没问题。现在回想一下您尝试安装的那个插件,可能需要更新了。我记得它最后一次活动是在 2022 年 2 月?如果是这样,它可能已经过时一年了,并且此后发生的变化可能已导致插件损坏。

已确认

我建议您查看#plugin类别,看看是否有任何插件可能引起您的兴趣。

Discourse Reactions

  • 非常酷,因为它提供了一种超越简单点赞的方式。

National Flags

  • 让您的会员可以选择在帖子中显示国旗。

Discourse Docs

  • 非常适合设置知识库搜索。是 Solved 的良好补充。

Discourse Solved

  • 设置一个类别供用户提问。发帖人可以选择最有效的解决方案。最好将类别设置为始终显示第一篇帖子。解决方案会在发帖人的帖子中引用并标记为已解决。有一个主题组件可以使已解决的引用更美观。

Discourse Who’s Online

  • 在不同页面显示谁在线。如果用户在线,当您阅读帖子时,个人资料图片周围会有一个发光圆圈。

Discourse Templates

  • 创建模板回复,也称为“罐头回复”。内容太多无法一一列举。请参阅主题。

最重要的是避免使用已弃用和已停止支持的插件。您需要有活跃维护者的插件。值得注意的优秀插件包括 Discourse 官方插件和 Pavilion 组;尽管还有许多其他插件比我提到的这两个组更活跃地维护着。

1 个赞