GithubHelp home page GithubHelp logo

conveyal / analysis-backend Goto Github PK

View Code? Open in Web Editor NEW
23.0 5.0 12.0 11.42 MB

Server component of Conveyal Analysis

Home Page: http://conveyal.com/analysis

License: MIT License

Java 97.07% JavaScript 2.36% Python 0.17% HTML 0.20% CSS 0.19%
transportation analysis

analysis-backend's Introduction

Conveyal Analysis Backend

This repository is deprecated. It has been merged into Conveyal's main routing component R5.

Development of the Conveyal Analysis backend is continuing in the r5 repository, and existing issues are being migrated there. Please create any new issues or pull requests against that repository.

analysis-backend's People

Contributors

abyrd avatar ansoncfit avatar evansiroky avatar landonreed avatar mattwigway avatar trevorgerhardt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

analysis-backend's Issues

Cannot download opportunity grid as a tiff

Downloading an opportunity dataset as a .grid works on both staging and production.

Downloading as a .tiff works on staging, but not production. Possibly an s3 configuration issue.

17:09:00.828 [qtp1350004360-18] INFO  com.conveyal.taui.AnalysisServer - GET /api/opportunities/1d284e5b-e6e8-454a-8f78-d1bc37dfeecd/Jobs_total/tiff
17:09:00.873 [qtp1350004360-18] ERROR com.conveyal.taui.AnalysisServer - Server exception thrown, type: RUNTIME, message: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: AA5E214FFA427BC1)
17:09:00.873 [qtp1350004360-18] ERROR com.conveyal.taui.AnalysisServer - com.amazonaws.services.s3.model.AmazonS3Exception: Forbidden (Service: Amazon S3; Status Code: 403; Error Code: 403 Forbidden; Request ID: AA5E214FFA427BC1), S3 Extended Request ID: I1ohEU+LLn9Wd9Ffg8MqdA12AeIMCPUuu4HVok/gjToT0GQ9523RyJvJM4/N4dh9jL9Cy6hyvcE=
        at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1378)
        at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:924)
        at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:702)
        at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:454)
        at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:416)
        at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:365)
        at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3995)
        at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:1160)
        at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:1135)
        at com.amazonaws.services.s3.AmazonS3Client.doesObjectExist(AmazonS3Client.java:1195)
        at com.conveyal.taui.controllers.OpportunityDatasetsController.downloadOpportunityDataset(OpportunityDatasetsController.java:283)
        at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
        at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
        at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Thread.java:748)

Adjust speed modification fails

15:02:56.780 [qtp848938970-16] ERROR com.conveyal.taui.AnalysisServer - java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
        at com.conveyal.taui.models.AdjustSpeed.lambda$toR5$1(AdjustSpeed.java:39)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.conveyal.taui.models.AdjustSpeed.toR5(AdjustSpeed.java:40)
        at com.conveyal.taui.models.AdjustSpeed.toR5(AdjustSpeed.java:9)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.conveyal.taui.models.AnalysisRequest.modificationsForProject(AnalysisRequest.java:70)
        at com.conveyal.taui.models.AnalysisRequest.populateTask(AnalysisRequest.java:83)
        at com.conveyal.taui.controllers.SinglePointAnalysisController.analysis(SinglePointAnalysisController.java:43)
        at spark.RouteImpl$1.handle(RouteImpl.java:58)
        at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
        at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Thread.java:748)

Broker/frontend hang sometimes

Sometimes I don't get results from the backend, and I see in the logs from the worker "Writing output to broker took 61s". The number changes but in normal operation it's about 3s but sometimes goes as high as 60-70s, causing the frontend to time out and crash.

This doesn't appear to be a broker issue, I can hit the API with curl until the cows come home with no issues.

I suspect one of two things:

a) the thread pool is too small on the frontend, and that's causing deadlocks
b) there's an issue with the Unirest http library

Allow non-rectangular OSM data

OSM data for a rectangle around the Netherlands is about 1.3GB, and that gets loaded into MapDBs that are even bigger. There's a lot of OSM data in the Netherlands itslef, but there's a ton of extraneous OSM data here because a rectangle around the country includes all of Flanders and Brussels, as well as the German cities of Bonn, Cologne, and Dusseldorf. That uses up more space for storage and processing, and makes the router data much bigger than it needs to be.

