Bug 1175489 - Tomcat server.xml is empty causing SAXParseException upon startup
Summary: Tomcat server.xml is empty causing SAXParseException upon startup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1185453
TreeView+ depends on / blocked
 
Reported: 2014-12-17 20:29 UTC by cparham
Modified: 2015-05-15 00:46 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1185453 (view as bug list)
Environment:
Last Closed: 2015-03-05 19:56:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description cparham 2014-12-17 20:29:05 UTC
Description of problem:
After pushing local changes to OpenShift today, my app is deployed with an empty jbossews/conf/server.xml file. I have not modified this file - it's not empty when I view it locally.

I see this in the tomcat log file:
SEVERE: Parse Fatal Error at line 1 column 1: Premature end of file.
org.xml.sax.SAXParseException; systemId: file:/var/lib/openshift/548dc285e0b8cd77c1000126/jbossews/conf/server.xml; lineNumber: 1; columnNumber: 1; Premature end of file.

(uuid: 548dc285e0b8cd77c1000126)

Version-Release number of selected component (if applicable):
Tomcat 7 (JBoss EWS 2.0)

How reproducible:
Every time I push or trigger a build via Jenkins

Steps to Reproduce:
1. Open Jenkins job (I only have one)
2. Click Build Now
3. Watch console output

Actual results:
Jenkins console:
...
Starting jbossews cartridge
jbossews process failed to start
Error deploying to gear
Build step 'Execute shell' marked build as failure

Expected results:


Additional info:
(uuid: 548dc285e0b8cd77c1000126)

Comment 1 Jakub Hadvig 2014-12-18 12:53:04 UTC
hi cparham,
thank you for reporting this issue, we found the cause and the solution.
We already fixed the issue and your application should be running now.

Thank you,

-Jakub

Comment 2 openshift-github-bot 2014-12-18 20:32:39 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/09aaa38649636a329a5bb89ad7222924a9dc1068
Bug 1175489: Wrong grep regexp in jbossews

Comment 4 chunchen 2014-12-19 10:18:26 UTC
Checked on devenv_5367, it's reproduced for jbossews-1/jbossews-2 when the value of env variables contain *blank* character, but work well for jbossas/jbosseap, please refer to the following test steps:

1. Create a jbossews app with jenkins client
rhc app create cews12 jbossews-1 --enable-jenkins

2. Set an env variables with its value contain *blank* character
rhc env-set OPENSHIFT_TEST=va' 'l"u"e1 -a cews12

3. Check the env variable
$ rhc env-list -a cews12

4. Open Jenkins job and click Build Now

5. Watch console output

Comment 5 Ben Parees 2014-12-22 20:54:36 UTC
Jakub did you see this came back?

Comment 6 openshift-github-bot 2015-01-07 17:39:13 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/ae09d815f459957d969622c10c4103d1a51ddc16
Bug 1175489: Updating sed logic and escaping env vars

Comment 7 chunchen 2015-01-08 02:17:03 UTC
It's fixed, verified on devenv_5381, please refer to the below results:

<---------snip-------->
Downloaded: http://mirror.ops.rhcloud.com/nexus/content/groups/public/org/codehaus/plexus/plexus-archiver/1.2/plexus-archiver-1.2.jar (178 KB at 593.9 KB/sec)
[INFO] Packaging webapp
[INFO] Assembling webapp [cews12] in [/var/lib/openshift/54ae2bd49463915730000051/app-root/runtime/repo/target/cews12]
[INFO] Processing war project
[INFO] Copying webapp resources [/var/lib/openshift/54ae2bd49463915730000051/app-root/runtime/repo/src/main/webapp]
[INFO] Webapp assembled in [86 msecs]
[INFO] Building war: /var/lib/openshift/54ae2bd49463915730000051/app-root/runtime/repo/webapps/ROOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.065s
[INFO] Finished at: Thu Jan 08 02:05:09 EST 2015
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 54ae2b11946391573000000f.rhcloud.com 'gear stop --conditional --exclude-web-proxy --git-ref 0e3b1f83f3c36cfeece75ab531e9734a10e0d026'
Warning: Permanently added 'cews12-cdm.dev.rhcloud.com,10.150.78.224' (RSA) to the list of known hosts.
Stopping gear...
Stopping jbossews cartridge
Sending SIGTERM to jboss:13861 ...
++ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 54ae2b11946391573000000f.rhcloud.com 'gear create-deployment-dir'
Warning: Permanently added 'cews12-cdm.dev.rhcloud.com,10.150.78.224' (RSA) to the list of known hosts.
+ deployment_dir=2015-01-08_02-05-16.142
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/54ae2bd49463915730000051//app-deployments/current/metadata.json 54ae2b11946391573000000f.rhcloud.com:app-deployments/2015-01-08_02-05-16.142/metadata.json
Warning: Permanently added 'cews12-cdm.dev.rhcloud.com,10.150.78.224' (RSA) to the list of known hosts.
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh --exclude .git /var/lib/openshift/54ae2bd49463915730000051/app-root/runtime/repo/ 54ae2b11946391573000000f.rhcloud.com:app-root/runtime/repo/
Warning: Permanently added 'cews12-cdm.dev.rhcloud.com,10.150.78.224' (RSA) to the list of known hosts.
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/54ae2bd49463915730000051/app-root/runtime/build-dependencies/ 54ae2b11946391573000000f.rhcloud.com:app-root/runtime/build-dependencies/
Warning: Permanently added 'cews12-cdm.dev.rhcloud.com,10.150.78.224' (RSA) to the list of known hosts.
+ rsync --delete-after -azS -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/54ae2bd49463915730000051/app-root/runtime/dependencies/ 54ae2b11946391573000000f.rhcloud.com:app-root/runtime/dependencies/
Warning: Permanently added 'cews12-cdm.dev.rhcloud.com,10.150.78.224' (RSA) to the list of known hosts.
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 54ae2b11946391573000000f.rhcloud.com 'gear remotedeploy --deployment-datetime 2015-01-08_02-05-16.142'
Warning: Permanently added 'cews12-cdm.dev.rhcloud.com,10.150.78.224' (RSA) to the list of known hosts.
Preparing build for deployment
Deployment id is 33c18446
Activating deployment
Starting jbossews cartridge
Found 127.1.244.1:8080 listening port
Archiving artifacts
Finished: SUCCESS


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