Bug 1036681

Summary: Starting page listening on ${hostname}:7080 freezes if the server turns off itself during installation
Product: [Other] RHQ Project Reporter: Jirka Kremser <jkremser>
Component: Core UI, InstallerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.9CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.10   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-23 12:31:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch fixing the issue none

Description Jirka Kremser 2013-12-02 13:18:29 UTC
Description of problem:
When starting the RHQ server, there is a page listening on the root context on port 7080 indicating the progress. However, if the vanilla RHQ is installed with just rhqctl install (without no --start flag). The server turns off itself before the servlet reports that server has been started. This leads to never ending waiting process for server to start.

It should be possible to distinguish between successful XHR request with a response that server is still starting and the unsuccessful XHR request (servlet is not even listening).

Browser refresh obviously solves the issue.



Version-Release number of selected component (if applicable):
4.10.0-SNAPSHOT


How reproducible:
~ 50 % (JavaScript checks the backend availability in 3 seconds intervals => non-deterministic)


Steps to Reproduce:
1. install RHQ with "rhqctl install"
2. when installing, in browser goto http://${host}:7080/


Actual results:
after the installation is complete and the server is turned off the page is still reporting that the server is starting.. 

Expected results:
perhaps we could notify a user that the server is off and he/she has to turn it on again

Comment 1 Jirka Kremser 2013-12-03 17:50:06 UTC
Created attachment 832222 [details]
patch fixing the issue

Comment 2 Jirka Kremser 2013-12-04 19:22:26 UTC
branch:  master
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=cce8d75b2
time:    2013-12-04 20:10:36 +0100
commit:  cce8d75b28e55793ba222a10a6cd2b80d207191d
author:  Jirka Kremser - jkremser
message: [BZ 1036681] - Starting page listening on :7080 freezes if the server
         turns off itself during installation - adding logic that
         handles the case if the server went down during the
         installation (or normal startup process). Also externalizing
         the JavaScript to its own file and linking it to the HTML page.

Comment 3 Heiko W. Rupp 2014-04-23 12:31:36 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.