Fetching all the OSM inside a rectangle only works in some places. In this case it would be really convenient to just upload a PDF extract for the Netherlands only.

Report more information for exceptions

The information sent back to the UI appears to be minimal. For example, when MapDB encounters a corrupted database, it throws an exception, which then triggers an exception higher up the stack. All we see in the UI is the result of a toString on the outermost exception, which is just the name of the class with no stack trace or cause information. I'd say we want to return the entire stack trace.

Theoretically this is a security risk, but I think the advantages outweigh the risks.

Destination "opportunity dataset" / dataSource not visible

When I upload a shapefile of destination data, there is a field called "opportunity dataset". My assumption is that this is a name I attach to the data set. Once the file is uploaded, I can see the string I supplied in the "opportunity dataset" field within the project description JSON as "dataSource": {dataSource: "INWABP", name: "INW2014", key: "INW2014_INWABP"}

However, in the Analysis interface (e.g. single point analysis), only the field names like INW2014 appear. It was not obvious at all that these new destination categories came from the file I just uploaded.

Exception when attempting to run analysis

Reportedly this exception occured after removing all the stops.

The error shown was only the array index that failed. So there is some initial error reporting improvement that should occur outside of just fixing the cause of the exception.

12:19:01.989 [qtp8384315-16] ERROR com.conveyal.taui.AnalysisServer - RUNTIME 106 -> POST /api/analysis
12:19:01.989 [qtp8384315-16] ERROR com.conveyal.taui.AnalysisServer - java.lang.ArrayIndexOutOfBoundsException: 106
        at com.conveyal.taui.models.AbstractTimetable.toBaseR5Timetable(AbstractTimetable.java:58)
        at com.conveyal.taui.models.AddTripPattern$Timetable.toR5(AddTripPattern.java:35)
        at com.conveyal.taui.models.AddTripPattern.lambda$toR5$0(AddTripPattern.java:52)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.conveyal.taui.models.AddTripPattern.toR5(AddTripPattern.java:52)
        at com.conveyal.taui.models.AddTripPattern.toR5(AddTripPattern.java:11)

Segment selection on adjust speed modification broken

When trying to run an analysis with an adjust speed modification, the following error occurs:

15:30:42.188 [qtp1474936738-14] ERROR com.conveyal.taui.AnalysisServer - java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
        at com.conveyal.taui.models.AdjustSpeed.lambda$toR5$1(AdjustSpeed.java:39)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.conveyal.taui.models.AdjustSpeed.toR5(AdjustSpeed.java:40)
        at com.conveyal.taui.models.AdjustSpeed.toR5(AdjustSpeed.java:9)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.conveyal.taui.models.AnalysisRequest.modificationsForProject(AnalysisRequest.java:70)
        at com.conveyal.taui.models.AnalysisRequest.populateTask(AnalysisRequest.java:83)
        at com.conveyal.taui.controllers.SinglePointAnalysisController.analysis(SinglePointAnalysisController.java:43)
        at spark.RouteImpl$1.handle(RouteImpl.java:58)
        at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
        at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Thread.java:748)

Travis build does not copy JAR to S3 on Pull Request branches

There are conditional clauses in the travis-ci configuration that intentionally skip uploading JARs for pull requests. This prevents us from testing out pull requests on staging. I would like to understand why such an exception was ever introduced before removing it.

Multi-byte characters corrupted in JSON POST payload

If you create a scenario that has a multibyte character in it (e.g. French รฉ in a modification description field) and start a single point analysis, the analysis-ui will send the request to the back end with the header content-type:application/json;charset=UTF-8 and a seemingly clean JSON body containing a properly encoded character. However the broker throws an exception and complains:

[grizzly-nio-kernel(1) SelectorRunner] INFO com.conveyal.r5.analyst.broker.BrokerHttpHandler - Error processing JSON from client
com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0x22
 at [Source: org.glassfish.grizzly.http.server.NIOInputStreamImpl@6ca3d7bd; line: 1, column: 33207]
...
at com.conveyal.r5.analyst.broker.BrokerHttpHandler.service(BrokerHttpHandler.java:152)

The column mentioned in the error will contain the รฉ character.

Error parsing timestamp when updating upload status

13:47:49.287 [qtp558836738-170] ERROR com.conveyal.taui.AnalysisServer - java.time.format.DateTimeParseException: Text 'Mon Dec 11 13:46:25 UTC 2017' could not be parsed at index 0
        at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
        at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
        at java.time.LocalDateTime.parse(LocalDateTime.java:492)
        at java.time.LocalDateTime.parse(LocalDateTime.java:477)
        at com.conveyal.taui.controllers.OpportunityDatasetsController.lambda$addStatusAndRemoveOldStatuses$0(OpportunityDatasetsController.java:68)
        at java.util.ArrayList.removeIf(ArrayList.java:1405)
        at com.conveyal.taui.controllers.OpportunityDatasetsController.addStatusAndRemoveOldStatuses(OpportunityDatasetsController.java:68)
        at com.conveyal.taui.controllers.OpportunityDatasetsController.createOpportunityDataset(OpportunityDatasetsController.java:115)
        at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
        at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
        at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Thread.java:748)

Accessing front-end no package.json

I am confused as to how to get Analyst working, specifically how to access the front-end and get npm start to work as there is no package.json file in the directory.

So far I have done the following:

  1. Created an Auth0 client
  2. Installed MongoDB on my PC
  3. Created the application.conf file with the following settings
AUTH0_CLIENT_ID: myId
AUTH0_CLIENT_SECRET: mySecret
MONGOLAB_URI: mongodb://localhost:27017
BUNDLE_BUCKET: myS3Bucket

Whenever I start Analyst.jar it repeatedly connects then disconnects form my mongodb with the following error message SSL handshake received but server is started without SSL support

If i remove the Mongo URI from the configuration settings it seems to connect to the db correctly.

Regardless of if the db is connected or not, when I try to access Analyst in the browser at http://localhost:7070/, the Auth0 login client seems to point to Conveyal's and not my own specified in the configuration settings. Am I missing something here? Should I be starting Scenario Editor at this point?

Read Timed Out

We're seeing another kind of read timeout when contacting the broker:

java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:171)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
        at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
        at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:282)
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
        at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
        at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
        at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:165)
        at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
        at com.conveyal.taui.controllers.SinglePointAnalysisController.analysis(SinglePointAnalysisController.java:54)
        at spark.RouteImpl$1.handle(RouteImpl.java:58)
        at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
        at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Thread.java:748)

This seems to happen after the worker handling single point requests hits an exception while handling the single point task. From then on, the worker still gets requests and seems to process them normally, but the front end gets the above error waiting for the response.

This will probably be solved by eliminating the broker as a separate process contacted by HTTP.

BUILD FAILURE (Building analyst 0.1-SNAPSHOT)

Hi,

I tried to mvn package via IntelliJ IDEA and also via command line and unfortunately, i keep getting this failure message.
Already tried to delete everything from .m2 file and start over, but unfortunately, the error keeps appearing over and over again.

Best
Hesham

