简体   繁体   中英

How to enable NGSIv2 in iotagent-ul helmchart?

I received {"name":"BAD_REQUEST","message":"Request error connecting to the Context Broker: 501"} error when when I send a POST to iotagent-ul deployed via iotagent-ul helm chart.

time=2022-10-08T09:03:18.182Z | lvl=DEBUG | corr=d7ed414d-a132-45ea-b4a3-38ee14a828dc | trans=d7ed414d-a132-45ea-b4a3-38ee14a828dc | op=IoTAgentNGSI.Request | from=n/a | srv=openiot | subsrv=/ | msg=Response {
    "error": "NotImplemented",
    "description": "Only NGSIv1-based forwarding supported at the present moment. Set explictely legacyForwarding to true"
}

Following the iotagent-ul documentation to enable NGSIv2, it must be set ngsiVersion in contextBroker:

{
    host: '192.168.56.101',
    port: '1026',
    ngsiVersion: 'v2'
}

Since I am using the official fiware helm-chart, I have updated the configmap.yaml to include the ngsiVersion

    contextBroker: {
    /**
     * Host where the Context Broker is located.
     */
    host: '{{ .Values.iota.contextBroker.host }}',

    /**
     * Port where the Context Broker is listening.
     */
    port: '{{ .Values.iota.contextBroker.port }}',

    /**
     * ngsiVersion supported by the Context Broker.
     */
    ngsiVersion: '{{ .Values.iota.contextBroker.ngsiVersion }}'
}

Now, I get this error :

time=2022-10-08T18:17:24.614Z | lvl=ERROR | corr=841d2b61-463e-42ff-acd7-d0f4b867b7b3 | trans=841d2b61-463e-42ff-acd7-d0f4b867b7b3 | op=IoTAgentNGSI.DeviceService | srv=openiot | subsrv=/ | msg=Registration error connecting to the Context Broker: {"code":"400","reasonPhrase":"Bad Request","details":"missing isDomain value for registration attribute"} | comp=IoTAgent

According to comments on the question, you are using Orion-LD instead of official Orion. The Orion-LD support to NGSIv2 is limited, so I'd suggest to change your context broker to official Orion newest version (3.7.0 at the moment of writing this).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM