ODOT-PTS / TNExT

a web-based software tool developed for the visualization, analysis, and reporting of regional and statewide transit networks in the state of Oregon
16 stars 4 forks source link

Most of the reports in the tool return empty tables #69

Closed PPaulsonOregonDOT closed 7 years ago

PPaulsonOregonDOT commented 7 years ago

I went into the tool late yesterday and today, and all of the reports (with the exception of the Transit Agencies Report at http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/AgenSReport.html?&dbindex=9&popYear=2010), are returning empty tables or not completing. This issue had occurred with a few reports prior to last week (see issue #66) as far as I can tell, but appears to have developed significantly since i ran my last set of tests on the tool last week.

ed-g commented 7 years ago

Ok I don't know what might have changed. I've restarted the server in case something got "stuck".

ed-g commented 7 years ago

That report references may 2017, is that the db you want to be using?

Can you link to a report which does not work but which used to?

PPaulsonOregonDOT commented 7 years ago

Generally I've been working out of the September 2017 database: These don't complete: http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoStateSreport.html?&dbindex=10&popYear=2010 This one is clear in both production and and development 10/26 3:30pm

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoUAreasRReport.html?&popMin=0&popMax=2000000&dbindex=10&popYear=2010 Clear in production and development, had to reload them once 10/26 3:43pm

These get to about 10%, and then appear to time out: http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/HubSreport.html?&x1=0.08&x2=0.25&x3=2.0&n=jqr&dbindex=10&popYear=2010 Clear, but slower than usual in production and development 10/26 3:48

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/KeyHubSreport.html?&x1=0.08&x2=0.25&x3=2.0&n=jqr&dbindex=10&popYear=2010 Clear in production and development 10/26 3:46pm

These complete, but show empty tables. http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoCountiesReport.html?&dbindex=10&popYear=2010 Clear in both production and development 10/26 3:50pm

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoPlacesReport.html?&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoCongDistsReport.html?&dbindex=10&popYear=2010 Clear in both production and development 10/26 3:50pm

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoCongDistsReport.html?&dbindex=10&popYear=2010 Clear in both production and development 10/26 3:51pm

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoRegionsReport.html?&dbindex=10&popYear=2010 Clear in both production and development 10/26 3:53pm

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/ConNetSReport.html?&gap=0.1&dbindex=10&popYear=2010 Clear in both production and development 10/26 3:53pm

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/ConAgenSReport.html?&gap=0.1&dbindex=10&popYear=2010 Clear in both production and development 10/26/17 4:05pm

I went into the admin console a couple of times to try to troubleshoot the ssh issue(but didn't change any of the settings), and it's possible that i broke/turned something off, but this seems unlikely, because the errors have cascaded through the databases, I'm seeing similar behavior in the reports using May 2017 and April 2017

ed-g commented 7 years ago

I'm going to keep an updated list here as I work through reports.

Generally I've been working out of the September 2017 database: These don't complete: http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoStateSreport.html?&dbindex=10&popYear=2010 This report clears in both production and development This report works for me as of Oct 25th.

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoUAreasRReport.html?&popMin=0&popMax=2000000&dbindex=10&popYear=2010

Based on browser dev console. There is 500 error from this url:

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/queries/transit/GeoURSR?&upop=NaN&key=0.11034188897544905&dbindex=10&popYear=2010&username=admin&popMax=2000000&popMin=0

Looks like it can't find the database config file for some reason. Strange.

org.hibernate.HibernateException: com/model/database/connections/spatial/september17.cfg.xml not found org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170) org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:2146) org.hibernate.cfg.Configuration.configure(Configuration.java:2127) [...] note The full stack trace of the root cause is available in the Apache Tomcat/7.0.76 logs.

UPDATE: somehow the tna tool is still trying to lookup database credentials from the source directory rather than from /etc/tnatool.

These get to about 10%, and then appear to time out: http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/HubSreport.html?&x1=0.08&x2=0.25&x3=2.0&n=jqr&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/KeyHubSreport.html?&x1=0.08&x2=0.25&x3=2.0&n=jqr&dbindex=10&popYear=2010

These complete, but show empty tables. http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoCountiesReport.html?&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoPlacesReport.html?&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoCongDistsReport.html?&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoCongDistsReport.html?&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/GeoRegionsReport.html?&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/ConNetSReport.html?&gap=0.1&dbindex=10&popYear=2010 http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/ConAgenSReport.html?&gap=0.1&dbindex=10&popYear=2010

