Bug 1224170

Summary: [GSS](6.4.z) Running EAP 6 service using standalone-full-ha.xml profile causes fake [FAILED] output
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jyoti Wankhede <jwankhed>
Component: jbossasAssignee: Chao Wang <chaowan>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Kopecky <mkopecky>
Severity: high Docs Contact:
Priority: high    
Version: 6.4.0CC: asaji, bbaranow, bmaxwell, brian.stansberry, cdewolf, chaowan, fnasser, jason.greene, jperkins, pcheung, rhatlapa, sjadhav, tmiyargi
Target Milestone: CR4   
Target Release: EAP 6.4.4   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 10:54:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1235744    

Description Jyoti Wankhede 2015-05-22 09:52:18 UTC
Description of problem:
=======================

When starting JBoss EAP 6.x as a RHEL service with "standalone-full-ha.xml" profile which does not contain the CONSOLE handler in the logging subsystem and throws the following FAILED output even if the JBoss EAP is started successfully. 
-------
[root@jwankhed init.d]# service jboss-as-standalone.sh start
Starting jboss-as: jboss-as failed to startup in the time allotted
                                                           [FAILED]
[root@jwankhed init.d]# 
-------

How reproducible:
=================

It is simply reproducible by starting JBoss EAP 6.4 as a RHEL service with default "standalone-full-ha.xml" profile.


Steps to Reproduce:
===================

1. Configure your JBoss EAP 6 to run as a service in RHEL(I have tested this behaviour in RHEL 6.4).
2. Use the default "standalone-full-ha.xml" profile to start the JBoss EAP as a service using above command.
3. Even if you are getting the above mentioned output try accessing the URL "http://localhost:8080", you will see the JBoss EAP 6 is up and running fine.

Actual results:
===============

JBoss EAP 6 throws the following "[FAILED]" output even if it is started successfully as a service. 
-------
[root@jwankhed init.d]# service jboss-as-standalone.sh start
Starting jboss-as: jboss-as failed to startup in the time allotted
                                                           [FAILED]
[root@jwankhed init.d]# 
-------

Expected results:
=================

Jboss EAP 6 should show the following "[OK]" output if it is started successfully as a service. 
-------
[root@jwankhed jwankhed]# service jboss-as-standalone.sh start
Starting jboss-as:                                         [  OK  ]
-------

Comment 1 Jyoti Wankhede 2015-05-22 10:12:21 UTC
There is simple workaround available to overcome this `FAILED` message i.e. by adding the console handler configuration in `standalone-full-ha.xml` profile under `logging` subsystem like below :
----------------
<subsystem xmlns="urn:jboss:domain:logging:1.2">
      <console-handler name="CONSOLE">
            <level name="INFO"/>
            <formatter>
                <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
            </formatter>
      </console-handler>
----------------

- And then add the handler with that name under `root-logger` as follows:
----------------
   <root-logger>
       <level name="INFO"/>
       <handlers>
             <handler name="CONSOLE"/>
             <handler name="FILE"/>
       </handlers>
   </root-logger>
----------------

Comment 6 James Perkins 2015-06-04 15:01:47 UTC
The message will no longer have the JBAS015874 prefix in EAP 7 anyway. A better fix would be not to read the log output at all as that's rather volatile.

Comment 7 Chao Wang 2015-06-05 05:12:07 UTC
In default. ha or full mode, the log message is more accurate as it directly indicates server start-up success.

Another approach is calling status() function before finishing start(). After that, we can exam its return code. This depends on pid existence. It can always wait a few seconds (e.g. 5 sec) for the process to start, however, if server has heavy deployments and it's still possible to have a fatal error after first 5 seconds before it completes.

Comment 22 Marek Kopecky 2015-09-24 14:29:21 UTC
Standalone EAP 6 service works correctly.

But errors occur during starting of domain EAP 6 service:



$ sudo service jboss-as-domain.sh start
Starting jboss-as: /etc/init.d/jboss-as-domain.sh: line 111: [: : integer expression expected
/etc/init.d/jboss-as-domain.sh: line 111: [: : integer expression expected
...
jboss-as started with errors, please see server log for details
                                                           [  OK  ]

Comment 25 Marek Kopecky 2015-10-02 13:35:49 UTC
Verified on EAP 6.4.4.CP.CR4

Comment 26 Petr Penicka 2017-01-17 10:54:47 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Comment 27 Petr Penicka 2017-01-17 10:55:47 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.