Hi everyone,
Over the past week, I’ve been digging into the InitializationFilter
, the very first filter processed when OpenMRS starts for the very first time. My goal is to identify any inconsistencies or potential improvements in this part of the code, particularly as a way to help resolve some of the long-standing issues we’ve seen around the Installation Wizard.
One of the key issues I’ve observed: Sometimes, even when a correct MySQL root password is provided, the database connection still fails, resulting in errors like: Access denied for user 'root'@'localhost' (using password: NO)
which usually means that the application is trying to connect to MySQL without providing a password at all, possibly because the password is missing or not being picked up from the configuration properly. OR Access denied for user 'root'@'localhost' (using password: YES)
which indicates that a password was provided, but it’s either incorrect or the root
user is not allowed to connect from localhost
with the given credentials. This is straight forward and likely not an issue.
In both cases, it’s worth checking:
- If the password is correctly set in the
runtime.properties
or installation wizard input. - If MySQL is configured to allow the
root
user to connect fromlocalhost
. - Anything else interfering with this process? I am yet to figure that out but i hope to do so in the foreseeable future.
Some of the improvements i have in mind
- we’ve discussed possibly making the wizard more in-line with the OpenMRS style and I have a pull request up to try and move us into that direction → TRUNK-6329: Modernize OpenMRS installation wizard UI to match the current OpenMRS branding by mherman22 · Pull Request #4995 · openmrs/openmrs-core · GitHub.
- Improving step navigation , so users can jump back to previous steps if needed in order to tweak something.
- Improving the progress indicator: currently it hangs at 99% for quite a while during the “big context refresh” when modules are loading. It might be better to replace this with a clearer “loading” indicator.
- How we can provide better feedback when modules fail to start (currently, the alert for the admin user isn’t as helpful as it could be).
- Improve the testability of the Filter by creating unit testable methods from the extra large methods. I have pull request for this at TRUNK-6330: Refactor to improve testability and maintainability in the Initialization Filter by mherman22 · Pull Request #5003 · openmrs/openmrs-core · GitHub.
I’d love your input on: Any other issues or pain points you’ve encountered during the installation process. Your experiences, suggestions, or even frustrations are all welcome here. The more context we have, the better we can improve this experience for everyone.
cc: @grace @dkayiwa @ibacher @veronica @wikumc @dev5 @dev4 @dev3 @dev2 @dev1 and all implementators out there.
Take care, Herman