Bug 1305444

Summary: Standalone/domain server base directory is not exported correctly by standalone.sh/domain.sh
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: IntegrationAssignee: Alex Szczuczko <aszczucz>
Status: CLOSED NOTABUG QA Contact: Juraj Duráni <jdurani>
Severity: high Docs Contact:
Priority: medium    
Version: 6.3.0CC: aszczucz, drieden, jolee, mbaluch, thauser, vhalbert
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-27 07:10:01 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:
Bug Depends On: 1340823    
Bug Blocks:    

Description Juraj Duráni 2016-02-08 09:39:04 UTC
Recommended way how to run EAP/JDV is to create a copy of JBOSS_HOME/standalone or JBOSS_HOME/domain directory and then execute standalone.sh/domain.sh against those directories, e.g.:
>>> # path is relative to JBOSS_HOME
>>> ./domain.sh -Djboss.domain.base.dir=domain_master
>>> ./standalone.sh -Djboss.server.base.dir=standalone_prod

If scripts standalone.sh/domain.sh are executed outside JBOSS_HOME dir with related options, then server throws FileNotFoundException.
Setting flag 'blocker' to ? regardless there is a workaround (execute standalone.sh/domain.sh from JBOSS_HOME dir), because this affect even executing scripts from 'bin directory:
>>> cd  ${JBOSS_HOME}
>>> cd bin
>>> ./domain.sh -Djboss.domain.base.dir=tmp_domain

*********Domain*********

[jdurani@dhcp-10-40-5-120 dv_6.3.0]$ ./jboss-eap-6.4/bin/domain.sh -Djboss.domain.base.dir=tmp_domain
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/jdurani/redhat/data-virtualization/dv_6.3.0/jboss-eap-6.4

  JAVA: /usr/java/default/bin/java

  JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true

=========================================================================

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Unable to read the logging configuration from 'file:/home/jdurani/redhat/data-virtualization/dv_6.3.0/tmp_domain/configuration/logging.properties' (java.io.FileNotFoundException: /home/jdurani/redhat/data-virtualization/dv_6.3.0/tmp_domain/configuration/logging.properties (Adresár alebo súbor neexistuje))
...
...

*********Standalone*********
[jdurani@dhcp-10-40-5-120 dv_6.3.0]$ ./jboss-eap-6.4/bin/standalone.sh -Djboss.server.base.dir=tmp_stanadlone
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/jdurani/redhat/data-virtualization/dv_6.3.0/jboss-eap-6.4

  JAVA: /usr/java/default/bin/java

  JAVA_OPTS:  -server -XX:+UseCompressedOops -verbose:gc -Xloggc:"/home/jdurani/redhat/data-virtualization/dv_6.3.0/tmp_stanadlone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n

=========================================================================

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Listening for transport dt_socket at address: 8787
Unable to read the logging configuration from 'file:/home/jdurani/redhat/data-virtualization/dv_6.3.0/tmp_stanadlone/configuration/logging.properties' (java.io.FileNotFoundException: /home/jdurani/redhat/data-virtualization/dv_6.3.0/tmp_stanadlone/configuration/logging.properties (Adresár alebo súbor neexistuje))
java.lang.IllegalStateException: JBAS018701: Configuration directory does not exist: tmp_stanadlone/configuration
	at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:387)
	at org.jboss.as.server.Main.determineEnvironment(Main.java:265)
	at org.jboss.as.server.Main.main(Main.java:93)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.jboss.modules.Module.run(Module.java:312)
	at org.jboss.modules.Main.main(Main.java:473)

Comment 1 Alex Szczuczko 2016-02-17 10:20:04 UTC
It doesn't look like it's failing to access DV-specific files. Is this a DV bug or an EAP bug?

The domain.sh/standalone.sh in DV are not modified from their EAP versions.

Comment 2 Juraj Duráni 2016-02-17 10:40:48 UTC
I suppose that this is an EAP bug.

Comment 6 Juraj Duráni 2016-06-27 07:10:01 UTC
The path to base dir should be either absolute, or relative to current directory. Closing this as NOTABUG.