Created attachment 705358 [details] Console output with FileNotFoundException If I move configuration files to external folder and run EAP I can see FileNotFoundException on the output. This was working with EAP6.0.1.GA. move to folder with EAP and run: mkdir config cd config/ JBOSS_CONFIG_DIR=`pwd` cd .. mv jboss-eap-6.1/standalone/configuration/* config/ ./jboss-eap-6.1/bin/standalone.sh -Djboss.server.config.dir=$JBOSS_CONFIG_DIR -Djboss.domain.config.dir argument for domain is working fine,
There is an issue in the standalone.sh script somewhere. This will need an upstream issue as well.
Just some follow up information. The issue seems to be caused by quoting the parameters, https://github.com/jbossas/jboss-as/commit/922d259114e9b6dd9a3c5b5f14471e49d9cc1d8a#L3R27. This was a commit to fix https://issues.jboss.org/browse/AS7-5627.
IMO this needs to be fixed in 6.1. Being able to use -Djboss.server.config.dir is critical functionality.
We need an upstream bug before we can fix this.
The above PR needs to be reviewed by QE. I'll explain what the actual error is. In the standalone.sh script the logging.properties file is passed in with a canonical path. This path is resolved in the script by looping through each JAVA_OPTS option from standalone.conf and each argument passed in from the command line. Since each parameter passed in via the command line is quoted, the case check in the script never finds the -Djboss.server.config.dir property passed in via the command line. This means for this to work the -Djboss.server.config.dir needs to be specified in the standalone.conf. (I'm singling out -Djboss.server.config.dir because it's really the only property regularly used in the script) Going back a bit there was an issue when parameters/properties with spaces in them were being split when passing to the JVM. AS7-5627 attempted to fix this by quoting each parameter passed via the command line. This is likely the right approach in a script, bur led to the issue above. It should also be noted that passing the -Djboss.server.config.dir property only ever worked on Linux. BSD based systems (OS X) and Windows it never worked on. It always looks in $JBOSS_HOME/standalone/configuration for the logging.properties file. Also a directory with a space in it has never worked, probably never spotted as that's rare on Linux. The pull request linked above attempts to fix this issue, but does introduce possible other problems. On Windows it's more common to have spaces in paths. This commit does not address that and does led to some non-obvious error messages if a space is in the path. It also adds behavior for this to work on BSD based systems which previously was not supported. I have tested in Fedora 18, OS X and Windows 7. It does appear to work, but it doesn't work on ANY platform if there is a space in the path. The question is what would be the preference from QE? Merging the pull request fixes the issue for Linux, but also attempts to fix it for BSD and Windows. The later two this never worked on before. The workaround to this issue on Linux would be to add the -Djboss.server.config.dir to the standalone.conf rather than passing in via the command line. If that is an acceptable workaround there is no reason for this PR to be merged.
James, this is not a question for QE. John Doyle should decide, which option is more acceptable from customers point of view. I did some tests and scripts from your PR are working as you said. (I don't have Solaris results yet as there was some maintenance in lab) https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-Scripts/job/eap-6x-scripts-config-dir-change-RHEL/ https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-Scripts/job/eap-6x-scripts-config-dir-change-Win/ I also notice, that this issue is quite same when it comes to special characters in path (see https://issues.jboss.org/browse/JBPAPP-10411 that was for EAP5). If you look at console outputs of runs with '#' and '$' in https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-SmokeTests/job/eap-60-server-startup-standalone-from_specialchar_inpath-RHEL-QE-smoke/ it is a quite same error. I tried to run same job with standalone.sh from PR but result was the same (see https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-Playground/job/eap-60-server-startup-standalone-from_specialchar_inpath-RHEL-QE-smoke-patch-test/)
John, thoughts on the above? I've closed the PR until there is an okay to do this.
I think the PR is a good step forward. Go ahead with it.
James Perkins <jperkins> made a comment on jira AS7-6722 Pull request merged
I am still getting "Unable to read the logging configuration" message when trying this on SunOS machines with ER4. RHEL and Windows are ok. I tried it on Solaris 11.1 X86 with Oracle JDK 1.7.0_07 and Solaris 10 11/06 s10s_u3wos_10 SPARC with Oracle JDK 1.6.0_43, but I get this message for both standalone.sh and domain.sh.
James Perkins <jperkins> updated the status of jira AS7-6722 to Reopened
James Perkins <jperkins> made a comment on jira AS7-6722 Opening to allow for Solaris override.
Hi James, I did some testing today and domain.bat script is broken too. Using -Djboss.domain.base.dir or -Djboss.domain.config.dir will throw "Unable to read logging configuration ..." message. Can you please fix also this. I tested solaris patch from last PR and it's working fine so this should be the last one. Thanks, Petr.
Hello Petr, Did the Windows path have a space in it? That is one limitation on *all* platforms that paths for this cannot have spaces.
Oops, you're correct Petr. I missed it was domain.bat that was broken. I'll get a fix for that right away.
standalone.sh and domain.sh are still broken for Solaris 10 machines. Unfortunately when I tested PR I did it only on Sol 11, but now when run full OS matrix I can see it. Using -Djboss.server.config.dir, -Djboss.server.base.dir, -Djboss.domain.config.dir and -Djboss.domain.base.dir is still throwing "Unable to read the logging configuration... " message. I also find out that -Djboss.domain.log.dir is ignored by domain.sh script. We use both JBOSS_LOG_DIR property and -Djboss.domain.log.dir switch in our tests so I didn't hit it, but now (ER6) when I use -Djboss.domain.log.dir these messages are thrown by domain.sh script before server startup: ./jboss-eap-6.1/bin/domain.sh: bad substitution ./jboss-eap-6.1/bin/domain.sh: darwin: not found and default log location is used even if I specify JBOSS_LOG_DIR property. Using -Djboss.standalone.log.dir will also throw "bad substitution". Server.log is created to intended location, but there is also server.log file in default location (this is original boot.log file) Only Solaris 10 machines are affected by this.
"./jboss-eap-6.1/bin/domain.sh: darwin: not found" message is thrown by domain.sh script everytime on all RHEL and Solaris machines on ER6. This must be fixed.
The "./jboss-eap-6.1/bin/domain.sh: darwin: not found" issue is fixed, but I'm not sure what to do about the Solaris issue. I only have OpenSolaris 11 installed in a VM. I'm downloading OracleSolaris 10 now and I'll see if I can replicate the errors. We'll see if it works in VirtualBox. My initial guess is that maybe "readlink -m" doesn't always return a value on Solaris 10.
Solaris 11 contains readlink command. [hudson@dev21-01 ~]$ which readlink /usr/bin/readlink Solaris 10 does NOT contain readlink command. Workaround is to use GNU coreutils - command greadlink, but we can't rely on tha fact it's installed on every Solaris 10 system. [hudson@dev20-01 ~]$ which greadlink /opt/csw/bin/greadlink code from https://github.com/sstephenson/ruby-build/pull/9/files resolve_link() { $(type -p greadlink readlink | head -1) $1 } ... path="$(resolve_link "$name" || true)" Suggestion: For Solaris we should limit readlink invocation only to Solaris 11 and maybe document workaround for Solaris 10 - define JBOSS_LOG_DIR variable. This was needed for all Solaris and Windows platforms in EAP 6.0.0 and EAP 6.0.1.
Uname for Solaris 10: --------------------- [hudson@dev20-01 ~]$ uname -a SunOS dev20-01.mw.lab.eng.bos.redhat.com 5.10 Generic_142910-17 i86pc i386 i86pc [hudson@dev20-01 ~]$ uname -v Generic_142910-17 [hudson@dev20-01 ~]$ uname -r 5.10 Uname for Solaris 11: --------------------- [hudson@dev21-01 ~]$ uname -a SunOS dev21-01 5.11 11.0 i86pc i386 i86pc [hudson@dev21-01 ~]$ uname -v 11.0 [hudson@dev21-01 ~]$ uname -r 5.11 Maybe code for darwin could be used for Solaris 10.
I tried that it doesn't work either. It doesn't like the ${p#*=} bit. I'm trying to figure out how to handle that on Solaris 10 then we could test on Solaris 11.
OK, just reminder - if you won't find solution for Solaris 10, please limit readlink invocation only to Solaris 11 and Linux.
Pull request updated with fix for Solaris in domain and standalone.
Thanks James.
Neither "darwin: not found" nor "bad substitution" message is thrown any more. We also got rid of "Unable to read the logging configuration" messege (system variable is needed for Solaris machines, like in example from description). Verified on EAP 6.1.0 ER7.
Details inside vpn: https://post-office.corp.redhat.com/mailman/private/eap-pm-list/2013-July/msg00105.html