usr/lib/jvm/java-8-oracle/bin/java "-Dmaven.multiModuleProjectDirectory=/home/admin1/analyst_project (copy)/analyst" -Dmaven.home=/opt/intellij-idea-community/plugins/maven/lib/maven3 -Dclassworlds.conf=/opt/intellij-idea-community/plugins/maven/lib/maven3/bin/m2.conf -Didea.launcher.port=7533 -Didea.launcher.bin.path=/opt/intellij-idea-community/bin -Dfile.encoding=UTF-8 -classpath /opt/intellij-idea-community/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar:/opt/intellij-idea-community/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.3.4 package
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.conveyal:analyst:jar:0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 12, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building analyst 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
..
.
.
.
.
.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:01 min
[INFO] Finished at: 2017-03-07T19:49:15+01:00
[INFO] Final Memory: 16M/180M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project analyst: Could not resolve dependencies for project com.conveyal:analyst:jar:0.1-SNAPSHOT: Failed to collect dependencies at com.conveyal.data.census:seamless-census:jar:1.0-SNAPSHOT -> com.amazonaws:aws-java-sdk:jar:1.10.16 -> com.amazonaws:aws-java-sdk-cloudsearch:jar:1.10.16: Failed to read artifact descriptor for com.amazonaws:aws-java-sdk-cloudsearch:jar:1.10.16: Could not transfer artifact com.amazonaws:aws-java-sdk-cloudsearch:pom:1.10.16 from/to central (https://repo.maven.apache.org/maven2): /home/admin1/.m2/repository/com/amazonaws/aws-java-sdk-cloudsearch/1.10.16/aws-java-sdk-cloudsearch-1.10.16.pom.part (No such file or directory) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Process finished with exit code 1

Reuse the same OSM for all GTFS in a project

Currently each GTFS feed (bundle) has its own OSM file. Each Analyst project should have one OSM file shared among all its transit feeds. This prevents us from accidentally changing the street network when we really want to compare different transit scenarios. It also avoids unnecessary downloads.

There would need to be a "refresh OSM" button to fetch new OSM when needed.

Regional jobs stuck halfway through

Marco started a large full Netherlands regional job with over 2 million origins. The job never completed, or at least the UI shows it stuck at 54%. I started 100 workers to attempt to finish it, and those workers processed tasks for a few minutes before they ran out and shut down.

The broker monitoring API shows that there are no jobs with any remaining tasks. The UI still shows progress on the job stuck at 54%. The analyst backend process (not the broker) is spiking at full use of 1 CPU core.

 http://code.google.com/p/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL
19212 ter-94e32a0.jar 2655m 13653m  123m   n/a 22.42%  1.28% O8U14 ec2-user   57
26100 m.jvmtop.JvmTop   64m 6816m   17m   n/a  1.46%  0.00% O8U14 ec2-user   18
19213 -3-gfdeb1f6.jar 9577m 13653m   52m   n/a  0.24%  0.00% O8U14 ec2-user   19
$ jps -mlv
19212 analyst-master-94e32a0.jar -Xmx15G
19213 v2.4.0-3-gfdeb1f6.jar broker broker.conf -Xmx15G

Profiling output for all methods occurring more than 3%:

 JvmTop 0.8.0 alpha - 08:19:24,  amd64,  4 cpus, Linux 4.9.32-15, load avg 0.31
 http://code.google.com/p/jvmtop

 Profiling PID 19212:               analyst-master-94e32a0.jar

  12.24% (     5.08s) org.bson.io.OutputBuffer.writeCString()
   9.52% (     3.95s) de.undercouch.bson4jackson.io.CountingInputStream.read()
   8.00% (     3.32s) ...undercouch.bson4jackson.io.LittleEndianInputStream.re()
   6.98% (     2.90s) ...undercouch.bson4jackson.io.StaticBufferedInputStream.()
   5.14% (     2.13s) com.mongodb.connection.ByteBufferBsonOutput.pipe()
   4.97% (     2.06s) org.bson.BsonBinaryWriter.backpatchSize()
   4.95% (     2.05s) org.bson.BsonBinaryWriter.writeCurrentName()
   4.76% (     1.98s) org.bson.codecs.configuration.ChildCodecRegistry.get()
   4.43% (     1.84s) org.bson.io.ByteBufferBsonInput.readCString()

Eliminate Broker

The broker should be merged into the backend. In practice they're always running on the same machine. Having a separate broker means that when enqueueing a million objects, we have 1M objects on the backend, then 1M JSON objects in a request, then 1M Java objects in the broker, which is totally unnecessary use of memory and computation.

There is also a lot of fidgety piping of streams of data through the broker, which would probably be a lot more stable and maintainable if it was happening in Java instead of Java<->HTTP<->Java<->HTTP<->Java.

Update MongoDB Driver to 3.8+

The new MongoDB driver has added additional support for remote connecting to a database which would appear to allow us to use MongoDB's Atlas and Compass to automate hosting and backup of our staging and production databases and get a slick UI for managing our production db.

Also, one less reason to ssh into production.

It appears possible to update to v3.8.2 with minimal changes.

Fetch exception (NPE) while trying to create a scenario

I just uploaded a new GTFS feed to analysis.conveyal.com. After seeing in the logs that it had ingested the entire GTFS feed and uploaded the resulting files to S3, I created a new scenario and tried to specify that it would use this new GTFS bundle. Immediately the UI displays "fetch error" with no further details, and this log entry is seen in the backend log file:

07:16:47.513 [qtp2028328816-6899] INFO  graphql.execution.ExecutionStrategy - Exception while fetching data
java.lang.NullPointerException: null
	at com.conveyal.taui.controllers.GraphQLController.fetchFeeds(GraphQLController.java:146) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.ExecutionStrategy.resolveField(ExecutionStrategy.java:41) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:18) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.ExecutionStrategy.completeValue(ExecutionStrategy.java:89) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.ExecutionStrategy.completeValueForList(ExecutionStrategy.java:128) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.ExecutionStrategy.completeValueForList(ExecutionStrategy.java:97) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.ExecutionStrategy.completeValue(ExecutionStrategy.java:62) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.ExecutionStrategy.resolveField(ExecutionStrategy.java:47) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:18) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.Execution.executeOperation(Execution.java:60) [analyst-master-94e32a0.jar:1.1]
	at graphql.execution.Execution.execute(Execution.java:33) [analyst-master-94e32a0.jar:1.1]
	at graphql.GraphQL.execute(GraphQL.java:78) [analyst-master-94e32a0.jar:1.1]
	at com.conveyal.taui.controllers.GraphQLController.handleQuery(GraphQLController.java:54) [analyst-master-94e32a0.jar:1.1]
	at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47) ~[analyst-master-94e32a0.jar:1.1]
	at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162) ~[analyst-master-94e32a0.jar:1.1]
	at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.server.Server.handle(Server.java:517) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654) ~[analyst-master-94e32a0.jar:1.1]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572) ~[analyst-master-94e32a0.jar:1.1]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_141]

