opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.15k stars 1.02k forks source link

204 No Content response on /alerts endpoint with valid configuration #5819

Open Kev2d opened 4 months ago

Kev2d commented 4 months ago

Encountering a 204 No Content response when accessing the alerts endpoint (/otp/routers/2/index/stops/MNT:28161/alerts) despite having a correct configuration in router-config.json. The setup specifies a frequent update interval and uses OpenTripPlanner version 2.5.0. The issue persists with no alerts returned, impacting the real-time functionality expected from the service

Expected behavior

Expected to receive real-time alerts as JSON/XML response when accessing the specified alerts endpoint.

Observed behavior

Received a 204 No Content response, indicating no data available despite the service being operational and the endpoint configured correctly in router-config.json.

Version of OTP used (exact commit hash or JAR name)

OTP 2.5.0

Data sets in use (links to GTFS and OSM PBF files)

Standard GTFS and OSM PBF files

Router config and graph build config JSON

"updaters": [ { "type": "stop-time-updater", "frequency": "PT1M", "url": "https://api.[REDACTED]/gtfs-feed/2/all", "feedId": "MNT" }, { "type": "real-time-alerts", "frequency": "PT1M", "url": "https://api.[REDACTED]/gtfs-feed/2/SERVICE_ALERT", "feedId": "MNT" } ]

This is what SERVICE_ALERT returns

image
leonardehrenfried commented 4 months ago

You're using the REST API which is enabled. Please switch to one of the GraphQL APIs and check the list of alerts there.

https://docs.opentripplanner.org/en/dev-2.x/apis/Apis/

Also:

Kev2d commented 4 months ago

Hi! @leonardehrenfried

I tried GraphQL api last week but didn't see any alerts.

MNT is correct. Entity id isn't showing on image however if I try another id seen on image can't still access /alerts otp/routers/2/index/stops/MNT:22703 this shows the stop fine but otp/routers/2/index/stops/MNT:22703/alerts isn't giving any alerts and returns me to my previous url.

leonardehrenfried commented 4 months ago

Well, if you don't see any alerts then something else is up.

It's very unlikely that you will receive any help if you are using the REST API.

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days