TheTransitClock / transitclockDocker

Docker installer for TheTransitClock
MIT License
16 stars 15 forks source link

TripUpdate don't show useful info #7

Open wowkin2 opened 6 years ago

wowkin2 commented 6 years ago

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?

scrudden commented 6 years ago

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.

wowkin2 commented 6 years ago

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

header {
  gtfs_realtime_version: "1.0"
  incrementality: FULL_DATASET
  timestamp: 1531934342
}
scrudden commented 6 years ago

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.

scrudden commented 6 years ago

@wowkin2 Can this item be closed?

wowkin2 commented 6 years ago

Found following exceptions:

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]

wowkin2 commented 6 years ago

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
wowkin2 commented 6 years ago

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

scrudden commented 6 years ago

Sorry, my mistake. The module name should have been

org.transitclock.avl.GtfsRealtimeModule

I had given you the old package name.

wowkin2 commented 6 years ago

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 :yum:

wowkin2 commented 6 years ago

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

scrudden commented 6 years ago

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

scrudden commented 6 years ago

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

https://github.com/TheTransitClock/transitclockDocker/blob/183e07df92545b4a1ddeac1c80c0b8659fab027f/config/transitclockConfig.xml#L34-L47

wowkin2 commented 6 years ago

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

wowkin2 commented 6 years ago

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?

scrudden commented 6 years ago

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.

wowkin2 commented 6 years ago

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

scrudden commented 6 years ago

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