0

I'm trying to deploy my Grails app to OpenShift by this guide: https://developers.openshift.com/en/tomcat-deployment-options.html

I'm using the Grails 3.0.9 and I've added this string to build.groovy depencies

provided "org.springframework.boot:spring-boot-starter-tomcat"

to disable embedding Tomcat in a .war file.

I've created the JBoss EWS 2.0 app, cloned the repo on my local machine, deleted the folder /src and pom.xml file. Then I've added my ROOT.war file to /webapps folder. Pushed it.

Log is here:

    Nov 24, 2015 8:34:24 AM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Nov 24, 2015 8:34:24 AM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Nov 24, 2015 8:34:25 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: :/usr/java/packages/lib/i386:/lib:/usr/lib
Nov 24, 2015 8:34:25 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.3.128.1-8080"]
Nov 24, 2015 8:34:25 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1006 ms
Nov 24, 2015 8:34:25 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 24, 2015 8:34:25 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Nov 24, 2015 8:34:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/openshift/565466f62d52712f4a0000db/app-root/runtime/dependencies/jbossews/webapps/ROOT.war
Nov 24, 2015 8:34:28 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/565466f62d52712f4a0000db/app-root/runtime/dependencies/jbossews/webapps/ROOT.war has finished in 2,454 msNov 24, 2015 8:34:28 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.3.128.1-8080"]
Nov 24, 2015 8:34:28 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2657 ms
Nov 24, 2015 8:42:26 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-127.3.128.1-8080"]
Nov 24, 2015 8:42:26 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Nov 24, 2015 8:42:26 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-127.3.128.1-8080"]
Nov 24, 2015 8:42:26 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-127.3.128.1-8080"]
Nov 24, 2015 8:42:32 AM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Nov 24, 2015 8:42:32 AM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Nov 24, 2015 8:42:32 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: :/usr/java/packages/lib/i386:/lib:/usr/lib
Nov 24, 2015 8:42:33 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.3.128.1-8080"]
Nov 24, 2015 8:42:33 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1599 ms

But when I'm going to http://jbossews-themirrortruth.rhcloud.com/ it says 404 error. Also I've tried to change

<Host name="localhost"  appBase="webapps"
            unpackWARs="false" autoDeploy="true">

to

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

in %local repo%/.openshift/config/server.xml but it also hasn't effect. Add a .java8 mark to %local repo%/.openshift/markers also take no effect.

UPDATE

On JBoss EWS 1.0 same problem

On WildFly 10 same also

It's look like I've builded the wrong .war in Grails

edDatNewb
  • 63
  • 1
  • 9
Oink Oink
  • 1
  • 5
  • Using the Grails version 2.5.2 solved my problem, but question still opened because unknown why it don't deploying by the latest version of Grails 3.0.9 – Oink Oink Nov 24 '15 at 16:50
  • Seems like a grails 3+ issue. My understanding is that it was a significant upgrade. I added grails to the tags – edDatNewb Nov 24 '15 at 17:15
  • Problem is solved if push .jar file instead of .war. But in this case access to app is working only by the IP address with port 8080 not the domain name. Still open. – Oink Oink Nov 24 '15 at 18:44

2 Answers2

2

The solution was the JDK you complied your WAR file with, with Tomcat 7 JBoss WES 2.0 I initially complied my WAR file with JDK 8. You will find this if you Right Click on the project in Netbeans -> Select Properties -> In properties Select Sources and the Change the binary to JDK 7. Re complie and Re upload. It should work cause this worked for me.

0

Raised issue on grails https://github.com/grails/grails-core/issues/9463. hopefully will get some answer. I guess its something to do with tomcat native libs

Satish
  • 61
  • 4