Kunagi problems on OpenShift tomcat7

Hello Kunagi dev team,

Thanksgiving and stuff:

At work I've installed Kunagi into one of our Tomcat servers when our team needed a scrum tool for project management and we found this software really fascinating and amazing! There are some glitches sometimes, but basically I found this the best too ever for doing scrum so I must thank you for all the time that went from your side into developing the great app. Because of it's greatness I decided to use it for my projects with my friends too (but not at work and I don't have an own JEE container for this to install it) so I tried to give Kunagi a try on Openshift with a Tomcat 7 (JBoss EWS 2.0) "gear". And it not worked.

The problem:

  • I've downloaded the latest (0.26) war.
  • Copy that to my openshift access with a Tomcat 7 (JBoss EWS 2.0)
  • Copy the war into the install dir
  • Tried to fire up app at tomcat-prenex.rhcloud.com/kunagi

No success, but exception:

HTTP Status 500 - StartServlet.init(ServletConfig) failed.
type Exception report
message StartServlet.init(ServletConfig) failed.
description The server encountered an internal error that prevented it from fulfilling this request.

exception
javax.servlet.ServletException: StartServlet.init(ServletConfig) failed.
  ilarkesto.webapp.AServlet.init(AServlet.java:102)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  java.lang.Thread.run(Thread.java:744)
root cause

java.lang.NullPointerException
  java.io.File.<init>(File.java:277)
  ilarkesto.webapp.Servlet.getContextPath(Servlet.java:170)
  ilarkesto.webapp.Servlet.getContextPath(Servlet.java:163)
  scrum.server.ScrumWebApplication.get(ScrumWebApplication.java:387)
  scrum.server.common.StartServlet.onPreInit(StartServlet.java:80)
  ilarkesto.webapp.AServlet.init(AServlet.java:96)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  java.lang.Thread.run(Thread.java:744)

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

Additional information:

  • I don't really know openshift btw, so I don't know if this is your fault or theirs :-(
  • I got to know that openshift uses some port forwarding: it makes your apps accessible on standard port 80 and forwards that to something else (in this case 8080). Can this cause problems?
  • I don't exactly know if the directory we are in when we start the software is writable to us or not: I tried to determine it by addig some logs to openshift startup scripts but that's not a sure solution. I think not this is the source of teh problem, but who knows - anyways I always had problems to change the kunagi-data directory by hand and we are just changed it's position in work by changing tomcat's start dir even back then...
  • I'll try starting up kunagi with a normal JBoss gear on openshift

Best regards,
prenex

Statement from Kunagi Team

Make sure that the WAR unpacks correctly. For a suggested solution on OpenShift, see the comments.

Status

Issue is closed.

Comments

Thu, Jun 26, 2014, 10:20 by Witek (SM,T)

The exception indecates that your application server returns null when ServletContext.getRealPath() is called. I'm not sure, but perhaps dis happens, when the .war web application archive is not extracted. Please check for options in your server to activate extracting .war files.

Mon, Mar 30, 2015, 22:23 by Christopher Voltz

I got the same error when I tried to deploy to OpenShift. I applied this patch to set unpackWARs to true to get it working:

diff --git a/.openshift/config/server.xml b/.openshift/config/server.xml
index 70f0514..727be57 100755
--- a/.openshift/config/server.xml
+++ b/.openshift/config/server.xml
@@ -124,7 +124,7 @@
       </Realm>
 
       <Host name="localhost"  appBase="webapps"
-            unpackWARs="false" autoDeploy="true">
+            unpackWARs="true" autoDeploy="true">
 
         <!-- SingleSignOn valve, share authentication between web applications
              Documentation at: /docs/config/valve.html -->

Tue, Mar 31, 2015, 20:23 by prenex

I had to extract the war file and make a minor change to the manifest and it works now! It is great!

Sun, Apr 5, 2015, 15:54 by artjom (PO,T)

Thanks a lot for returning with a solution.

Post a comment



optional
optional