no real-time data available in OBA (using own custom temporary https endpoint)

29 views
Skip to first unread message

Wojciech Kulesza

unread,
Feb 9, 2022, 5:18:32 AMFeb 9
to onebusaway-developers
Hey,
were moving to https from http (finally!) after upgrading to a new debian server.
Now, comparing results from iOS apps - Kiedybus (using own regions file with http links to endpoints - https://www.kiedybus.pl/regions-v4.json) with Onebusaway (using custom temporary https end point - https://oba.iplaner.pl/oba-api-webapp-wlkp/).

We have the very same data-sources.xml in the transit-federation-webapp for both deployments, but for some reason, in KiedyBus all arrivals-and-departures are in real-time and in Onebusaway only some agencies are real-time, and rest is schedule only.

Here is that data-sources.xml:

Any pointers on debuging this ?

Cheers,
Wojciech @goEuropa

Sean Barbeau

unread,
Feb 9, 2022, 10:06:36 AMFeb 9
to onebusaway-developers
Wojciech,
So if I understand correctly, you went from several OBA servers each having one GTFS dataset, to a single OBA server that contains multiple GTFS datasets. And in the single OBA server with multiple datasets, only some agencies are showing RT data.

Some questions:
1. What version of OBA are you using?
2. How are you bundling the bundle for the single OBA server? What command are you using?
3. Which agencies are having problems? Can you post the relevant sections from both the data-sources.xml files for just those agencies?
4. Could you share pointers to the GTFS data as well?
5. Do you see any output in the logs that might indicate what's going on?

A mismatch in RT and schedule trip IDs is the most common reason for real-time arrivals not showing up, or the agency ID not being configured in the data-sources.xml or overlapping between GTFS (e.g., if everyone uses agency ID of "1"). These mismatches should be visible in the logs.

Sean

Wojciech Kulesza

unread,
Feb 10, 2022, 6:54:57 AMFeb 10
to onebusaway-developers
Hi,
generally yes. I want to have one region for all agencies that are operating in one area.
In the meantime, we were able to solve the problem of real-time data - there inconsistencies in gtfs ( ids for trips changed in gtfs, but not in gtfs-rt).
So real-time appeared for that biggest agency.
Second, unsolved problem is stops not appearing for one agency.

ad 1. We're using OBA 2.0
ad 2. java -jar /data/onebusaway/bundle/wlkp/oba-builder.jar /data/onebusaway/bundle/wlkp/KPA.zip /data/onebusaway/bundle/wlkp/SW.zip /data/onebusaway/bundle/wlkp/swarzedz.zip /data/onebusaway/bundle/wlkp/pkspoznan.zip /data/onebusaway/bundle/wlkp/ztm.zip /data/onebusaway/bundle/wlkp/ -P tripEntriesFactory.throwExceptionOnInvalidStopToShapeMappingException=false

ad 3. problem with stops not showing is for pkspoznan.zip so in data-sources.xml is the first property of
<bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource">
interestingly, i can find the stop KUNOW25 for route 172 of pks - this is the only stop that can be located...

ad 4. the gtfs for that agency is www.pksonline.pl/pkspoznan.zip while the main one (that is working, can be downloaded using:

ad 5.
Got to admit, I'm good in tracking down errors in tomcat logs now (solved https issues) but not really in OBA yet...

Sean Barbeau

unread,
Feb 11, 2022, 12:08:43 PMFeb 11
to onebusaway-developers
>problem with stops not showing

Do you mean the stop doesn't appear in the results of the stop-for-location API (e.g., doesn't appear on app in apps):

...or you can't get information about the stop using arrivals-and-departures-for-stop API:

If you can share some exact API requests and responses that would help.

>the gtfs for that agency is www.pksonline.pl/pkspoznan.zip while the main one (that is working

So is there something wrong with one of the GTFS datasets? Why are you using different datasets for the one region vs. multiple regions?

Sean

Wojciech Kulesza

unread,
Feb 14, 2022, 4:22:37 AMFeb 14
to onebusaway...@googlegroups.com
pt., 11 lut 2022 o 18:08 Sean Barbeau <sjba...@gmail.com> napisał(a):
>problem with stops not showing

Do you mean the stop doesn't appear in the results of the stop-for-location API (e.g., doesn't appear on app in apps):

stops don't appear on the map.  I think what is causing this is stop_id conflict as when watching this one route(that only shows one stop on the map) and viewing the trip, it shows stops of a different agency in its list. Is OBA not virtually adding prefixes to stops that utilize agency_id to differentiate if there are stops with same ids ?
--
You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onebusaway-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/onebusaway-developers/310eee1a-875d-4541-a184-dc5d341ece01n%40googlegroups.com.


--

Wojciech Kulesza

Właściciel / Owner

goEuropa Polska Wojciech Kulesza

+48616248682
wojciech...@goeuropa.eu
www.goeuropa.eu
ul. 28 Czerwca 1956r nr 400
Kiedy przyjedzie autobus? Sprawdż na www.kiedybus.pl

Sean Barbeau

unread,
Feb 14, 2022, 9:33:48 AMFeb 14
to onebusaway...@googlegroups.com
It should. Are the agency_ids in the two different GTFS datasets different?

Sean


You received this message because you are subscribed to a topic in the Google Groups "onebusaway-developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/onebusaway-developers/CVVnU0xvy_s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to onebusaway-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/onebusaway-developers/CAB9LHzFh10%3DHRGK6wYuGra4mAgUfFWdRrMTZMXw2ZyWFSrr%3DSA%40mail.gmail.com.

Wojciech Kulesza

unread,
Feb 15, 2022, 3:58:00 AMFeb 15
to onebusaway...@googlegroups.com
Yes, they are different (PKS is 1211 and MPK agency in ZTM feed has 2).Strangely enough, route 172 only exists in PKS, not in ZTM and if you search for it and view it, it shows incorrect stops (mostly taken from ZTM agency). 171 and 173 are in ZTM, while 172 is in PKS.  What is the quickest way to debug if I don';t have android studio installed. Else, what is the best way to debug after i install android studio ?

Sean Barbeau

unread,
Feb 15, 2022, 12:25:06 PMFeb 15
to onebusaway...@googlegroups.com
I'd load up the exact same GTFS files from each of those agencies in separate OBA servers (each by themselves) and look at the same route just to make sure the GTFS data itself is good (i.e., if these look ok, then the issue is combining these files in the same bundle).

You can look directly at the REST API output to see if there are any more hints. Here's the format of the API to look at individual stops:

"200" is the agency_id and "425" is the stop ID.

Similarly, for viewing route on the map:

...and viewing "trip status" for individual trips:

I'd also check the output log when building the combined bundle to see if there are any hints there. I'd try this with just the two agencies that seem to be having problems to avoid the noise from everything else.

If you install Android Studio, you can view these API calls in Logcat when you tap on elements in the app. Just type "http" into the search box and it will show all the API calls as you make them:
image.png


Reply all
Reply to author
Forward
0 new messages