FIWARE / context.Orion-LD

Context Broker and CEF building block for context data management which supports both the NGSI-LD and the NGSI-v2 APIs
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf
GNU Affero General Public License v3.0
50 stars 43 forks source link

Gateway timeout #1420

Open flopezag opened 1 year ago

flopezag commented 1 year ago

I am using Orion-LD v1.4.0, when I want to create an entity with the following details

{
    "method": "POST",
    "url": "http://localhost:1026/ngsi-ld/v1/entities/",
    "headers": {
        "User-Agent": "python-requests/2.31.0",
        "Accept-Encoding": "gzip, deflate",
        "Accept": "*/*",
        "Connection": "keep-alive",
        "Content-Type": "application/ld+json",
        "Content-Length": "761"
    },
    "body": {
        "id": "urn:ngsi-ld:Vehicle:3225683971964562",
        "type": "Vehicle",
        "brandName": {
            "type": "Property",
            "value": "Mercedes"
        },
        "isParked": {
            "type": "Relationship",
            "object": "urn:ngsi-ld:OffStreetParking:Downtown1",
            "observedAt": "2017-07-29T12:00:04Z",
            "providedBy": {
                "type": "Relationship",
                "object": "urn:ngsi-ld:Person:Bob"
            },
            "datasetId": "urn:ngsi-ld:Relationship:parked12345"
        },
        "speed": [
            {
                "type": "Property",
                "value": 55,
                "source": {
                    "type": "Property",
                    "value": "Speedometer"
                }
            },
            {
                "type": "Property",
                "value": 54.5,
                "source": {
                    "type": "Property",
                    "value": "GPS"
                },
                "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed"
            }
        ],
        "@context": [
            "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
        ]
    }
}

I receive a Gateway Timeout response with the following details:

{
    "url": "http://localhost:1026/ngsi-ld/v1/entities/",
    "headers": {
        "Date": "Tue, 29 Aug 2023 14:08:38 GMT",
        "Content-Type": "application/json",
        "Content-Length": "245"
    },
    "status_code": 504,
    "reason": "Gateway Timeout",
    "body": {
        "type": "https://uri.etsi.org/ngsi-ld/errors/InternalError",
        "title": "Timeout during download of an @context",
        "detail": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
    }
}

I can assure that I can access to the corresponding @context in the browser

bramk commented 1 year ago

I am seeing similar behavior on a 1.1.0 deployment. After a clean redeploy it is unable to load the smart data model device context from github.

3-09-04T13:50:59.990Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldError.cpp[65]:orionldError | msg=***** ERROR Timeout during download of an @context: https://raw.githubusercontent.com/smart-data-models/dataModel.Device/master/context.jsonld (status code: 504)
time=2023

Like @flopezag I can access the context from the browser and I can also retrieve it with curl from the pod where the orion-ld is running.

kzangeli commented 1 year ago

@bramk, I might have fixed this, trying to have Fernando try it again. If you test with the newest image on dockerhub, it just might work now·