Shuffle requests before enqueuing them

When doing a regional analysis, we should shuffle the requests before we enqueue them. This way time remaining estimates will be more accurate. In areas with more transit service, computation times are longer, and origins in these areas are perforce clustered. If we randomize the order of the requests, we won't have trouble with systematic trends in computation time, so we can easily extrapolate time remaining in the UI.

Cached GTFS becomes unusable randomly...but why?

Loading GTFS (using gtfs-api) from cache can sometimes throw an error due to it's inability to load the data. I haven't hunted down the root cause of this.

Problems

Workaround

For the time being if you wipe the cache directories of their .db and .db.p files it appears to force a rebuild that will cause a delay but allow you to continue working for the time being.

Next steps

  1. Better error reporting to help track down the root of the problem and prevent it in the future.
  2. Investigate the discrepancy between v1.3.1 and v1.4.0 and update the analysis-backend to use v1.4.0 if possible.

Enqueueing regional jobs uses too much memory

On 21 July someone enqueued 18 regional jobs at once on analysis.conveyal.com and the system lost track of which jobs existed, and stopped processing all of them. Examining the logs reveals that the analysis-backend ran out of memory in RegionalAnalysisManager where it was enqueueing the tasks.

The failure is inside the method enqueue (RegionalAnalysis regionalAnalysis). For each of these regional analyses, we have about 350k tasks. Each of those tasks exists as a java object, and all those objects are serialized at once into a byte buffer, which the HTTP layer then turns into a String to send to the broker. The broker will then deserialize the received copy of this string into 350k more Java objects. So at the moment when the job's being enqueued, each of 350k tasks exists as two objects and three serialized copies of those objects. We could easily be at 1GB of memory per regional analysis, so it's no wonder this failed as the 6th analysis was enqueued.

The simple solution is to enqueue in small batches, as we used to do in the past. There's even a TODO comment in the code saying to do this ("cluster" the tasks).

The more disruptive solution is to not use an HTTP API to enqueue tasks into the broker. We could just run the broker in the same JVM as the backend and inject the task objects directly. No serialization, no multiple copies of the tasks. We would have to consider how to enqueue static-site regional jobs if the broker was not a separate process with an HTTP enqueueing endpoint.

Build graphs on backend server rather than workers

Currently we use a lazy-load strategy for just about everything from TransportNetworks to displaying regional analysis results. This contributes to the sense that rather than updating the user on progress, the UI just hangs the first time you do anything. If we just processed new data sets and built graphs directly on the backend server it would be a lot easier to provide status updates to the end user. It's unlikely 10 people would build new graphs at exactly the same time and we'd put all the tasks in a queue anyway to make sure we didn't overload the system.

Destination shapefile upload fails silently

If you upload a zipped shapefile the backend fails without even printing a log entry. There is no clue at all what happened via the front end or the back end.

Maybe we should also support zipped shapefiles. Although I did just run into an unusual zip file that used some newer version of the PKZip spec and could not be unzipped on a Mac or by QGIS.

Login to analysis backend

how do I login after application is successfully deployed.
Can you also specify the steps to create user and password for login

