smolnar82 commented on issue #68: KNOX-1814 - Moving conf/data folder checking to Java layer from bash URL: https://github.com/apache/knox/pull/68#issuecomment-471690200 > > I agree, but this is how the bash script checks if the service started (as of now). > > @smolnar82 are you sure about this? I can double check in a bit, but it seems like if the check is in the bash script, the script would fail BEFORE java is even started. This would mean that there is no success message printed? Yes, I'm. If the folder check is moved to Java layer then the `appStart` function will execute the Java process and will chek for the PID file being created; once it finds it considers the startup process finished with success. It may happen that the Java process did not reach the validation at this time (so that it has not thrown the corresponding exception yet) -> the PID file won't be removed. An easy to implement solution could be to give a bit more time - let's say 2 seconds - to the Java process before the first time PID check (by this time the validation would fail and the Java process would return with 1). Ideally the check should not rely only on the PID file being created; some sort of heartbeat would be helpful or implementing a basic state machine in the Gateway server (STOPPED, INITIALIZING, STARTED, STOPPING)...but this is out of the scope of this task. Any idea?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
