Content-Length: 280739 | pFad | https://github.com/PANTHEONtech/lighty/issues/1682

AF Unable to find SSE Notification URI · Issue #1682 · PANTHEONtech/lighty · GitHub
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

Unable to find SSE Notification URI #1682

Closed
wdec opened this issue Dec 8, 2023 · 5 comments
Closed

Unable to find SSE Notification URI #1682

wdec opened this issue Dec 8, 2023 · 5 comments
Assignees

Comments

@wdec
Copy link

wdec commented Dec 8, 2023

Describe the bug
Error 404/Not found is returned when accessing a indicated URI for a Yang defined notification stream

Branch
Seen on lighty 19.x and also the current 20 main

To Reproduce

  1. Use/start any of the existing yang modules in the example apps (eg the lightyr-community-restcinf-actions-app) or define and include in the app a new a yang model with a simple notification element definition.
  2. Access http://localhost:8888/restconf/data/ietf-restconf-monitoring:restconf-state/streams to obtain the list of notification streams
  3. Access the indicated URI using a curl GET
  4. The same behavior is seen when changing the URI to use the restconf/ endpoint instead of the /rests

Expected behavior
Connection to the SSE notification channel should be established.

Screenshots
GET http://localhost:8888/restconf/data/ietf-restconf-monitoring:restconf-state/streams
Returns:

{
"ietf-restconf-monitoring:streams": {
"stream": [
{
"name": "yang-library-update",
"replay-support": true,
"access": [
{
"encoding": "JSON",
"location": "http://localhost:8888/rests/notif/notification-stream/ietf-yang-library:yang-library-update/JSON"
},
{
"encoding": "XML",
"location": "http://localhost:8888/rests/notif/notification-stream/ietf-yang-library:yang-library-update"
}
],
"description": "Generated when any YANG library information on the\nserver has changed."
},
{
"name": "yang-library-change",
"replay-support": true,
"access": [
{
"encoding": "JSON",
"location": "http://localhost:8888/rests/notif/notification-stream/ietf-yang-library:yang-library-change/JSON"
},
{
"encoding": "XML",
"location": "http://localhost:8888/rests/notif/notification-stream/ietf-yang-library:yang-library-change"
}
],
"description": "Generated when the set of modules and submodules supported\nby the server has changed."
},
{
"name": "data-changed-notification",
"replay-support": true,
"access": [
{
"encoding": "JSON",
"location": "http://localhost:8888/rests/notif/notification-stream/sal-remote:data-changed-notification/JSON"
},
{
"encoding": "XML",
"location": "http://localhost:8888/rests/notif/notification-stream/sal-remote:data-changed-notification"
}
],
"description": "Data change notification."
},
{
"name": "uni-admin-status",
"replay-support": true,
"access": [
{
"encoding": "JSON",
"location": "http://localhost:8888/rests/notif/notification-stream/hco-notification:uni-admin-status/JSON"
},
{
"encoding": "XML",
"location": "http://localhost:8888/rests/notif/notification-stream/hco-notification:uni-admin-status"
}
]
}
]
}
}

GET to any of the URIs returns a 404/not found:

GET: http://localhost:8888/rests/notif/notification-stream/ietf-yang-library:yang-library-change/JSON
GET http://localhost:8888/restconf/notif/notification-stream/ietf-yang-library:yang-library-change/JSON
GET http://localhost:8888/rests/notif/notification-stream/hco-notification:uni-admin-status

<title>Error 404 Not Found</title>

GET http://localhost:8888/restconf/notif/notification-stream/ietf-yang-library:yang-library-change/JSON

Environment (please complete the following information):
JVM 17

Additional context
The issue also is seen when programmatically a notification is generated.

@wdec wdec changed the title Unable to establish SSE Notification channel Unable to find SSE Notification URI Dec 8, 2023
@Tobianas
Copy link
Contributor

Thanks for your report @wdec .We are currently having a look into this and will inform about any progress.

@ihrasko
Copy link
Collaborator

ihrasko commented Jan 5, 2024

We are working on https://jira.opendaylight.org/browse/NETCONF-1218 and https://jira.opendaylight.org/browse/NETCONF-1220 at the moment. After finishing they need to be integrated and tested with lighty.io codebase.

odl-github pushed a commit to opendaylight/netconf that referenced this issue Jan 9, 2024
Base path for streams was hard-coded on this enpoint:
/rests/data/ietf-restconf-monitoring:restconf-state/streams
This caused issues as:
PANTHEONtech/lighty#1682

This patch changes this so that we get base path from uriInfo parameter.

JIRA: NETCONF-1220
Change-Id: I1c57ff3f4de800a73f364d8d520bb6a82ed2c1ae
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
odl-github pushed a commit to opendaylight/netconf that referenced this issue Jan 9, 2024
Base path for streams was hard-coded on this enpoint:
/rests/data/ietf-restconf-monitoring:restconf-state/streams
This caused issues as:
PANTHEONtech/lighty#1682

This patch changes this so that we get base path from uriInfo parameter.

JIRA: NETCONF-1220
Change-Id: I1c57ff3f4de800a73f364d8d520bb6a82ed2c1ae
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
odl-github pushed a commit to opendaylight/netconf that referenced this issue Jan 9, 2024
Base path for streams was hard-coded on this enpoint:
/rests/data/ietf-restconf-monitoring:restconf-state/streams
This caused issues as:
PANTHEONtech/lighty#1682

This patch changes this so that we get base path from uriInfo parameter.

JIRA: NETCONF-1220
Change-Id: I1c57ff3f4de800a73f364d8d520bb6a82ed2c1ae
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
odl-github pushed a commit to opendaylight/netconf that referenced this issue Jan 10, 2024
Base path for streams was hard-coded with assumption that restconf
base path is always configured to be "rests".

There are some users that configures different paths for restconf,
for example lighty.io.

This patch changes this so that we get actual base path from uriInfo
parameter.

See also:
PANTHEONtech/lighty#1682

JIRA: NETCONF-1220
Change-Id: I1c57ff3f4de800a73f364d8d520bb6a82ed2c1ae
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
odl-github pushed a commit to opendaylight/netconf that referenced this issue Jan 10, 2024
Base path for streams was hard-coded with assumption that restconf
base path is always configured to be "rests".

There are some users that configures different paths for restconf,
for example lighty.io.

This patch changes this so that we get actual base path from uriInfo
parameter.

See also:
PANTHEONtech/lighty#1682

JIRA: NETCONF-1220
Change-Id: I1c57ff3f4de800a73f364d8d520bb6a82ed2c1ae
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
(cherry picked from commit 7c0de75)
@ihrasko
Copy link
Collaborator

ihrasko commented Jan 26, 2024

#1703 needs some clean-up but provides a working example how to enable /notif path in lighty.

@wdec
Copy link
Author

wdec commented Jan 30, 2024 via email

@ihrasko
Copy link
Collaborator

ihrasko commented Feb 1, 2024

Fixed in version 20.0.0 (eta March 2024), 19.2.0 (eta next week) and 18.4.0 (eta March 2024).

@ihrasko ihrasko closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/PANTHEONtech/lighty/issues/1682

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy