Api Fiware IoT代理Json拒绝发布到/v2/op/update

Api Fiware IoT代理Json拒绝发布到/v2/op/update,api,request,iot,fiware,Api,Request,Iot,Fiware,我对fiware IoT代理JSON感兴趣,我试图解决问题。 我已经开始使用教程安装IoT代理JSON。 本教程介绍了IoT执行器连接,为了检查连接,我们必须发布到{IoTAgentIP:Port}/v2/op/update。 当我发布到此端点时,我得到: <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title&

我对fiware IoT代理JSON感兴趣,我试图解决问题。 我已经开始使用教程安装IoT代理JSON。 本教程介绍了IoT执行器连接,为了检查连接,我们必须发布到{IoTAgentIP:Port}/v2/op/update。 当我发布到此端点时,我得到:

<html lang="en">

<head>
   <meta charset="utf-8">
   <title>Error</title>
</head>

<body>
   <pre>Cannot POST /v2/op/update</pre>
</body>

</html>

我的物联网代理版本是:

time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Creating initial entity in the Context Broker:
 {
    "url": "http://localhost:1026/v1/updateContext",
    "method": "POST",
    "json": {
        "contextElements": [
            {
                "type": "Bell",
                "isPattern": "false",
                "id": "urn:ngsi-ld:Bell:001",
                "attributes": [
                    {
                        "name": "refStore",
                        "type": "Relationship",
                        "value": "urn:ngsi-ld:Store:001"
                    },
                    {
                        "name": "ring_status",
                        "type": "commandStatus",
                        "value": "UNKNOWN"
                    },
                    {
                        "name": "ring_info",
                        "type": "commandResult",
                        "value": " "
                    },
                    {
                        "name": "TimeInstant",
                        "type": "ISO8601",
                        "value": " "
                    }
                ]
            }
        ],
        "updateAction": "APPEND"
    },
    "headers": {
        "fiware-service": "openiot",
        "fiware-servicepath": "/",
        "fiware-correlator": "7c9fba8d-9262-4f81-9b4e-f71ab57953ff"
    }
} | comp=IoTAgent
time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=executeWithSecurity | comp=IoTAgent
time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["type"] with queryObj {"type":"Bell"} | comp=IoTAgent
time=2020-10-22T20:46:49.069Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["type"]] not found: [{"type":"Bell"}] | comp=IoTAgent
time=2020-10-22T20:46:49.069Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=error {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group for fields: [\"type\"] and values: {\"type\":\"Bell\"}","code":404} in get group device | comp=IoTAgent
time=2020-10-22T20:46:49.097Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Initial entity created successfully. | comp=IoTAgent
更新-使用最新版本的IoTA和orion,我在IoTA日志文件中获得以下信息:


我设法与一个服务组(/iot/d)合作。因此,附加传感器的Post请求来自/iot/d服务组。 我使用docker图像(使用docker compose编译,如示例所示)。 我还在docker文件中修改了物联网默认资源,以防:
IOTA\u默认值\u资源=

我使用了最新的IoT代理JSON 1.15.0和Orion的早期版本2.4.0。

我升级了IoT代理版本,但没有任何区别。通过运行
/services create
确保所有图像都是最新的,然后重新运行如图所示的命令。如果使用
-iX
运行
curl
命令,您将从响应中获得更多信息。
无法POST/v2/op/update
响应只能由IoT代理生成,并且只能在端口正确且路径不正确的情况下发生,这表明发送的
curl
语句中有输入错误。如果您还有其他问题,请使用
curl-iX
粘贴完整的请求和响应,以帮助进一步诊断问题。可在中找到测试的兼容版本。最新的Orion版本是2.4.2,因此您将错过一些开发和错误修复。由于组件遵循SemVer,您应该可以,因为主版本号没有更改。
curl -iX POST \
  http://localhost:4041/v2/op/update \
  -H 'Content-Type: application/json' \
  -H 'fiware-service: openiot' \
  -H 'fiware-servicepath: /' \
  -d '{
    "actionType": "update",
    "entities": [
        {
            "type": "Bell",
            "id": "urn:ngsi-ld:Bell:001",
            "ring" : {
                "type": "command",
                "value": ""
            }
        }
    ]
}'
{
    "libVersion": "2.12.0-next",
    "port": 4041,
    "baseRoot": "/",
    "version": "1.14.0-next"
}
time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Creating initial entity in the Context Broker:
 {
    "url": "http://localhost:1026/v1/updateContext",
    "method": "POST",
    "json": {
        "contextElements": [
            {
                "type": "Bell",
                "isPattern": "false",
                "id": "urn:ngsi-ld:Bell:001",
                "attributes": [
                    {
                        "name": "refStore",
                        "type": "Relationship",
                        "value": "urn:ngsi-ld:Store:001"
                    },
                    {
                        "name": "ring_status",
                        "type": "commandStatus",
                        "value": "UNKNOWN"
                    },
                    {
                        "name": "ring_info",
                        "type": "commandResult",
                        "value": " "
                    },
                    {
                        "name": "TimeInstant",
                        "type": "ISO8601",
                        "value": " "
                    }
                ]
            }
        ],
        "updateAction": "APPEND"
    },
    "headers": {
        "fiware-service": "openiot",
        "fiware-servicepath": "/",
        "fiware-correlator": "7c9fba8d-9262-4f81-9b4e-f71ab57953ff"
    }
} | comp=IoTAgent
time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=executeWithSecurity | comp=IoTAgent
time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["type"] with queryObj {"type":"Bell"} | comp=IoTAgent
time=2020-10-22T20:46:49.069Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["type"]] not found: [{"type":"Bell"}] | comp=IoTAgent
time=2020-10-22T20:46:49.069Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=error {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group for fields: [\"type\"] and values: {\"type\":\"Bell\"}","code":404} in get group device | comp=IoTAgent
time=2020-10-22T20:46:49.097Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Initial entity created successfully. | comp=IoTAgent