Hide Forgot
This bug is created as a clone of upstream ticket: https://pagure.io/dogtagpki/issue/2644 While I was working on Travis CI tests, I noticed that ```pkispawn -s KRA``` was failing regularly. It looks like ```pkispawn -s CA``` returns before the tomcat instance is ready to serve requests. Travis CI spawn a KRA directly after CA with no delay. Tests are now using a polling loop with curl and sleep. It usually takes 2 to 3 seconds until ```curl http://localhost:8080``` works. ## errors ``` $ pkispawn -f /tmp/workdir/pki/.travis/pki.cfg -s KRA Log file: /var/log/pki/pki-kra-spawn.20170418062853.log Loading deployment configuration from /tmp/workdir/pki/.travis/pki.cfg. ERROR: Unable to access security domain: HTTPSConnectionPool(host='pki.test', port=8443): Max retries exceeded with url: /ca/rest/securityDomain/domainInfo (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f05cedb3210>: Failed to establish a new connection: [Errno 111] Connection refused',)) ``` ## suggested solution pkispawn should use ```wait_for_startup``` to wait until Tomcat is ready before it exits.
cheimes made the following check-in: commit c0bb0ee8e36a85673e30352a7205414b215196a5 Author: Christian Heimes <cheimes> Date: Mon May 8 18:53:26 2017 +0200 pkispawn: wait after final restart The finalization scriptlet now waits after service has been restarted. Change-Id: Id462728386b9d7e6b3364e1651ef6676115dd1de Bugzilla: BZ#1446364 Pagure: 2644 Signed-off-by: Christian Heimes <cheimes>
I tested this bug on pki 10.4.1-8.el7 version. I did not encounter any problem like "Connection failed". Verifying this bug.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2110