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 ] -------
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> ----------------
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.
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.
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 ]
Verified on EAP 6.4.4.CP.CR4
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.