[英]How to enable NGSIv2 in iotagent-ul helmchart?
當我向通過 iotagent-ul helm chart 部署的 iotagent-ul 發送 POST 時,我收到{"name":"BAD_REQUEST","message":"Request error connecting to the Context Broker: 501"}
錯誤。
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"
}
按照iotagent-ul 文檔啟用 NGSIv2,必須在 contextBroker 中設置 ngsiVersion:
{
host: '192.168.56.101',
port: '1026',
ngsiVersion: 'v2'
}
由於我使用的是官方 fiware helm-chart,因此我更新了 configmap.yaml 以包含 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 }}'
}
現在,我收到此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
根據對該問題的評論,您使用的是 Orion-LD 而不是官方 Orion。 Orion-LD 對 NGSIv2 的支持是有限的,所以我建議將您的上下文代理更改為官方 Orion 最新版本(在撰寫本文時為3.7.0 )。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.