Bug 1039860
| Summary: | Server cannot start if server path contains two consecutive spaces | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Tran Trung Thanh <thanhtt> |
| Component: | Server | Assignee: | baranowb <bbaranow> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Svehla <msvehla> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1.0 | CC: | bbaranow, jperkins, kkhan, msvehla, pkremens, trangvh |
| Target Milestone: | DR3 | ||
| Target Release: | EAP 6.4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-08-02 07:30:56 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1053028 | ||
This issue also affects add-user.sh and domain.sh. See: https://bugzilla.redhat.com/show_bug.cgi?id=1053028 Issue is caused because the variables holding directory information (JBOSS_HOME, for example) are only quoted for the resulting java command, but not for bash itself so the consecutive spaces get compressed into one. The solution may be to add unescaped quotes around each of the variables, so that bash passes the directory with the consecutive spaces to the java command. For example, in the add-user.sh script, line 66: eval \"$JAVA\" $JAVA_OPTS \ -jar \"$JBOSS_HOME/jboss-modules.jar\" \ -mp \"${JBOSS_MODULEPATH}\" \ org.jboss.as.domain-add-user \ '"$@"' The variables that contain paths need to be double quoted: eval \""$JAVA"\" $JAVA_OPTS \ -jar \""$JBOSS_HOME"/jboss-modules.jar\" \ -mp \""${JBOSS_MODULEPATH}"\" \ org.jboss.as.domain-add-user \ '"$@"' These changes must be made in the domain.sh and standalone.sh scripts as well. This affects all scripts. Bartosz Baranowski <bbaranow> updated the status of jira WFCORE-93 to Coding In Progress Bartosz Baranowski <bbaranow> updated the status of jira WFLY-3829 to Coding In Progress Verified with EAP 6.4.0.DR3. Thanks |
Description of problem: Server cannot start if server path contains two consecutive spaces How reproducible: Steps to Reproduce: 1.Extract Jboss EAP to a directory which contains two consecutive spaces 2.Start server Actual results: Exception, server cannot start {noformat} ./bin/standalone.sh JAVA_OPTS already set in environment; overriding default settings with values: -Xshare:auto -Xms256m -Xmx4G -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dexo.directory.base=/home/thanhtt/java ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/example/java/jboss-eap/a a JAVA: /home/example/java/jdk1.6/bin/java JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xshare:auto -Xms256m -Xmx4G -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dexo.directory.base=/home/example/java ========================================================================= Unable to access jarfile /home/example/java/jboss-eap/a a/jboss-modules.jar {noformat} Expected results: - Server can start Additional info: