尝试在先前已定义另一个地理位置属性时定义地理位置属性 [Coords]

attempt to define a geo location attribute [Coords] when another one has been previously defined

我已经使用 docker pull 迁移到 Orion 最新版本。

我的服务从 IOTAgent 接收数据,并且我已经在之前的 Orion 版本 (0.26) 中创建了多个实体。 Orion 能够接收到 IOTAgent 发送的数据。

但是在迁移之后我收到了这个警报

orion_1 | WARNING@10:33:31  AlarmManager.cpp[380]: Raising alarm BadInput myIPADDRESS: attempt to define a geo location attribute [Coords] when another one has been previously defined []

这是我收到的 JSON 回复

[Wed, 11 May 2016 12:27:52 +0200] ERROR JSON response= :{
  "contextResponses" : [
    {
      "contextElement" : {
        "type" : "STCSensor",
        "isPattern" : "false",
        "id" : "403432100",
        "attributes" : [
          {
            "name" : "Serial",
            "type" : "integer",
            "value" : ""
          },
          {
            "name" : "BatteryLevel",
            "type" : "integer",
            "value" : ""
          },
          {
            "name" : "Timestamp",
            "type" : "integer",
            "value" : ""
          },
          {
            "name" : "Latitude",
            "type" : "float",
            "value" : ""
          },
          {
            "name" : "Longitude",
            "type" : "float",
            "value" : ""
          },
          {
            "name" : "Coords",
            "type" : "geo:point",
            "value" : ""
          }
        ]
      },
      "statusCode" : {
        "code" : "472",
        "reasonPhrase" : "request parameter is invalid/not allowed",
        "details" : "action: APPEND - entity: [403432100, STCSensor] - offending attribute: Coords - attempt to define a geo location attribute [Coords] when another one has been previously defined []"
      }
    }
  ]
}

我应该删除我所有的实体和订阅吗?

Mongodb还没更新,还在用2.6

我该如何解决这个问题?

根据用户报告(参见问题 post 的评论),解决方案是重新创建实体(即删除,然后重新创建)。

问题的原因可能是与 MongoDB 处的实体对应的数据库文档中存在一些不连贯性。然而,我们永远不知道... :)