[solved] Can't find a transfer walk route

I added transfers.txt file to GTFS, and see this error. What does it mean?

web_1  | ERROR [2020-08-22 10:59:35,973] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down
web_1  | ! java.lang.RuntimeException: Can't find a transfer walk route.
web_1  | ! at com.graphhopper.gtfs.GraphHopperGtfs.lambda$getType0TransferWithTimes$4(GraphHopperGtfs.java:267)
web_1  | ! at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
web_1  | ! at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
web_1  | ! at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
web_1  | ! at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
web_1  | ! at java.base/java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.CountedCompleter.exec(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
web_1  | ! Causing: java.lang.RuntimeException: java.lang.RuntimeException: Can't find a transfer walk route.
web_1  | ! at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
web_1  | ! at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
web_1  | ! at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
web_1  | ! at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source)
web_1  | ! at java.base/java.util.concurrent.ForkJoinTask.invoke(Unknown Source)
web_1  | ! at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source)
web_1  | ! at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source)
web_1  | ! at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
web_1  | ! at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
web_1  | ! at com.graphhopper.gtfs.GraphHopperGtfs.lambda$importPublicTransit$1(GraphHopperGtfs.java:178)
web_1  | ! at java.base/java.util.HashMap.forEach(Unknown Source)
web_1  | ! at java.base/java.util.Collections$UnmodifiableMap.forEach(Unknown Source)
web_1  | ! at com.graphhopper.gtfs.GraphHopperGtfs.importPublicTransit(GraphHopperGtfs.java:172)
web_1  | ! ... 18 common frames omitted
web_1  | ! Causing: java.lang.RuntimeException: Error while constructing transit network. Is your GTFS file valid? Please check log for possible causes.
web_1  | ! at com.graphhopper.gtfs.GraphHopperGtfs.importPublicTransit(GraphHopperGtfs.java:189)
web_1  | ! at com.graphhopper.GraphHopper.postProcessing(GraphHopper.java:934)
web_1  | ! at com.graphhopper.GraphHopper.process(GraphHopper.java:662)
web_1  | ! at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:625)
web_1  | ! at com.graphhopper.http.GraphHopperManaged.start(GraphHopperManaged.java:125)
web_1  | ! at io.dropwizard.lifecycle.JettyManaged.doStart(JettyManaged.java:27)
web_1  | ! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
web_1  | ! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
web_1  | ! at org.eclipse.jetty.server.Server.start(Server.java:407)
web_1  | ! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
web_1  | ! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
web_1  | ! at org.eclipse.jetty.server.Server.doStart(Server.java:371)
web_1  | ! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
web_1  | ! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:53)
web_1  | ! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:45)
web_1  | ! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
web_1  | ! at io.dropwizard.cli.Cli.run(Cli.java:78)
web_1  | ! at io.dropwizard.Application.run(Application.java:94)
web_1  | ! at com.graphhopper.http.GraphHopperApplication.main(GraphHopperApplication.java:35)
web_1  | java.lang.RuntimeException: Error while constructing transit network. Is your GTFS file valid? Please check log for possible causes.
web_1  | 	at com.graphhopper.gtfs.GraphHopperGtfs.importPublicTransit(GraphHopperGtfs.java:189)
web_1  | 	at com.graphhopper.GraphHopper.postProcessing(GraphHopper.java:934)
web_1  | 	at com.graphhopper.GraphHopper.process(GraphHopper.java:662)
web_1  | 	at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:625)
web_1  | 	at com.graphhopper.http.GraphHopperManaged.start(GraphHopperManaged.java:125)
web_1  | 	at io.dropwizard.lifecycle.JettyManaged.doStart(JettyManaged.java:27)
web_1  | 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
web_1  | 	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
web_1  | 	at org.eclipse.jetty.server.Server.start(Server.java:407)
web_1  | 	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
web_1  | 	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
web_1  | 	at org.eclipse.jetty.server.Server.doStart(Server.java:371)
web_1  | 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
web_1  | 	at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:53)
web_1  | 	at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:45)
web_1  | 	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
web_1  | 	at io.dropwizard.cli.Cli.run(Cli.java:78)
web_1  | 	at io.dropwizard.Application.run(Application.java:94)
web_1  | 	at com.graphhopper.http.GraphHopperApplication.main(GraphHopperApplication.java:35)
web_1  | Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Can't find a transfer walk route.
web_1  | 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
web_1  | 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
web_1  | 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
web_1  | 	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinTask.invoke(Unknown Source)
web_1  | 	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source)
web_1  | 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source)
web_1  | 	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
web_1  | 	at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
web_1  | 	at com.graphhopper.gtfs.GraphHopperGtfs.lambda$importPublicTransit$1(GraphHopperGtfs.java:178)
web_1  | 	at java.base/java.util.HashMap.forEach(Unknown Source)
web_1  | 	at java.base/java.util.Collections$UnmodifiableMap.forEach(Unknown Source)
web_1  | 	at com.graphhopper.gtfs.GraphHopperGtfs.importPublicTransit(GraphHopperGtfs.java:172)
web_1  | 	... 18 more
web_1  | Caused by: java.lang.RuntimeException: Can't find a transfer walk route.
web_1  | 	at com.graphhopper.gtfs.GraphHopperGtfs.lambda$getType0TransferWithTimes$4(GraphHopperGtfs.java:267)
web_1  | 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
web_1  | 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
web_1  | 	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
web_1  | 	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
web_1  | 	at java.base/java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.CountedCompleter.exec(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
web_1  | 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Fixed the issue.

I tried bisecting transfers.txt that has 95K lines, and found out that erroneous lines were in the very top, which meant they were very frequent.

I boiled it down to 10 lines that had some errors, and among those found the one that caused the issue. I had a debugging GeoPackage file with stops and another one with transfer lines. Those stops that caused the error were far outside the region where I had OSM data.

Somehow, Graphhopper needs a route between two stops, even though you give it min_transfer_time.

My solution was to not add transfers between the points outside OSM data bounds.

Powered by Discourse