The zip based install of EAP ships with: bin/init.d/jboss-as-domain.sh bin/init.d/jboss-as-standalone.sh which allows them to be run as services on a RHEL and similar *NIX systems. The scripts use the "/etc/init.d/functions" library which bring "daemon" to start programs. In our case to start the domain/standalone.sh scripts. The intention is that these start in the background, but this fails. Reproduce: - create a new OS user "jbossadm" - unzip EAP in his home directory - copy bin/init.d/jboss-as.conf to /etc/jboss-as/ configure it with: JBOSS_HOME=/home/jbossadm/jboss-eap-6.4 JBOSS_USER=jbossas JBOSS_CONSOLE_LOG=/home/jbossadm/console.log - copy bin/init/jboss-as-domain.sh to /etc/init.d - become su, and start with: /etc/init.d/jboss-as-domain.sh start -run: ps axfo pid,ppid,user,command | grep jboss 2328 1 root /bin/sh /etc/init.d/jboss-as-domain.sh start 2332 2328 root \_ runuser -s /bin/bash jbossadm -c ulimit -S -c 0 >/dev/null 2>&1 ; LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=/var/run/jboss-as/jboss-as-domain.pid /opt/jboss/current/bin/domain.sh --domain-config=domain.xml --host-config=host.xml 2333 2332 jbossadm \_ bash -c ulimit -S -c 0 >/dev/null 2>&1 ; LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=/var/run/jboss-as/jboss-as-domain.pid /opt/jboss/current/bin/domain.sh --domain-config=domain.xml --host-config=host.xml 2334 2333 jbossadm \_ /bin/sh /opt/jboss/current/bin/domain.sh --domain-config=domain.xml --host-config=host.xml 2422 2334 jbossadm \_ /opt/java/current/bin/java -D[Process Controller] -server -Xms64m -Xmx512m […] Expectation: "domain.sh" to become detached and have "1" as its parent. ISSUE: line 94 is currently: daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT --domain-config=$JBOSS_DOMAIN_CONFIG --host-config=$JBOSS_HOST_CONFIG 2>&1 >$JBOSS_CONSOLE_LOG & FIX: should be: daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE "$JBOSS_SCRIPT --domain-config=$JBOSS_DOMAIN_CONFIG --host-config=$JBOSS_HOST_CONFIG &" 2>&1 >$JBOSS_CONSOLE_LOG e.g. the "&" needs to be bundled with the actual script -> so add quotes and move the & insude the quotes. The same is true for the "bin/init.djboss-as-standalone.sh" script: line 90 should become: daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE "$JBOSS_SCRIPT -c $JBOSS_CONFIG &" > $JBOSS_CONSOLE_LOG 2>&1 Also: the same remark is valid for lines 96 respectively line 94 where "su" is used instead of "daemon" if "/etc/init.d/functions" is not available
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
Jiri Pallich <jpallich> updated the status of jira JBEAP-3666 to Closed
Verified with EAP 6.4.13.CP.CR1;
Released with EAP 6.4.13 on Feb 02 2017.