OTP2 router-config GTFS-RT errors (followed documentation)

70 views
Skip to first unread message

Stoyan

unread,
Dec 3, 2021, 10:33:47 AM12/3/21
to OpenTripPlanner Developers

Hello there fellows, 

I’m doing a project requiring bus stops data from Rotterdam and Amsterdam. I’m successfully starting OTP instance without real-time data. However, in order my project to work I need real time data as well. Following the official documentation provided ( http://docs.opentripplanner.org/en/latest/Configuration/#configuring-real-time-updaters ) seem to produce errors in receiving the data: 

Here`s what I do 
(Default OTP settings)

java -Xmx16G -jar otp-2.1.0-SNAPSHOT-shaded.jar --build --save "data/folder/path" 

^produces successful graph 

Then I place the router-config.json in the graph directory with the following settings only: 

route-config1.JPG

Then I run: 

java -Xmx16G -jar otp-2.1.0-SNAPSHOT-shaded.jar "data/folder/path" --load 

 However after the server starts. I start receiving errors (repeating constantly) of type : 

error1.png
 

Re-writing the router-config.json and restarting the server using these settings: 

router-config2.JPG

Then I receive (every 0.2 secs)

 error2.png

Being unfamiliar with Java I was unsuccessful in configuring GTFS-RT feeds. Static GTFS data still works.

Any idea how to setup the router-config syntax If I want to enable all 3, or only 1 of the provided either .proto or .pb files in the data source? Or is it something else I do wrong? 

Andrew Byrd

unread,
Dec 6, 2021, 3:30:54 AM12/6/21
to Stoyan, opentripplanner-dev
Hi,

At first glance, it looks like your OTP instance was fetching successive versions of this feed every 30 seconds, and the timestamp seen in one such version of the feed was earlier in time than the last version OTP had seen. As if the timestamp was moving backward in time on successive fetches, which OTP saw as invalid input. Of course this could be a false alarm due to a logic error in OTP, but I'm looking at the relevant code and it appears correct. It might also be a glitch in the source data. I see that the file timestamp on these files on the server is current - it would be interesting to see if the problem persists today. If it appears to be a problem with the source data, you will want to report this problem to the feed producers.

Then in the second part of your message, you reconfigured OTP to use streaming updates over a websocket connection. However, the URL you specified is an HTTP URL (beginning with http://) rather than a Websocket URL (beginning with ws://) and I see that this file gtfs-realtime.proto exists on the HTTP server - this is not a websocket stream of realtime message, it's the protocol specification file for the GTFS-RT format itself.

I know there used to be a websocket stream for the Netherlands but it was not always available and if I remember correctly your IP had to be added to an allow-list to connect to it. Are you in contact with the producers of these feeds? You may want to ask for clarification that you're using URLs that are still valid and current.

By the way, in the future please copy and paste text instead of attaching images of text. Plain text can be copied, pasted, and searched much more readily and is more simple and compact. 

-Andrew


On 3 Dec 2021, at 22:50, Stoyan <stoyan...@gmail.com> wrote:

Hello there fellows, 

I’m doing a project requiring bus stops data from Rotterdam and Amsterdam. I’m successfully starting OTP instance without real-time data. However, in order my project to work I need real time data as well. Following the official documentation provided ( http://docs.opentripplanner.org/en/latest/Configuration/#configuring-real-time-updaters ) seem to produce errors in receiving the data: 

Here`s what I do 
(Default OTP settings)

java -Xmx16G -jar otp-2.1.0-SNAPSHOT-shaded.jar --build --save "data/folder/path" 

^produces successful graph 

Then I place the router-config.json in the graph directory with the following settings only: 

<route-config1.JPG>

Then I run: 

java -Xmx16G -jar otp-2.1.0-SNAPSHOT-shaded.jar "data/folder/path" --load 

 However after the server starts. I start receiving errors (repeating constantly) of type : 

<error1.png>
 

Re-writing the router-config.json and restarting the server using these settings: 

<router-config2.JPG>

Then I receive (every 0.2 secs)

 <error2.png>

Being unfamiliar with Java I was unsuccessful in configuring GTFS-RT feeds. Static GTFS data still works.

Any idea how to setup the router-config syntax If I want to enable all 3, or only 1 of the provided either .proto or .pb files in the data source? Or is it something else I do wrong? 


--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/opentripplanner-dev/2d6b7461-c53b-4443-bb93-f36a6204555dn%40googlegroups.com.
<router-config2.JPG><route-config1.JPG><error2.png><error1.png>

Stoyan Kuklev

unread,
Dec 6, 2021, 12:09:59 PM12/6/21
to OpenTripPlanner Developers
Thank you for the reply Andrew,

Tried today the .pb approach and it still gave the same errors:  (Logs: link_to_google_docs - only start and end of the logs have non-repeting data)
Used with this configuration (link_to_pastebin_router-config.json):
folder and file structure.JPG
Notioced that when I include the router-config with this setup the endpoint for checking the stops stopTimes (http://localhost:8080/otp/routers/default/index/stops/NL:1962512/stoptimes)
starts giving the following error (after server restart after inserting a router-config)
api_endpoint_fail.JPG
^maybe this will give some hints.

I'm running default settings of the OTP instance. Do I need to add some configs elsewhere besides this router-config.json? Or microservice or other dependency to fetch the data for OTP in order to receive GTFS-RT?
Any insight would be very valuable.

Reply all
Reply to author
Forward
0 new messages