Description of problem: When launching the server the login form is available and enabled before the system is capable of logging in with the account. Entering valid credentials results in an erroneous error message indicating invalid credentials. Version-Release number of selected component (if applicable): How reproducible: every time. Steps to Reproduce: 1. Launch server 2. Open UI 3. Login Additional info: A 'please wait' message of some sort and not displaying a login form until the system is capable of doing so would be nice.
Created attachment 741677 [details] login error message when server is still starting up This one is more difficult than it appears. The issue is we want to trap when the server is still booting up, and not yet ready to accept login requests. But if the user attempts to log in before the EJB layer is even started, there's no RHQ code for us to call to ask if its still initializing (by this time, its not enough to know the web layer is accepting requests - because the web layer will accept requests well before RHQ's application code is ready). We also have to take into account the time when the server initially starts, but then is asked to reload once our startup service is asked to deploy the EAR - if you ask to login prior to the reload, the EAR isn't even deployed yet. So, here's what I did. If you attempt to log in, and we find the RHQ app has not fully initialized or we failed to call the EJB layer entirely, we'll put a message in the login screen that says "The server is currently starting up. Please wait for it to fully initialize before attempting to log in." (see attached screenshot). This was doable without having to change much of the login code, thus wasn't as risky as some other potential solutions. So we are now able to tell the user the server is starting and to wait before attempting to log in again. While not quite as nice as simply not showing the login screen until such time as when the user will be able to can successfully log in, it does inform the user that the server is still booting and it does this without introducing too much churn in the code which hopefully minimizes the risk to breaking the authentication/login code. git commit to master: ca17805
This bz is available for testing with the latest 3.2.x brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=280316
login layer is visible only after server has finished installation and RHQ -${version} (build ${id}) Server started is logged.