【问题标题】:Connect Orion with specific database将 Orion 与特定数据库连接
【发布时间】:2019-02-14 23:21:59
【问题描述】:

我在意外的服务器上重新启动,重新启动 contextrboker 时它在重新启动时无法连接旧功能。如果我进入 Mongodb,会出现两个数据库:orion 和 orion-tests。

我想连接 orion-tests,这是我拥有所有实体的地方。

当我使用 Fiware-Service 和 Fiware-ServicePath 创建一个新实体时,我总是使用该实体创建一个新数据库,但此时它会将所有内容添加到 Orion。

有什么问题?我怎样才能解决这个问题?我在之前的数据库中创建了 100 多个实体。

EDIT01

这是信息:

ps -ax | grep contextBroker
 9275 pts/2    S+     0:00 grep --color=auto contextBroker
19825 ?        Ssl    0:45 contextBroker

【问题讨论】:

  • 我想我知道可能是什么原因,但要确认我需要知道你是如何运行 Orion 的。请您编辑您的问题帖子以添加该信息吗?通常,ps -ax | grep contextBroker 在 Orion 运行的系统中的输出。
  • 这是信息:ps -ax | grep contextBroker 9275 pts / 2 S + 0:00 grep --color = auto contextBroker 19825? Ssl 0:45 contextBroker
  • 很难在评论行中看到...您可以编辑您的问题帖子并将其包含在其中,格式正确吗?谢谢!
  • 对不起,我刚刚编辑了帖子

标签: fiware fiware-orion


【解决方案1】:

您需要在启用多服务标志的情况下运行 Orion 才能处理 fiware-service 标头。尝试使用contextBroker -multiservice 而不是contextBroker

【讨论】:

    【解决方案2】:

    使用 -db 参数将 Orion 连接到另一个数据库的快速修复。

    docker run fiware/orion -db orion-tests
    

    真正解决问题,请阅读Database Administration 上的部分,定期对您的实体进行数据库转储。您需要做的就是将mongorestore 中的数据从orion-test 转换成orion

    mongodump old_database
    mongorestore --db new_database ./dump/old_database
    

    【讨论】:

      猜你喜欢
      • 2022-07-31
      • 1970-01-01
      • 1970-01-01
      • 2011-07-23
      • 1970-01-01
      • 1970-01-01
      • 2014-10-31
      • 2019-05-08
      • 1970-01-01
      相关资源
      最近更新 更多