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

Admin interface breaks depending on "ordering" of databases in dbInfo.csv #59

Closed ed-g closed 7 years ago

ed-g commented 7 years ago

http://tna.trilliumtransit.com:8080/TNAtoolAPI-Webapp/admin

It was working before we restored the databases.

Can you trial and error to see if you can get it working again.

ed-g commented 7 years ago

This is the full log.

==> /var/log/tomcat/catalina.out <==

Sep 14 19:06:53 li257-210.members.linode.com tomcat[459]: Loading configuration directory from property edu.oregonstate.tnatool.ConfigurationDirectory: /etc/tnatool, or falling back to getProtectionDomain().getCodeSource().getLocation().getPath() + ../../src/main/resources/ /var/lib/tomcat/webapps/ROOT/WEB-INF/classes/com/model/database/Databases.class

==> /var/log/tomcat/localhost.2017-09-14.log <==

Sep 14, 2017 7:07:51 PM org.apache.catalina.core.ApplicationDispatcher doForward FINE: Disabling the response for further output

ed-g commented 7 years ago

By the way you can see this via tail -f /var/log/tomcat/*

ed-g commented 7 years ago

We're also getting this log message, could be related.

==> /var/log/tomcat/localhost.2017-09-14.log <==

Sep 14, 2017 7:10:35 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [Queries] in context with path [] threw exception [Servlet execution threw an exception] with root cause java.lang.NoClassDefFoundError: Could not initialize class com.webapp.api.Queries at sun.reflect.GeneratedConstructorAccessor82.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.sun.jersey.server.spi.component.ResourceComponentConstructor._construct(ResourceComponentConstructor.java:193) at com.sun.jersey.server.spi.component.ResourceComponentConstructor.construct(ResourceComponentConstructor.java:182) at com.sun.jersey.server.impl.resource.PerRequestFactory$PerRequest._getInstance(PerRequestFactory.java:182) at com.sun.jersey.server.impl.resource.PerRequestFactory$AbstractPerRequest.getInstance(PerRequestFactory.java:144) at com.sun.jersey.server.impl.application.WebApplicationContext.getResource(WebApplicationContext.java:225) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:69) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

Sep 14, 2017 7:10:36 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [Queries] in context with path [] threw exception [Servlet execution threw an exception] with root cause java.lang.NoClassDefFoundError: Could not initialize class com.webapp.api.Queries at sun.reflect.GeneratedConstructorAccessor82.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.sun.jersey.server.spi.component.ResourceComponentConstructor._construct(ResourceComponentConstructor.java:193) at com.sun.jersey.server.spi.component.ResourceComponentConstructor.construct(ResourceComponentConstructor.java:182) at com.sun.jersey.server.impl.resource.PerRequestFactory$PerRequest._getInstance(PerRequestFactory.java:182) at com.sun.jersey.server.impl.resource.PerRequestFactory$AbstractPerRequest.getInstance(PerRequestFactory.java:144) at com.sun.jersey.server.impl.application.WebApplicationContext.getResource(WebApplicationContext.java:225) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:69) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1347) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1279) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1219) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:419) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

ed-g commented 7 years ago

@BenFields724 @srinivas13794 any ideas?

ed-g commented 7 years ago

Now the admin interface loads but doesn't show any databases. Did either of you change anything?

http://tna.trilliumtransit.com:8080/TNAtoolAPI-Webapp/admin

screenshot from 2017-09-14 12-22-32

srinivas13794 commented 7 years ago

We repackaged and re-ran the install.sh file

On Thu, Sep 14, 2017 at 12:23 PM, Ed Groth notifications@github.com wrote:

Now the admin interface loads but doesn't show any databases. Did either of you change anything?

http://tna.trilliumtransit.com:8080/TNAtoolAPI-Webapp/admin

[image: screenshot from 2017-09-14 12-22-32] https://user-images.githubusercontent.com/2495118/30451027-76363978-9947-11e7-9a45-3e1d7fb16716.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pouyalireza/TNAST_MAVEN/issues/59#issuecomment-329583555, or mute the thread https://github.com/notifications/unsubscribe-auth/ARcwCKD0vSAZtJ66woy1SrrM9AtRBsE0ks5siX0ggaJpZM4PYCls .

BenFields22 commented 7 years ago

@ed-g We included all the config files and updated dbinfo. My guess is that one of the connections is bad.

ed-g commented 7 years ago

Ok can you binary search.

Remove half the connections, see if it breaks, if not try the other half. Recurse.

ed-g commented 7 years ago

I believe that the xml files are only loaded on demand. So you shouldn't need to remove them to test. Only the dbInfo.csv will need to change.

BenFields22 commented 7 years ago

@ed-g I went back to the old Dbinfo file with the two databases and it is all loading again. We will try to find what connection is causing the error.

ed-g commented 7 years ago

I've added a script RESTART-TOMCAT.sh which you can use to force a web server restart. Same location as the other scripts.

ed-g commented 7 years ago

You might want to run that after each dbInfo modification.

BenFields22 commented 7 years ago

@ed-g I also noticed that you still have the old dbinfo file in the old location. Is this still referenced or is only the one in etc/ used?

ed-g commented 7 years ago

Only the one in /etc/ should be used.

ed-g commented 7 years ago

It's possible that some code somewhere is trying to use the version under the source directory -- it's a bit of a rats nest. I'll make a symlink from there to the version in etc for the time being.

ed-g commented 7 years ago

I'm seeing all 9 databases now. Are you folks seeing that as well?

ed-g commented 7 years ago

@srinivas13794 @BenFields724

This looks fixed to me?

Thanks for all your help with this!

BenFields22 commented 7 years ago

@ed-g Yes we were able to get all databases uploaded onto the server, but in a different order which seems strange. After all 9 databases worked we tried to go back to the original with a different ordering and it crashed. Not sure why this would be happening.

ed-g commented 7 years ago

Can you upload the working file as dbInfo.csv.working.csv and broken file as dbInfo.csv.correct-order-but-broken.csv

ed-g commented 7 years ago

To the directory under /etc next to dbInfo.csv

ed-g commented 7 years ago

Just for clarification.

When you say "in a different order" are you referring to the id numbers 0,1,2,...8 or to their display order in the admin page, or to something else?

BenFields22 commented 7 years ago

@ed-g I will upload the file that was not working, but after rearranging to the correct order with the file that was working it appears to be fine now. All databases are loaded in the right order and names. Seems this is fixed.

ed-g commented 7 years ago

Ordering shouldn't matter, so if it does that means there's a bug in the software.

Can you please explain what you mean by "correct order".

srinivas13794 commented 7 years ago

By correct order we meant Chronological order of databases.

On Thu, Sep 14, 2017 at 1:48 PM, Ed Groth notifications@github.com wrote:

Ordering shouldn't matter, so if it does that means there's a bug in the software.

Can you please explain what you mean by "correct order".

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pouyalireza/TNAST_MAVEN/issues/59#issuecomment-329604698, or mute the thread https://github.com/notifications/unsubscribe-auth/ARcwCDvgHrfXOpzlVY-rkXy4QM5A1OyBks5siZEngaJpZM4PYCls .

ed-g commented 7 years ago

I don't see the broken file. Where did you put it.

ed-g commented 7 years ago

@BenFields724 @srinivas13794

I really appreciate all your help and I'm glad we're working on this project together. For the most part I'm really happy with your work.

But there has been a number of times where I've asked for something simple and had to repeat myself multiple times. This wastes my time and throws us off schedule.

When I ask for something specific like a file copied to a particular place, or comments posted to a particular location with a particular format, I need you to follow directions exactly. Or ask for clarification.

Thanks and again I don't mean to be harsh, I know you're both trying hard and doing the best job you can. I think a lot of this is just the difference between developing in an academic environment versus industry. It's something we've all had to learn.

ed-g commented 7 years ago

I'll bet this is related to #61

srinivas13794 commented 7 years ago

@ed-g Ben and I have been in and out of various meetings today and haven't been able to respond to your requests earlier because of this .During the process of debugging and uploading the many versions of the Dbinfo.csv to your server we have misplaced the broken version of the Dbinfo.csv file and are trying to find it.This has caused the delay in uploading the file.We do understand your concerns and trying our best adapt to your workflow so we are able to complete all the tasks in a timely manner.

ed-g commented 7 years ago

@srinivas13794 @BenFields724

That's totally understandable.

Next time if something like this happens, it's OK to say that the file got misplaced. That closes the loop with communication to me, so I know to stop waiting for the file to show up to run more tests. At that point we can just make a new plan.

And you're absolutely right, I have been asking you to adapt to a work flow that I'm familiar with and is brand new to you. That's an adjustment for both of us and takes time to get used to.

ed-g commented 7 years ago

I think this was simply due to typos in other xml configuration files.