4

When pushing new changes to my OpenShift repository, the application gets well built but cannot get deployed:

Repository ssh://XXX@myapp-mydomain.rhcloud.com/~/git/app.git/

The jbossews cartridge is already stopped
Stopping MongoDB cartridge
Stopping RockMongo cartridge
Waiting for stop to finish
Waiting for stop to finish
Building git ref 'master', commit 9a591e1
Using Maven mirror /var/lib/openshift/XXX/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml
Apache Maven 3.0.4 (r1232336; 2012-12-18 14:36:37-0500)
Maven home: /usr/share/java/apache-maven-3.0.4
Java version: 1.7.0_85, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.32-504.34.1.el6.x86_64", arch: "i386", family: "unix"
Found pom.xml... attempting to build with 'mvn --global-settings /var/lib/openshift/XXX/app-root/runtime/repo//.openshift/config/settings.rhcloud.xml clean package -Popenshift -DskipTests'
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building myapp 1.0.0
[INFO] ------------------------------------------------------------------------
...
... downloading lot of Maven dependencies
...
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 20 source files to /var/lib/openshift/XXX/app-root/runtime/repo/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ myapp ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ myapp ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ myapp ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.6:war (default-war) @ myapp ---
...
... downloading lot of Maven dependencies
...
[INFO] Packaging webapp
[INFO] Assembling webapp [myapp] in [/var/lib/openshift/XXX/app-root/runtime/repo/target/myapp-1.0.0]
[INFO] Processing war project
[INFO] Copying webapp webResources [/var/lib/openshift/XXX/app-root/runtime/repo/src/main/webapp] to [/var/lib/openshift/XXX/app-root/runtime/repo/target/myapp-1.0.0]
[INFO] Copying webapp webResources [/var/lib/openshift/XXX/app-root/runtime/repo/src/main/webapp] to [/var/lib/openshift/XXX/app-root/runtime/repo/target/myapp-1.0.0]
[INFO] Copying webapp resources [/var/lib/openshift/XXX/app-root/runtime/repo/src/main/webapp]
[INFO] Webapp assembled in [4153 msecs]
[INFO] Building war: /var/lib/openshift/XXX/app-root/runtime/repo/webapps/ROOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:03.312s
[INFO] Finished at: Sun Oct 04 13:23:39 EDT 2015
[INFO] Final Memory: 24M/160M
[INFO] ------------------------------------------------------------------------
Preparing build for deployment
Deployment id is 686f0e29
Activating deployment
Starting MongoDB cartridge
Waiting for mongo to start...
Starting RockMongo cartridge
rm: cannot remove `/var/lib/openshift/XXX/jbossews//conf/web.xml': No such file or directory
-------------------------
Git Post-Receive Result: failure
Activation status: failure
Activation failed for the following gears:
XXX (Error activating gear: CLIENT_ERROR: Failed to execute: 'control deploy' for /var/lib/openshift/XXX/jbossews
#<IO:0x00000001230388>
#<IO:0x00000001230310>
)
Deployment completed with status: failure
postreceive failed

Any idea what's happening?

sp00m
  • 47,968
  • 31
  • 142
  • 252

2 Answers2

1

I've created an app with all the cartridges you mentioned and everything works fine to me. However there's a difference: my web.xml configuration file is somewhere else, at src/main/webapp/WEB-INF/web.xml. My bet is that wherever you're calling this you have the wrong path to it, as you can see on:

rm: cannot remove `/var/lib/openshift/XXX/jbossews//conf/web.xml': No such file or directory

FYI, typically, when you get the error Failed to execute: 'control deploy' it means that something in the process of deployment has gone wrong and it stopped, so that error message is not the actual error.

João Gonçalves
  • 3,903
  • 2
  • 22
  • 36
  • It seems that the `//` wasn't the issue finally, since after I manually created an empty file `/var/lib/openshift/XXX/jbossews/conf/web.xml`, the deployment succeeded... Weird enough! Thanks for your time though :) – sp00m Oct 29 '15 at 08:21
0

I manually created an empty file /var/lib/openshift/XXX/jbossews/conf/web.xml, and this solved the issue: the rm command ended successfully, the deployment succeeded.

sp00m
  • 47,968
  • 31
  • 142
  • 252