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. 您的服务器规格是什么?

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

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

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

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

谢谢并致敬

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

不过说实话,只要你正确输入插件安装命令,应该没问题。仔细想想,你刚才尝试安装的那个插件可能需要更新。我记得它上次活动是在 2022 年 2 月?如果是的话,它可能已经过时一年了,这段时间内的变化可能导致该插件无法正常工作。

已确认

我建议查看 Customization > Plugin 分类,看看是否有让你感兴趣的插件。

Discourse Reactions

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

National Flags

  • 允许成员在帖子中显示国旗。

Discourse Docs

  • 非常适合设置知识库搜索。是“Solved”插件的好搭档。

Discourse Solved

  • 设置一个类别供用户提问。楼主可以选择最佳解决方案。建议将该类别设置为始终显示首帖。解决方案会被引用在楼主帖子中并标记为已解决。还有一个主题组件可以让“已解决”的引用看起来更美观。

Discourse Who’s Online

  • 在不同页面上显示在线用户。如果你正在阅读某人的帖子且该用户在线,其头像周围会出现发光圆圈。

Discourse Templates

  • 创建模板回复,即“预设回复”。内容太多,无法一一列举。请参阅相关主题。

主要原则是避免使用已弃用或停止维护的插件。你需要选择那些有活跃维护者的插件。值得注意的优质插件包括 Discourse 官方插件和 Pavilion 组的插件;当然,除了我提到的这两个组之外,还有很多其他活跃维护的插件。