<div dir="ltr"><div><div>I don't like that <span class="blob-code-inner"><span class="pl-en">deleteStartupMarker</span>() is repeated on </span><span class="js-selectable-text" title="host-controller/src/main/java/org/jboss/as/host/controller/HostControllerService.java">HostControllerService.java and </span><span class="js-selectable-text" title="server/src/main/java/org/jboss/as/server/ApplicationServerService.java">ApplicationServerService.java<br><br></span></div><span class="js-selectable-text" title="server/src/main/java/org/jboss/as/server/ApplicationServerService.java">The marker file should be just "</span><span class="blob-code-inner"><span class="pl-s">startup-marker", or probably "wildfly-</span></span><span class="blob-code-inner"><span class="pl-s"><span class="blob-code-inner"><span class="pl-s">startup-marker<span class="pl-pds"></span></span></span>".<br><br></span></span></div><span class="blob-code-inner"><span class="pl-s">And if we go that road why not add another line with "message: Error message", that way it can be parsed by startup scripts and print the error directly.<br><br><span class="pl-pds"></span></span></span></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 12, 2015 at 11:55 PM Chao Wang <<a href="mailto:chaowan@redhat.com">chaowan@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div>On 06/09/2015 09:59 PM, Chao Wang
wrote:<br>
</div>
<blockquote type="cite">
Hi all,<br>
<br>
<span>The Wildfly start-up as service scripts
wildfly-init-redhat.sh</span> and <span>wildfly-init-debian.sh
currently depend on a grep action of key message '</span><span>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 <a href="https://issues.jboss.org/browse/WFCORE-747" target="_blank">https://issues.jboss.org/browse/WFCORE-747</a>
for it.<br>
<br>
For the moment, I have tried three options, they're all not that
perfect to implement<br>
<br>
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 </span>volatile once we
update log message in future release.(EAP has 'JBAS015874:')<br>
<br>
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. <br>
<br>
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.<br>
</blockquote>
<br></div><div text="#000000" bgcolor="#FFFFFF">
I have opened a PR to change the log key message dependency in start
script <a href="https://github.com/wildfly/wildfly-core/pull/859" target="_blank">https://github.com/wildfly/wildfly-core/pull/859</a> <br>
<br>
A jboss start marker file in temporary directory can be added to
record launch result and its timestamp when it starts. <span>wildfly-init-redhat.sh / </span><span><span>wildfly-init-debian.sh</span>
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 </span><span><span>in case of previous
abnormal termination</span>. Once server is normally shutdown,
it can be removed as part of service stop.<br>
<br>
If anyone is interested in this, please take a look at the PR, and
feel free to reply this or leave a comment.<br>
<br>
Thanks,<br>
<br>
</span></div><div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite"> <span> </span> <br>
Therefore, I would like to listen for your opinions for them. Any
other suggestion is certainly welcomed in mail or on jira.<br>
<br>
Best regards,<br>
<br>
Chao<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
wildfly-dev mailing list
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></pre>
</blockquote>
<br>
</div><div text="#000000" bgcolor="#FFFFFF"><pre cols="72">--
Chao Wang
Software Engineer
JBoss by Red Hat</pre>
</div><div text="#000000" bgcolor="#FFFFFF"></div>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></blockquote></div>