Bug 1061392 - Can't create Java Application using Tomcat7 with existing sources
Summary: Can't create Java Application using Tomcat7 with existing sources
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-04 18:22 UTC by Gaspar Rajoy
Modified: 2015-05-15 00:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 19:11:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1123105 0 high CLOSED binary deployment to JBossEWS application can result in dangling symlinks under jboss/conf/ 2021-02-22 00:41:40 UTC

Internal Links: 1123105

Description Gaspar Rajoy 2014-02-04 18:22:38 UTC
Description of problem:

With the existing sources (https://github.com/gaspo53/twitter-api.git), the creation process cannot commit:

The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 52f12dda4382ec021f00019c -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c4,c335' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255 .Last 10 kB of build output: /techpreview/all/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar Downloading: http://maven.repository.redhat.com/techpreview/all/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar Downloading: http://maven.repository.redhat.com/techpreview/all/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar Downloading: http://maven.repository.redhat.com/techpreview/all/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar Downloading: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.jar Downloading: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/codehaus/plexus/plexus-archiver/1.2/plexus-archiver-1.2.jar Downloading: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar Downloading: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar Downloading: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar 4 KB 8 KB 12 KB 16 KB 20 KB 24 KB 28 KB 32 KB 36 KB 40 KB 44 KB 4 KB 44 KB 4 KB 4 KB 48 KB 4 KB 8 KB 4 KB 48 KB 4 KB 8 KB 8 KB 48 KB 4 KB 4 KB 48 KB 4 KB 12 KB 12 KB 48 KB 8 KB 12 KB 12 KB 48 KB 12 KB 4 KB 12 KB 12 KB 48 KB 12 KB 8 KB 12 KB 12 KB 48 KB 12 KB 12 KB 12 KB 12 KB 48 KB 12 KB 16 KB 12 KB 12 KB 48 KB 12 KB 20 KB 12 KB 12 KB 48 KB 12 KB 4 KB 48 KB 20 KB 12 KB 12 KB 48 KB 16 KB 12 KB 12 KB 48 KB 4 KB 20 KB 12 KB 12 KB 48 KB 20 KB 20 KB 12 KB 12 KB 48 KB 24 KB 20 KB 12 KB 16 KB 48 KB 24 KB 20 KB 12 KB 16 KB 48 KB 28 KB 20 KB 12 KB 20 KB 48 KB 28 KB 20 KB 12 KB 24 KB 48 KB 28 KB 20 KB 12 KB 24 KB 48 KB 32 KB 20 KB 12 KB 24 KB 48 KB 36 KB 20 KB 12 KB 25 KB 48 KB 36 KB 20 KB 12 KB 25 KB 48 KB 40 KB 20 KB 12 KB 25 KB 48 KB 44 KB 20 KB 12 KB 25 KB 48 KB 48 KB 20 KB 12 KB 25 KB 48 KB 50 KB 12 KB 8 KB 48 KB 4 KB 20 KB 16 KB 25 KB 48 KB 50 KB 20 KB 20 KB 25 KB 48 KB 50 KB 20 KB 24 KB 25 KB 48 KB 50 KB 20 KB 28 KB 25 KB 48 KB 50 KB 20 KB 32 KB 25 KB 48 KB 50 KB 20 KB 36 KB 25 KB 52 KB 50 KB 20 KB 36 KB 25 KB 52 KB 50 KB 20 KB 40 KB 25 KB 52 KB 50 KB 20 KB 40 KB 25 KB 56 KB 50 KB 20 KB 44 KB 25 KB 56 KB 50 KB 20 KB 44 KB 25 KB 60 KB 50 KB 20 KB 48 KB 25 KB 60 KB 50 KB 20 KB 48 KB 25 KB 64 KB 50 KB 20 KB 52 KB 25 KB 64 KB 50 KB 20 KB 52 KB 25 KB 68 KB 50 KB 20 KB 56 KB 25 KB 68 KB 50 KB 20 KB 60 KB 25 KB 72 KB 50 KB 20 KB 60 KB 25 KB 72 KB 50 KB 20 KB 60 KB 25 KB 76 KB 50 KB 20 KB 64 KB 25 KB 76 KB 50 KB 20 KB 68 KB 25 KB 76 KB 50 KB 20 KB 68 KB 25 KB 80 KB 50 KB 20 KB 71 KB 25 KB 80 KB 50 KB 20 KB 71 KB 25 KB 84 KB 50 KB 20 KB 71 KB 25 KB 88 KB 50 KB 20 KB 71 KB 25 KB 92 KB 50 KB 20 KB 71 KB 25 KB 96 KB 50 KB 20 KB 71 KB 25 KB 100 KB 50 KB 20 KB 71 KB 25 KB 104 KB 50 KB 20 KB 75 KB 25 KB 104 KB 50 KB 20 KB 79 KB 25 KB 108 KB 50 KB 20 KB 83 KB 25 KB 108 KB 50 KB 20 KB 86 KB 25 KB 108 KB 50 KB 20 KB 75 KB 25 KB 108 KB 50 KB 20 KB 86 KB 25 KB 112 KB 50 KB 20 KB 86 KB 25 KB 116 KB 50 KB 20 KB 86 KB 25 KB 120 KB 50 KB 20 KB 86 KB 25 KB 124 KB 50 KB 20 KB 86 KB 25 KB 128 KB 50 KB 20 KB 90 KB 25 KB 128 KB 50 KB 20 KB 90 KB 25 KB 132 KB 50 KB 20 KB 94 KB 25 KB 132 KB 50 KB 20 KB 94 KB 25 KB 136 KB 50 KB 20 KB 96 KB 25 KB 136 KB 50 KB 20 KB 96 KB 25 KB 140 KB 50 KB 20 KB 96 KB 25 KB 144 KB 50 KB 20 KB 96 KB 25 KB 144 KB 50 KB 20 KB 100 KB 25 KB 144 KB 50 KB 20 KB 104 KB 25 KB 144 KB 50 KB 20 KB 108 KB 25 KB 144 KB 50 KB 20 KB 112 KB 25 KB 144 KB 50 KB 20 KB 116 KB 25 KB 148 KB 50 KB 20 KB 120 KB 25 KB 148 KB 50 KB 20 KB 120 KB 25 KB 148 KB 50 KB 20 KB 112 KB 25 KB 148 KB 50 KB 20 KB 120 KB 25 KB 152 KB 50 KB 20 KB 120 KB 25 KB 156 KB 50 KB 20 KB 120 KB 25 KB 160 KB 50 KB 20 KB 120 KB 25 KB 164 KB 50 KB 20 KB 120 KB 25 KB 168 KB 50 KB 20 KB 120 KB 25 KB 168 KB 50 KB 20 KB 120 KB 25 KB 172 KB 50 KB 20 KB 124 KB 25 KB 172 KB 50 KB 20 KB 124 KB 25 KB 176 KB 50 KB 20 KB 128 KB 25 KB 176 KB 50 KB 20 KB 128 KB 25 KB 178 KB 50 KB 20 KB 132 KB 25 KB 178 KB 50 KB 20 KB 136 KB 25 KB 178 KB 50 KB 20 KB 140 KB 25 KB 178 KB 50 KB 20 KB 141 KB 25 KB 178 KB 50 KB 20 KB 145 KB 25 KB 178 KB 50 KB 20 KB 147 KB 25 KB 178 KB 50 KB 20 KB 151 KB 25 KB 178 KB 50 KB 20 KB 155 KB 25 KB 178 KB 50 KB 20 KB 159 KB 25 KB 178 KB 50 KB 20 KB 163 KB 25 KB 178 KB 50 KB 20 KB 167 KB 25 KB 178 KB 50 KB 20 KB 171 KB 25 KB 178 KB 50 KB 20 KB 175 KB 25 KB 178 KB 50 KB 20 KB 176 KB 25 KB 178 KB 50 KB 20 KB 180 KB 25 KB 178 KB 50 KB 20 KB 184 KB 25 KB 178 KB 50 KB 20 KB 188 KB 25 KB 178 KB 50 KB 20 KB 192 KB 25 KB 178 KB 50 KB 20 KB 196 KB 25 KB 178 KB 50 KB 20 KB 200 KB 25 KB 178 KB 50 KB 20 KB 204 KB 25 KB 178 KB 50 KB 20 KB 204 KB 25 KB 178 KB 50 KB 20 KB 208 KB 25 KB 178 KB 50 KB 20 KB 212 KB 25 KB 178 KB 50 KB 20 KB 216 KB 25 KB 178 KB 50 KB 20 KB 220 KB 25 KB 178 KB 50 KB 20 KB 224 KB 25 KB 178 KB 50 KB 20 KB 228 KB 25 KB 178 KB 50 KB Downloaded: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1.0.1.jar (50 KB at 1129.0 KB/sec) Downloading: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar 20 KB 232 KB 25 KB 178 KB 20 KB 236 KB 25 KB 178 KB Downloaded: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/codehaus/plexus/plexus-archiver/1.2/plexus-archiver-1.2.jar (178 KB at 3778.3 KB/sec) Downloaded: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar (25 KB at 566.8 KB/sec) Downloaded: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.jar (20 KB at 392.5 KB/sec) 240 KB 244 KB 248 KB 252 KB 256 KB 260 KB 264 KB 267 KB 271 KB 275 KB 279 KB 283 KB 287 KB 291 KB 295 KB 295 KB 299 KB 303 KB 307 KB 311 KB 315 KB 319 KB 323 KB 326 KB 330 KB 334 KB 338 KB 342 KB 346 KB 350 KB 354 KB 358 KB 360 KB 360 KB 4 KB 360 KB 8 KB 360 KB 12 KB 360 KB 14 KB 360 KB 18 KB 360 KB 22 KB 360 KB 26 KB 360 KB 30 KB 360 KB 33 KB 364 KB 33 KB 368 KB 33 KB 372 KB 33 KB 376 KB 33 KB 380 KB 33 KB 384 KB 33 KB 388 KB 33 KB 392 KB 33 KB 394 KB 33 KB 398 KB 33 KB 402 KB 33 KB 406 KB 33 KB 410 KB 33 KB 414 KB 33 KB 418 KB 33 KB 422 KB 33 KB Downloaded: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar (33 KB at 1157.2 KB/sec) Downloaded: http://mirror1.ops.rhcloud.com/nexus/content/groups/public/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar (422 KB at 6105.7 KB/sec) [INFO] Packaging webapp [INFO] Assembling webapp [twitter-api] in [/var/lib/openshift/52f12dda4382ec021f00019c/app-root/runtime/repo/target/twitter-api] [INFO] Processing war project [INFO] Copying webapp resources [/var/lib/openshift/52f12dda4382ec021f00019c/app-root/runtime/repo/src/main/webapp] [INFO] Webapp assembled in [1021 msecs] [INFO] Building war: /var/lib/openshift/52f12dda4382ec021f00019c/app-root/runtime/repo/target/twitter-api.war [INFO] WEB-INF/web.xml already added, skipping [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:00.572s [INFO] Finished at: Tue Feb 04 13:16:36 EST 2014 [INFO] Final Memory: 12M/79M [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "openshift" could not be activated because it does not exist. Preparing build for deployment Deployment id is 86a7c1f4 Activating deployment + tmp=/var/lib/openshift/52f12dda4382ec021f00019c/jbossews//tmp + '[' -d /var/lib/openshift/52f12dda4382ec021f00019c/jbossews//tmp ']' + for d in '$tmp/*' + '[' -d '/var/lib/openshift/52f12dda4382ec021f00019c/jbossews//tmp/*' ']' + '[' -d /var/lib/openshift/52f12dda4382ec021f00019c/jbossews//work/ ']' ++ ls /var/lib/openshift/52f12dda4382ec021f00019c/app-root/runtime/repo//webapps + '[' '' ']' Starting jbossews cartridge process failed to start ------------------------- Git Post-Receive Result: failure Activation status: failure Activation failed for the following gears: 52f12dda4382ec021f00019c (Error activating gear: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/52f12dda4382ec021f00019c/jbossews) Deployment completed with status: failure postreceive failed

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ben Parees 2014-02-04 19:26:00 UTC
I believe the issue is that your repository does not include the .openshift template configuration files that would normally exist for a new tomcat application.  

Create a new tomcat application from scratch and copy the .openshift directory/contents from that application's repository into this repository and then this should work properly.

Comment 2 Ben Parees 2014-02-10 14:58:13 UTC
I've made a change that will provide template config files in the case that the sourced application does not provide them.

https://github.com/openshift/origin-server/pull/4694

Comment 3 openshift-github-bot 2014-02-10 17:08:13 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/668291d0b858809eccb926089afb236d35d9d73b
Bug 1061392 - Can't create Java Application using Tomcat7 with existing
sources

https://bugzilla.redhat.com/show_bug.cgi?id=1061392

If the existing source does not include a populated .openshift/config
directory, deployment will fail.

Comment 4 chunchen 2014-02-11 02:57:38 UTC
It's fixed, verified on devenv_4356, please refer to the following results:

1. Create a jbossews-2.0 app with the existing sources (https://github.com/gaspo53/twitter-api.git)
$ rhc app create cews20 jbossews-2.0 --from-code https://github.com/gaspo53/twitter-api.git

2. Make some changes and perform git push
cd cews20;
touch test.txt;
git add . && git commit -amp && git push

[master 4073257] p
 0 files changed
 create mode 100644 test.txt
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 247 bytes, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Stopping jbossews cartridge
remote: Sending SIGTERM to jboss:10813 ...
remote: kill -9 10975
remote: kill -9 10813
remote: Building git ref 'master', commit 4073257
remote: Using Maven mirror /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//usr/versions/shared/configuration/settings.rhcloud.xml
remote: Apache Maven 3.0.3 (r1075437; 2011-06-20 13:22:37-0400)
remote: Maven home: /etc/alternatives/maven-3.0
remote: Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
remote: Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
remote: Default locale: en_US, platform encoding: ANSI_X3.4-1968
remote: OS name: "linux", version: "2.6.32-431.3.1.el6oso.bz844450v4.x86_64", arch: "i386", family: "unix"
remote: Found pom.xml... attempting to build with 'mvn --global-settings /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//usr/versions/shared/configuration/settings.rhcloud.xml clean package -Popenshift -DskipTests'
remote: [INFO] Scanning for projects...
remote: [WARNING] 
remote: [WARNING] Some problems were encountered while building the effective model for com.gaspar.twitter:twitter-api:war:1.0-SNAPSHOT
remote: [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 147, column 12
remote: [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ line 194, column 12
remote: [WARNING] 
remote: [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
remote: [WARNING] 
remote: [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
remote: [WARNING] 
remote: [INFO]                                                                         
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Building SpringMVC Maven Webapp 1.0-SNAPSHOT
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] 
remote: [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ twitter-api ---
remote: [INFO] 
remote: [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ twitter-api ---
remote: [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
remote: [INFO] Copying 12 resources
remote: [INFO] 
remote: [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ twitter-api ---
remote: [WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
remote: [INFO] Compiling 19 source files to /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/target/classes
remote: [INFO] 
remote: [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ twitter-api ---
remote: [WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!
remote: [INFO] skip non existing resourceDirectory /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/src/test/resources
remote: [INFO] 
remote: [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ twitter-api ---
remote: [INFO] No sources to compile
remote: [INFO] 
remote: [INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ twitter-api ---
remote: [INFO] Tests are skipped.
remote: [INFO] 
remote: [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ twitter-api ---
remote: [INFO] Packaging webapp
remote: [INFO] Assembling webapp [twitter-api] in [/var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/target/twitter-api]
remote: [INFO] Processing war project
remote: [INFO] Copying webapp resources [/var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/src/main/webapp]
remote: [INFO] Webapp assembled in [272 msecs]
remote: [INFO] Building war: /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo/target/twitter-api.war
remote: [INFO] WEB-INF/web.xml already added, skipping
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD SUCCESS
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 5.924s
remote: [INFO] Finished at: Mon Feb 10 21:40:21 EST 2014
remote: [INFO] Final Memory: 12M/29M
remote: [INFO] ------------------------------------------------------------------------
remote: [WARNING] The requested profile "openshift" could not be activated because it does not exist.
remote: Preparing build for deployment
remote: Deployment id is 09b08042
remote: Activating deployment
remote: + tmp=/var/lib/openshift/52f98c6eacda611f1500001b/jbossews//tmp
remote: + '[' -d /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//tmp ']'
remote: + for d in '$tmp/*'
remote: + '[' -d '/var/lib/openshift/52f98c6eacda611f1500001b/jbossews//tmp/*' ']'
remote: + '[' -d /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//work/ ']'
remote: + rm -rf /var/lib/openshift/52f98c6eacda611f1500001b/jbossews//work/
remote: ++ ls /var/lib/openshift/52f98c6eacda611f1500001b/app-root/runtime/repo//webapps
remote: + '[' '' ']'
remote: Starting jbossews cartridge
remote: Found 127.1.244.129:8080 listening port
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://52f98c6eacda611f1500001b.rhcloud.com/~/git/cews20.git/
   60eb98c..4073257  master -> master

Comment 5 Gaspar Rajoy 2014-02-11 03:00:47 UTC
Thank you for considering my report.
I'll try it tomorrow morning and tell you how it goes.

Comment 6 Ben Parees 2014-02-11 05:29:08 UTC
Gaspar, this was verified by our internal QE team, the change will not be pushed to OpenShift Online until early next week, based on our normal 3 week release cycle, so you'll want to wait for that.

If you're doing your testing in Origin, then of course you can pull down the fix.


Note You need to log in before you can comment on or make changes to this bug.