Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating subscription results in error in orion-ld log #1317

Closed
pdmangel2 opened this issue Feb 2, 2023 · 4 comments
Closed

Creating subscription results in error in orion-ld log #1317

pdmangel2 opened this issue Feb 2, 2023 · 4 comments

Comments

@pdmangel2
Copy link

Following creation of subscription in version


###
POST http://localhost:1026/ngsi-ld/v1/subscriptions
Fiware-Service: t_02
Content-Type: application/json

{
    "id": "urn:subscr:123457",
    "type": "Subscription",
    "description": "manual test",
    "entities": [
        {
            "idPattern": ".*",
            "type": "ParkingSpot"
        }
    ],
    "q": "status==%22occupied%22",
    "watchedAttributes": ["status"],
    "notification": {
        "endpoint": {
            "uri": "http://nginx:8080/api/tools/mock/httpNoAuth",
            "accept": "application/ld+json"
        },
        "format": "keyValues",
        "attributes": [
            "status"
        ]
    }
}

invokes following error in orion-ld log:
time=Thursday 02 Feb 10:25:32 2023.853Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=globals.cpp[544]:parse8601Time | msg=Not a valid date: '%22occupied%22'

Replacing the %22 by \" invokes in similar logging of msg=Internal Error (the time string is too long - 41 characters is the max length)

@kzangeli kzangeli self-assigned this Feb 2, 2023
@kzangeli kzangeli added the bug Something isn't working label Feb 2, 2023
@kzangeli
Copy link
Collaborator

kzangeli commented Feb 2, 2023

ok, noted.
I'll look into this as soon as I get an opportunity.

@kzangeli
Copy link
Collaborator

kzangeli commented Feb 2, 2023

ok, understood.
The error message is unfortunate. Quite unfortunate!!!

The broker checks whether it's a valid timestamp and if it is, it parses it into a float.
As it is not a valid timestamp, it's understood as a normal string.

All OK, the subscription is created, just a quite annoying (and incorrect) error message in the logfile.
I'll remove it in a few minutes.

kzangeli added a commit that referenced this issue Feb 2, 2023
kzangeli added a commit that referenced this issue Feb 2, 2023
@kzangeli
Copy link
Collaborator

kzangeli commented Feb 3, 2023

Fixed in PR #1318

@kzangeli kzangeli added Fixed - needs validation and removed bug Something isn't working labels Feb 3, 2023
@pdmangel2
Copy link
Author

Fix tested and ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants