【问题标题】:Parse server rejecting session authentication after renewing certificates and restarting更新证书并重新启动后解析服务器拒绝会话身份验证
【发布时间】:2020-09-10 19:37:06
【问题描述】:

我有一个在 AWS 上运行 Parse 服务器作为后端的应用程序。它崩溃了,因为 mongoDB 似乎已经停止在 127.0.0.1 与 Parse 连接,但我不确定这是怎么发生的,因为我没有进行任何代码更改。我所做的是尝试使用 bncert 工具更新证书。

我必须每 3 个月左右手动进行一次以使用 sudo /opt/bitnami/bncert-tool 更新证书,然后在其中输入我的服务器名称和电子邮件地址。我刚刚执行了这个定期维护并重新启动了我的服务器。不过,这似乎破坏了与 mongoDB 的解析连接中的某些内容。当我转到我的解析仪表板时,它会拉出一个错误日志,表明某些内容已被弃用,因为 mongoDB 如何连接到解析?有人可以就如何解决这个问题或如何找出可能出现的问题提供任何指导吗?我在日志中看到的一些内容是 errorLabels: [ 'TransientTransactionError' ]

日志有错误:

2020-05-24T01:37:49.746Z - Uncaught internal server error. { MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
    at Pool.<anonymous> (/opt/bitnami/apps/parse/htdocs/node_modules/mongodb-core/lib/topologies/server.js:564:11)
    at emitOne (events.js:116:13)
    at Pool.emit (events.js:211:7)
    at Connection.<anonymous> (/opt/bitnami/apps/parse/htdocs/node_modules/mongodb-core/lib/connection/pool.js:317:12)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at Connection.emit (events.js:214:7)
    at Socket.<anonymous> (/opt/bitnami/apps/parse/htdocs/node_modules/mongodb-core/lib/connection/connection.js:246:50)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
  name: 'MongoNetworkError',
  errorLabels: [ 'TransientTransactionError' ],
  [Symbol(mongoErrorContextSymbol)]: {} } MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
    at Pool.<anonymous> (/opt/bitnami/apps/parse/htdocs/node_modules/mongodb-core/lib/topologies/server.js:564:11)
    at emitOne (events.js:116:13)
    at Pool.emit (events.js:211:7)
    at Connection.<anonymous> (/opt/bitnami/apps/parse/htdocs/node_modules/mongodb-core/lib/connection/pool.js:317:12)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at Connection.emit (events.js:214:7)
    at Socket.<anonymous> (/opt/bitnami/apps/parse/htdocs/node_modules/mongodb-core/lib/connection/connection.js:246:50)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
2020-05-24T01:37:38.156Z - error getting auth for sessionToken

【问题讨论】:

    标签: ios mongodb amazon-ec2 parse-platform


    【解决方案1】:

    我想通了...但是在这里发布以防有人遇到同样的错误。我注意到,当我使用 parse 登录到我的 bitami ubuntu 实例时,会出现一条消息,提示需要重新启动系统。我还注意到letsencrypt 工具有一个更新版本。我重新启动了 ubuntu 实例,用sudo service apache2 stop 停止了我的 apache 服务器,用sudo /opt/bitnami/bncert-tool 重新运行了让我们加密证书工具,然后重新启动了我的解析 server.js。当我这样做时,一切又开始工作了!

    【讨论】:

      猜你喜欢
      • 2010-12-05
      • 2014-10-31
      • 2018-04-21
      • 2016-07-30
      • 1970-01-01
      • 2022-10-02
      • 2011-04-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多