2015-10-04 88 views
4

将新更改推送到OpenShift存储库时,应用程序已经完好构建但无法部署:无法在OpenShift上部署我的应用程序:“无法执行:'控制部署'/ var/lib/openshift/XXX/jbossews”

Repository ssh://[email protected]/~/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:0x000000> 
#<IO:0x000000> 
) 
Deployment completed with status: failure 
postreceive failed 

任何想法发生了什么?

回答

0

我手动创建了一个空文件/var/lib/openshift/XXX/jbossews/conf/web.xml,这就解决了这个问题:rm命令成功结束,部署成功。

1

我用你提到的所有墨盒创建了一个应用程序,并且一切正常。但是有一个区别:我的web.xml配置文件是在其他地方,在src/main/webapp/WEB-INF/web.xml。我敢打赌,只要你拨打这个你走错了路吧,因为你可以看到:

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

仅供参考,通常情况下,当你的错误Failed to execute: 'control deploy'这意味着什么部署的过程出错了,它停止了,所以错误信息不是实际的错误。

+0

看来'//'最终不是问题,因为在我手动创建一个空文件'/ var/lib/openshift/XXX/jbossews/conf/web.xml'后,部署成功了。很奇怪!感谢您的时间,虽然:) – sp00m

相关问题