On 06/09/2015 09:59 PM, Chao Wang wrote:
Hi all,
The Wildfly start-up as service scripts wildfly-init-redhat.sh and
wildfly-init-debian.sh currently depend on a grep action of key
message 'WFLYSRV0025:' in console log to determinate whether service
start is successful. The log message indication is accurate, however,
it's not that robust since user can always remove console handler from
logging subsystem. I have opened a WFCORE enhancement jira
https://issues.jboss.org/browse/WFCORE-747 for it.
For the moment, I have tried three options, they're all not that
perfect to implement
1. Stay with exact log message, users need to define their jboss log
directory such as $JBOSS_HOME/standalone/log/server.log for standalone
and $JBOSS_HOME/domain/log/host-controller.log for domain instead of
searching in console log. This is more like another workaround since
it is also volatile once we update log message in future release.(EAP
has 'JBAS015874:')
2. Use service pid, this is not precise because a long start-up can
crash in the last second. It needs to wait a suitable seconds before
checking pid existence. and still it can not avoid fake success in
rare case just before timeout.
3. Use read-attribute server-state through CLI connection as I did in
Pull Request on Jira. This is declined as it is possible that
authentication is required before connection. In such case, any non
encrypted password is not advised in configuration files.
I have opened a PR to change the log key message dependency in start
script
https://github.com/wildfly/wildfly-core/pull/859
A jboss start marker file in temporary directory can be added to record
launch result and its timestamp when it starts. wildfly-init-redhat.sh /
wildfly-init-debian.sh will exam its content to get server start result
(success/error, or nonexistent file means start failure). The timestamp
can be used to identify this marker file's age in case of previous
abnormal termination. Once server is normally shutdown, it can be
removed as part of service stop.
If anyone is interested in this, please take a look at the PR, and feel
free to reply this or leave a comment.
Thanks,
Therefore, I would like to listen for your opinions for them. Any
other suggestion is certainly welcomed in mail or on jira.
Best regards,
Chao
_______________________________________________
wildfly-dev mailing list
wildfly-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev
--
Chao Wang
Software Engineer
JBoss by Red Hat