telefonicaid / iotagent-ul

IoT Agent for a UltraLight 2.0 based protocol (with HTTP, MQTT and AMQP transports)
https://fiware-iotagent-ul.rtfd.io/
GNU Affero General Public License v3.0
37 stars 55 forks source link

Question: How to enable NGSIv2 in iotagent-ul helmchart? #579

Closed sfl0r3nz05 closed 1 year ago

sfl0r3nz05 commented 1 year ago

Hi, 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.

I get the following log via kubectl logs pod/iotagent-ul-xxxxxx:

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'
}

So, I have modified:

{
  contextBroker:
    # -- host of the broker
    host: orion
    # -- port of the broker
    port: 1026
    # to use NGSI v2
    ngsiVersion: v2
}
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 }}'

            /**
             * If you want to use NGSI v2.
             */
            ngsiVersion: '{{ .Values.iota.contextBroker.ngsiVersion }}'
        }

However, the error persists, any suggestions on how to properly configure NGSIv2?

fgalan commented 1 year ago

It seems this question has been already published at SOF at https://stackoverflow.com/questions/74003335/how-to-enable-ngsiv2-in-iotagent-ul-helmchart

Thus, I'd suggest to close the issue and continue the discussion there. Issues in github repository are for bug, features, etc. but not for question or support, that should be done in SOF.

Thanks!