image

Regional jobs progress slow to appear

When you start a regional job, after several minutes the UI still shows 0% progress. During this time the backend seems to be pegged at 100% CPU (1 core). Eventually the progress jumps significantly, in one recent case by 3000 tasks at once, and CPU use falls. I wonder what that initial lag and CPU spike is from.

Looking at the results SQS queue, there is a steady increase in oldest message age from 0 to 5 minutes over the course of 10 minutes.

Oh, I bet this is another EBS IOPS cap problem. The results writer creates a 1.5GB temp file and writes it full of zeros. I'm not sure we need to initialize to zero (at least on Linux I think empty files are all references to a single block of zeros). And that initial write operation would throttle all subsequent writes.

Single point analysis fails after worker shuts down

If a worker is running for a particular graph and is shut down, then the broker still considers it alive for a certain duration. If a request is issued that should be satisfied by that worker during that period, the broker will not start a new worker to handle the request and it will fail.

Re-enabling transit modes results in error

To reproduce:

  1. request all transit
  2. request with no transit
  3. request with any transit --> error box: "No enum constant com.conveyal.r5.api.util.TransitModes."

I think this was recently looked at with:
047e8a8

Move Opportunity Datasets into their own collection

An array in a region is limiting. Let's migrate them into their own collection.

Another thing we should fit into this refactor is to stop automatically downloading Census data for places in the United States. We should make it so that it can be downloaded and created on demand.

Our S3 bill is over $100/month already ๐Ÿ˜ฎ

Give EC2 instances a name when launched

Currently the name field of EC2 instances started up by the broker is empty, so I end up labeling them something like "auto-started analyst-preview worker". We should just specify this name when we start them up.

Timeout loading comparison of regional analyses

22:58:36.749 [qtp1849220539-182] INFO  c.c.t.c.RegionalAnalysisController - Probability surface for 5a40be02896fd04bd8f5539e -> 5a415ede896fd04bd8f553c3 not found, building it
22:59:17.152 [qtp1849220539-182] ERROR com.conveyal.taui.AnalysisServer - RUNTIME Unable to execute HTTP request: Timeout waiting for connection from pool -> GET /api/regional/5a40be02896fd04bd8f5539e/5a415ede896fd04bd8f553c3/grid by [email protected] of arc-prod
22:59:17.152 [qtp1849220539-182] ERROR com.conveyal.taui.AnalysisServer - com.amazonaws.AmazonClientException: Unable to execute HTTP request: Timeout waiting for connection from pool
        at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:714)
        at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:454)
        at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:416)
        at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:365)
        at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3995)
        at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1291)
        at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1166)
        at com.conveyal.r5.analyst.BootstrapPercentileMethodHypothesisTestGridReducer.computeImprovementProbability(BootstrapPercentileMethodHypothesisTestGridReducer.java:55)
        at com.conveyal.taui.controllers.RegionalAnalysisController.getProbabilitySurface(RegionalAnalysisController.java:141)
        at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
        at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)
        at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:292)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:269)
        at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.amazonaws.http.conn.ClientConnectionRequestFactory$Handler.invoke(ClientConnectionRequestFactory.java:70)
        at com.amazonaws.http.conn.$Proxy22.get(Unknown Source)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:191)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
        at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72)
        at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:859)
        at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:702)
        ... 25 more

Better templating for worker startup script

@landonreed and I just spent quite a long time debugging the code on the analysis broker that substitutes values into a startup shell script and passes it on to the worker machines.

This is because we've got variable replacement going on in Java, then in the shell where the script is run on the worker, and both Java MessageFormat and the shell have special meanings for quotes and curly braces.

We might want to just do String.replaceAll("X", variable) for clarity and maintainability.

signal to reset server

Often the broker gets into a bad state and we need to restart it. Often this bad state seems to consist of nothing more than HTTP connections stuck open or a bad cache of information on which workers are handling single point requests etc.

Many daemon processes respond to SIGHUP by reloading config files and resetting to a known state. Similarly we could respond to SIGHUP by restarting the HTTP layer and flushing out any problem-prone state.

We'd want to implement this once we've merged the broker into the backend making one big process.

Backend does not handle patterns in remove-trip modifications

