Skip to content

TripUpdate don't show useful info #7

Open

Description

@wowkin2

Opened following urls:
http://localhost:8080/web/reports/apiCalls/gtfsRealtimeTripUpdatesApiParams.jsp?a=1
http://localhost:8080/api/v1/key/f78a2e9a/agency/1/command/gtfs-rt/tripUpdates?format=human
and saw that TripUpdate looks like this:

header {
  gtfs_realtime_version: "1.0"
  incrementality: FULL_DATASET
  timestamp: 1531928043
}

and VehiclePosition contains less information than in source.

Is that expected behavior?
I wanted this service to generate TripUpdate from VehiclePosition + GTFS Static

What should I do to get all predictions of how much time to arrival of all vehicles to some stop?

Activity

  1. scrudden commented on Jul 18, 2018

    @scrudden
    Member

    In this file you will need to change the avl module as below.

    https://github.com/TheTransitClock/transitclockDocker/blob/MBTA_trial/config/transitclockConfig.xml
    
    from: org.transitclock.custom.mbta.HighFreqAvlModule
    
    to: org.transitime.avl.GtfsRealtimeModule
    

    I had this configured to work with a high frequecy test AVL feed from the MBTA.

  2. wowkin2 commented on Jul 18, 2018

    @wowkin2
    Author

    Changed, restarted (even whole PC to be sure), but still the same:

    header {
      gtfs_realtime_version: "1.0"
      incrementality: FULL_DATASET
      timestamp: 1531934342
    }
    
  3. scrudden commented on Jul 18, 2018

    @scrudden
    Member

    You need to rerun ./go.sh and rebuild the servers again or login to the transitclock-server-instance and change the config file directly in /usr/local/transitclock/config.

    Also, in the container you will find a /usr/local/transitclock/logs directory that should provide further info.

  4. scrudden commented on Jul 23, 2018

    @scrudden
    Member

    @wowkin2 Can this item be closed?

  5. wowkin2 commented on Jul 25, 2018

    @wowkin2
    Author

    Found following exceptions:

    • in cache.log:
    15:15:00.886 Attempting to create an existing singleton. Existing singleton returned.
    
    15:15:01.878 Update check failed: 
    java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.terracotta.org/kit/reflector?pageID=update.properties&patch=UNKNOWN&tc-product=ehcache-core+2.10.0&tc-version=2.10.0&uptime-secs=1&kitID=ehcache.default&jvm-version=1.8.0_121&os-name=Linux&id=-1408172029&source=ehcache-core&jvm-name=OpenJDK+64-Bit+Server+VM&platform=amd64
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) ~[na:1.8.0_121]
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) ~[na:1.8.0_121]
    	at net.sf.ehcache.util.UpdateChecker.getUpdateProperties(UpdateChecker.java:153) [Core.jar:na]
    	at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:117) [Core.jar:na]
    	at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:104) [Core.jar:na]
    	at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:95) [Core.jar:na]
    	at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_121]
    	at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_121]
    
    • in core.log:
    Starting up optional modules specified via transitclock.modules.optionalModulesList param:
    Starting up optional module org.transitime.avl.GtfsRealtimeModule
    Could not run module org.transitime.avl.GtfsRealtimeModule
    java.lang.ClassNotFoundException: org.transitime.avl.GtfsRealtimeModule
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_121]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_121]
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_121]
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_121]
    	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_121]
    	at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_121]
    	at org.transitclock.modules.Module.start(Module.java:111) [Core.jar:na]
    	at org.transitclock.modules.Module.start(Module.java:94) [Core.jar:na]
    	at org.transitclock.applications.Core.main(Core.java:501) [Core.jar:na]
    Starting up optional module org.transitclock.core.predAccuracy.PredictionAccuracyModule
    Setting up AbstractServer for RMI using secondary port=2098
    Starting module org.transitclock.core.TimeoutHandlerModule for agencyId=1
    Setting up AbstractServer for RMI using secondary port=2098
    Setting up AbstractServer for RMI using secondary port=2098
    Setting up AbstractServer for RMI using secondary port=2098
    Setting up AbstractServer for RMI using secondary port=2098
    Setting up AbstractServer for RMI using secondary port=2098
    Setting up AbstractServer for RMI using secondary port=2098
    Setting up AbstractServer for RMI using secondary port=2098
    
    • in holding.log:
    15:15:01.878 Update check failed: 
    java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.terracotta.org/kit/reflector?pageID=update.properties&patch=UNKNOWN&tc-product=ehcache-core+2.10.0&tc-version=2.10.0&uptime-secs=1&kitID=ehcache.default&jvm-version=1.8.0_121&os-name=Linux&id=-1408172029&source=ehcache-core&jvm-name=OpenJDK+64-Bit+Server+VM&platform=amd64
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) ~[na:1.8.0_121]
    	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) ~[na:1.8.0_121]
    	at net.sf.ehcache.util.UpdateChecker.getUpdateProperties(UpdateChecker.java:153) [Core.jar:na]
    	at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:117) [Core.jar:na]
    	at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:104) [Core.jar:na]
    	at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:95) [Core.jar:na]
    	at java.util.TimerThread.mainLoop(Timer.java:555) [na:1.8.0_121]
    	at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_121]
    
  6. wowkin2 commented on Jul 25, 2018

    @wowkin2
    Author

    File predAccuracy.log contains:

    Started module org.transitclock.core.predAccuracy.PredictionAccuracyModule for agencyId=1
    processing prediction accuracy....
    getRoutesAndStops() returning [RouteAndStops [routeId=140, stopIds={0=[4795, 4799, 4811, 4735, 4736], 1=[4818, 4795, 4697, 4822, 4813]}], ... and many other RouteAndStops ...]
    Calling PredictionReaderModule.getAndProcessData() to process internal prediction.
    No predictions found for routeId=140 directionId=0 stopId=4795
    No predictions found for routeId=140 directionId=0 stopId=4799
    No predictions found for routeId=140 directionId=0 stopId=4811
    No predictions found for routeId=140 directionId=0 stopId=4735
    No predictions found for routeId=140 directionId=0 stopId=4736
    No predictions found for routeId=140 directionId=1 stopId=4818
    
  7. wowkin2 commented on Jul 25, 2018

    @wowkin2
    Author

    Is it ok, or should I do something else?
    Config is ok, and result is still the same...

  8. scrudden commented on Jul 25, 2018

    @scrudden
    Member

    Sorry, my mistake. The module name should have been

    org.transitclock.avl.GtfsRealtimeModule
    

    I had given you the old package name.

  9. wowkin2 commented on Jul 26, 2018

    @wowkin2
    Author

    Updated, but no changes.
    Will write you my URLs on email, so you'll be able to check if it is working on your code.
    If yes, you'll be able to just make a zip with all files and send them back.
    If not - will need to find bugs here 😋

  10. wowkin2 commented on Jul 26, 2018

    @wowkin2
    Author

    Sent.
    BTW, don't see GTFS_URL anywhere in transitclockConfig.xml file?
    Should it be there? Maybe that is the reason?

  11. scrudden commented on Jul 26, 2018

    @scrudden
    Member

    Can you show me the transitclockConfig.xml that is in the /usr/local/transitclock/config directory of the transitclock-server-instance container?

  12. scrudden commented on Jul 26, 2018

    @scrudden
    Member

    I also think that the boundary for the Ukraine will need to be set as per the comment here. It defaults to the US.

    <!-- These are the values used for Irish Rail. -->
    <!-- <minLongitude>-10.725</minLongitude>
    <maxLongitude>-5.35</maxLongitude>
    <minLatitude>51.35</minLatitude>
    <maxLatitude>55.45</maxLatitude>
    -->
    <!-- defaults are for north america so only need this if we are not using data from there. -->
    <!-- These are the values used for CAPMETRO in Austin, Texas. -->
    <!-- <minLatitude>30.145125</minLatitude>
    <maxLatitude>30.517681</maxLatitude>
    <minLongitude>-98.072043</minLongitude>
    <maxLongitude>-97.495917</maxLongitude>
    -->

  13. wowkin2 commented on Jul 27, 2018

    @wowkin2
    Author

    OMG, thanks! Now it works! 😄
    Why there is such a restriction? How can I use it?

  14. wowkin2 commented on Jul 27, 2018

    @wowkin2
    Author

    Question, is tripUpdates showing trip_update.stop_time_update.arrival.time from the schedule if schedule_relationship == "SCHEDULED"?
    Or prediction is based on scheduled and VehiclePositions.

    Found trip_update.delay, should I manually calculate trip_update.stop_time_update.arrival.time + trip_update.delay or is it already there?

  15. scrudden commented on Jul 27, 2018

    @scrudden
    Member

    Hi,

    Can you ask these new questions either on TheTransitClock mailing list or as separate issues in the https://github.com/TheTransitClock/transitime project.

    It will make it easier for others to benefit from the information.

    Thanks,

    Sean.

  16. wowkin2 commented on Jul 28, 2018

    @wowkin2
    Author

    Asked there.
    Few things that still need to ask here:

    • why this information is generated only for first and last route stops?
    • why the most of items in TripUpdate have stop_time_update.departure equals 0?
  17. scrudden commented on Aug 1, 2018

    @scrudden
    Member

    On the first item, what information do you mean by "this information"? Do you mean the schedule_relationship?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions