Bug 1468085

Summary: [GSS] (6.4.z) useless "/" is logged when EAP is started as a service
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Masanobu Hatanaka <mhatanak>
Component: jbossasAssignee: Peter Palaga <ppalaga>
Status: CLOSED EOL QA Contact: Peter Mackay <pmackay>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4.7CC: fnasser, jason.greene, ppalaga
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:45:47 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:

Description Masanobu Hatanaka 2017-07-06 02:12:11 UTC
Description of problem:

The following  "/" is logged when EAP is started as a service.
----------------------
 7月 05 15:38:44 dhcp-221-186.gsslab.nrt.redhat.com systemd[1]: Starting SYSV: JBoss AS Standalone...
 7月 05 15:38:44 dhcp-221-186.gsslab.nrt.redhat.com jboss-as-standalone.sh[28004]: Starting jboss-as: /  **********HERE
----------------------

This should be removed since this is meaningless and would make the customers confused.


Version-Release number of selected component (if applicable):

EAP 6.4.7 and later

This comes from bundled init script in the following line.

$JBOSS_HOME/bin/init.d/jboss-as-standalone.sh 
----------------------
  if [ ! -z "$JBOSS_USER" ]; then
    if [ -r /etc/rc.d/init.d/functions ]; then
      cd $JBOSS_HOME
      daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE $JBOSS_SCRIPT -c $JBOSS_CONFIG > $JBOSS_CONSOLE_LOG 2>&1 &
      cd -
----------------------

$JBOSS_HOME/bin/init.d/jboss-as-domain.sh
----------------------
  if [ ! -z "$JBOSS_USER" ]; then
    if [ -r /etc/rc.d/init.d/functions ]; then
      cd $JBOSS_HOME
      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 &
      cd -
----------------------



How reproducible:
We can have init script under $EAPHOME/bin/init.d/

Steps to Reproduce:
1.add a service to run EAP
2.start EAP as a service
3.after starting EAP, check the logged message


Actual results:

The line "Starting jboss-as: / " is logged.

Expected results:
This line is not necessary. If the comment out line 95 "cd -" in init script,
This legged message is disappeared. Or modify to redirect "/dev/null", 
this could be a workaround.


Additional info:
This behavior seems to be harmless but I believe this kind of meaningless message
should be logged. Also this part of init script can be found in EAP7 so please fix it in the future release.

Comment 2 Peter Palaga 2017-07-11 13:04:12 UTC
The init scripts in current WildFly [1] use cd - >/dev/null 2>&1

Let me backport it to 6.4 and 7.0.

[1] https://github.com/wildfly/wildfly-core/blob/5c7f955d39e172e77dce323db02cd77864a51c2d/core-feature-pack/src/main/resources/content/docs/contrib/scripts/init.d/wildfly-init-redhat.sh#L154

Comment 3 Peter Palaga 2017-07-11 13:19:27 UTC
PR sent https://github.com/jbossas/jboss-eap/pull/3034