The dev version of the UI allows the selection of patterns to remove (https://github.com/conveyal/analysis-ui/blob/da466b67075451883b3f6eabb3b6d3572ccda186/lib/utils/convert-to-r5-modification/remove-trips.js)

But the backend isn't ready to handle them (see https://github.com/conveyal/analysis-backend/blob/master/src/main/java/com/conveyal/taui/models/RemoveTrips.java)

This leads to errors on the back-end such as:

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "patterns" (class com.conveyal.taui.models.RemoveTrips), not marked as ignorable (10 known properties: "showOnMap", "expanded", "routes", "id", "description", "variants", "scenario", "name", "feed", "trips"])
 at [Source: {"type":"remove-trips","id":"d8f9816f-a67a-42e0-a011-25eb606bb113","showOnMap":true,"expanded":false,"variants":[true,true,true,true],"scenario":"d399f7a1-7b65-4d31-a577-06b9811886da","description":null,"name":"Remove extra Newburyport/Rockport trips","feed":"MBTA","routes":["CR-Newburyport"],"trips":["CR-Weekday-Aug14th-17-NR-100"],"patterns":["03068262-5829-4873-b846-b0c0c78b32ca"]}; line: 1, column: 348] (through reference chain: com.conveyal.taui.models.RemoveTrips["patterns"])
        at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:836) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1045) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1352) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1330) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:262) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:159) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:134) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:122) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:93) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:131) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:42) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3702) ~[analyst-master-bf00b18.jar:1.1]
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2714) ~[analyst-master-bf00b18.jar:1.1]
        at com.conveyal.taui.controllers.ModificationController.createOrUpdate(ModificationController.java:36) ~[analyst-master-bf00b18.jar:1.1]

which are handled in the UI with the message "Error parsing modification JSON from client"

Server error not properly displayed

When I'm doing a single point analysis, something is failing somewhere on the backend. The frontend has sent a request to https://analysis.conveyal.com/api/analysis/enqueue/single with a complete request payload, but the backend eventually responds with an HTTP response code 500 and the raw text message Could not contact broker but with the header content-type:application/json;charset=UTF-8.

The client then throws up the white lock window with the message Fetch Error Unexpected token C in JSON at position 0.

Log user & project context

We should have some way to log which project and user is generating each log message. As it is, they are all piled together in the logs and we can't tell who or what is causing problems.

Networks not rebuilt when updating project coverage

If you change the geographic area of a project, Analysis will re-download new OSM to cover the new area. However, the existing OSM data and the derived transport network file will remain on S3 and on the Analysis server, so the new OSM data will not be taken into account in analysis results.

Additional question: what if you have uploaded a new arbitrary OSM feed via the project settings? Does it rebuild the network? Does changing the project extents cause new OSM data to be downloaded automatically, overwriting the custom OSM?

Perhaps there should just be a button for auto-downloading OSM for the selected area.

Processing certain shapefiles fails silently

When uploading certain shapefiles (that are not in EPSG:4236) the shapefile processing fails totally silently - not even a log message. We can see that the file was uploaded and detected as a shapefile, but then no other messages are produced, and the contents of the shapefile never appear in the grids list.

Every task in regional analysis has its own copy of the same scenario

When we put a regional analysis into the broker, we enqueue millions of separate tasks. Each of these tasks ends up with its own separate copy of the scenario, which can quickly take up tens of gigabytes of memory.

We have issues #38 and #58 that are long term fixes for this. The longer term plan is to just store only one template task per job. But we need a shorter term solution.

Note that ProfileRequest, which is the base class for AnalysisTask, which is the base class for RegionalTask, has the following fields:

    /** A non-destructive scenario to apply when executing this request */
    public Scenario scenario;

    /**
     * The ID of a scenario stored in S3 as JSON.
     * You must specify one (but only one) of scenario or scenarioId.
     * It is an error if both scenario and the scenarioId are specified.
     */
    public String scenarioId;

For regional jobs we don't want to include an entire scenario, just the ID of the scenario, and the workers will fetch the scenario by ID from S3. However, in RegionalAnalysisManager where we are creating a list of tasks for a job and enqueueing them, I can see in a debugger that both scenario and scenarioId are set, contrary to the comments on those fields.

Assuming the broker and workers are still able to deal with tasks that contain a scenarioId instead of a scenario, the mistake here is cloning the original request in the RegionalAnalysis that has the full scenario instead of the one that's been modified to contain a scenarioId.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.