I went into the admin console a couple of times to try to troubleshoot the ssh issue(but didn't change any of the settings), and it's possible that i broke/turned something off, but this seems unlikely, because the errors have cascaded through the databases, I'm seeing similar behavior in the reports using May 2017 and April 2017

ed-g commented 7 years ago

[root@tna TNAST_MAVEN]# ag winter16 TNAtoolAPI-Webapp/src/

TNAtoolAPI-Webapp/src/main/resources/com/model/database/connections/spatial/winter16.cfg.xml
17:     <property name="connection.url">jdbc:postgresql:/localhost:5432/winter16</property>
ed-g commented 7 years ago

Missing / in the xml file. should be jdbc:postgresql://localhost:5432/winter16

ed-g commented 7 years ago

hack hack hack. link all configuration files from /etc into the tna source code directory.

[tnatool@tna connections]$ cd /home/tnatool/src/TNAST_MAVEN/TNAtoolAPI-Webapp/src/main/resources/com/model/database/connections/transit
[tnatool@tna transit]$ rm *.xml; ln -s /etc/tnatool/com/model/database/connections/transit/*.xml .

[tnatool@tna connections]$ cd /home/tnatool/src/TNAST_MAVEN/TNAtoolAPI-Webapp/src/main/resources/com/model/database/connections/spatial
[tnatool@tna spatial]$ rm *.xml; ln -s /etc/tnatool/com/model/database/connections/spatial/*.xml .

TODO: either fix the source code, or add this scripting step to the build script.

ed-g commented 7 years ago

Ok the missing xml file is now solved by the symlinks. However hibernate complains about some possibly non-threadsafe locking.

http://tna.trilliumtransit.com/TNAtoolAPI-Webapp/queries/transit/GeoURSR?&upop=NaN&key=0.06360874349482426&dbindex=10&popYear=2010&username=admin&popMax=2000000&popMin=0

org.hibernate.AssertionFailure: possible non-threadsafe access to the session org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:123) org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982) org.hibernate.loader.Loader.doQuery(Loader.java:857) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) org.hibernate.loader.Loader.doList(Loader.java:2533) org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) org.hibernate.loader.Loader.list(Loader.java:2271) org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452) org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363) org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)

PPaulsonOregonDOT commented 7 years ago

The production version of the tool appears to have resolved, checking the development version now. Is there any testing i can do to help resolve any of the issues mentioned above?

ed-g commented 7 years ago

@PPaulsonOregonDOT I'm still seeing errors in some URLs -- just uploaded a small fix to reduce progress bar check interval so that I can run firefox developer view without my browser slowing to a crawl.

Yes if you could mark in your original list, the one at the top of this page. And edit to show which URLs are working and whether you tested development or production, and the date/time of the test. Or maybe we should convert this into a grid and we can each test independently and add new columns as necessary.

ed-g commented 7 years ago

Ok looks like that threadsafe error appears intermittently, as I suppose those kind of errors do.

ed-g commented 7 years ago

Now this api is giving an error: http://tna.trilliumtransit.com:8080/TNAtoolAPI-Webapp/queries/transit/GeoURSR?&upop=NaN&key=0.2645149248761235&dbindex=10&popYear=2010&username=admin&popMax=2000000&popMin=0

UPDATE: I restarted postgres and tomcat and now it works fine. Must be some kind of race condition somewhere? Or if one thing happens that will interfere with this query working at a later date.

type Exception report

message

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.NullPointerException org.hibernate.engine.ActionQueue.areTablesToUpdated(ActionQueue.java:249) org.hibernate.engine.ActionQueue.areTablesToBeUpdated(ActionQueue.java:229) org.hibernate.event.def.DefaultAutoFlushEventListener.flushIsReallyNeeded(DefaultAutoFlushEventListener.java:87) org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:60) org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185) org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261) org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) com.model.database.queries.EventManager.geturbansbypopbet(EventManager.java:318) com.webapp.api.Queries.getGURSR(Queries.java:2528) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ObjectOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:237) com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70) com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279) com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86) com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74) com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347) com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279) com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229) com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219) com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419) com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.76 logs.

PPaulsonOregonDOT commented 7 years ago

Done. They all worked correctly, but I'm going to continue to test the reports beneath them to make sure the whole app is stable.