issue with installing Bahmni-core 0.92 - openmrs 2.14- not able to start the application

Tags: #<Tag:0x00007f01bc3ee288>

**Application Name:**Bahmni Version Number: 0.92

Question: I was able to get so far with the installation from compiling the source code. I am stuck at a place where I am not able to deploy “bahmni-core-omod”. My OpenMRs version is 2.4.0-SNAPSHOT. I tried bahmni-core 0.92 and also the latest (0.93) from git. After installing the tomcat is not able to start. Once I remove the module. I get the login screen. The other modules installed are as shown in the picture below. Openelis-atomfeed-client module is not starting as it is dependent on bahmni-core.

Need help in getting the installation correct. I am attaching the log file in the attachment.

  1. I would like to know what version of OpenMRS is compatible with the version of OpenMRS mentioned above.
  2. I was not able to find source code for “Open-Elis Atom Feed Client”. I downloaded the 0.92 version of omod directly. Could that be the problem.
  3. If database is the issue , Can I delete the whole database and start the tomcat and will it run the initial set up again? image image

regardsLog file with Bahmni-core-odmos-installed.txt (32.1 KB)

@nvvnravi Bahmni is not compatible beyond OpenMRS Core 2.1.x.

1 Like

@mksd thank you for the response. if i get openmrs 2.1.x. Can i use 0.93 code base of bahmni with it?

Yes, see here.

@mksd i was able to continue with the installation. but when database update step starts running i get the following error: There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::2::upul: Reason: liquibase-update-to-latest.xml : Empty result set, expected one row : Caused By: Precondition Error Error while trying to update to the latest database version

i am using mysql 8. could this be the problem? detailed error in the log is :slight_smile: INFO 4/1/20 9:19 PM:liquibase: Reading from liquibasechangelog SEVERE 4/1/20 9:19 PM:liquibase: Change Set liquibase-update-to-latest.xml::2::upul failed. Error: Migration failed for change set liquibase-update-to-latest.xml::2::upul: Reason: liquibase-update-to-latest.xml : Empty result set, expected one row : Caused By: Precondition Error liquibase.exception.MigrationFailedException: Migration failed for change set liquibase-update-to-latest.xml::2::upul: Reason: liquibase-update-to-latest.xml : Empty result set, expected one row : Caused By: Precondition Error at liquibase.changelog.ChangeSet.execute(ChangeSet.java:285) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at org.openmrs.util.DatabaseUpdater$1OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:189) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:218) at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:148) at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:1650) at java.lang.Thread.run(Thread.java:748) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.ForeignKeyExistsPrecondition.check(ForeignKeyExistsPrecondition.java:65) at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.java:30) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:34) at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:249) … 7 more INFO 4/1/20 9:19 PM:liquibase: Successfully released change log lock WARN - InitializationFilter$InitializationCompletion$1.run(1656) |2020-04-01 21:19:03,639| Error while trying to update to the latest database version org.openmrs.util.DatabaseUpdateException: There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::2::upul: Reason: liquibase-update-to-latest.xml : Empty result set, expected one row : Caused By: Precondition Error at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:152) at org.openmrs.web.filter.initialization.InitializationFilter$InitializationCompletion$1.run(InitializationFilter.java:1650) at java.lang.Thread.run(Thread.java:748) Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase-update-to-latest.xml::2::upul: Reason: liquibase-update-to-latest.xml : Empty result set, expected one row : Caused By: Precondition Error at liquibase.changelog.ChangeSet.execute(ChangeSet.java:285) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at org.openmrs.util.DatabaseUpdater$1OpenmrsUpdateVisitor.visit(DatabaseUpdater.java:189) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:218) at org.openmrs.util.DatabaseUpdater.executeChangelog(DatabaseUpdater.java:148) … 2 more Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.ForeignKeyExistsPrecondition.check(ForeignKeyExistsPrecondition.java:65) at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.java:30) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:34) at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:249) … 7 more

I think the problem lies here you must use MySQL 5.6

i am on mac . i am not able to find any mysql 5.6 for mac. can i use 5.7.10?

MySQL 5.6 is difficult to find for linux also :sweat_smile: but yes you could try 5.7.10 and see if it works. If this doesn’t works I guess a docker image of MySQL 5.6 might work.

As @sidvaish97 said the issue is your version of MySQL. OpenMRS is stuck until now on MySQL 5.6. Various people have had it working on 5.7 (@wyclif for example) and there’s a roadmap item to get out of this situation by having it run against Postgres. However this isn’t easy feat and no active groups working on OpenMRS or Bahmni have gone down to prioritizing it as of yet.

On macOS it should be possible to find MySQL 5.6 on Homebrew.

Finally refrain from pasting logs here to improve readability, just use a tool like https://dpaste.org or https://hastebin.com.

@mksd sure i will try with 5.6 mysql. i will try to use dpase or hastebin for log file . thank you for pointing about it.

As far as i know, the OpenMRS platform 2.x versions should run without problems on MySQL 5.7

Thank you all for the support . i was able to complete the initial setup of opnmrs 2.1.5 with mysql 5.7. i am currently stuck at which legacy ui omod version should i be using . i tried with 1.6.0 ,1.5.0 and 1.4.0 but none of them seem to work. i am getting the modules from https://addons.openmrs.org/show/org.openmrs.module.legacy-ui-module any idea what version of legacy UI omod should i be using?

I am another issue as a part of installation. i am trying to sign into the admin using the credentials given when installing. but it is not working.it says invalid username and password. i re installed again after removing the openmrs database. but still the problem remains. the error givenis “Invalid username/password. Please try again.”. any idea why this might be happening. how to debug the issue.? The server log also says the same " HibernateContextDAO.authenticate | Failed login attempt (login=admin) - Invalid username and/or password: admin" found one item in the log: SimpleUrlHandlerMapping.registerHandlers(115) |2020-04-05 12:55:08,124| Neither ‘urlMap’ nor ‘mappings’ set on SimpleUrlHandlerMapping

could this be the problem. my env details: opemrs 2.1.5 mysql 5.7 legacy UI - legacyui-1.7.0-SNAPSHOT.omod

You mean superman / Admin123 ?

it is admin/Admin123 which i gave during installation. i also checked the users table.

I don’t remember offhand which process changes the admin credential in Bahmni to be those I mentioned. You may have done something that undoes this process, but if not, just try them.

I’d highly recommend using Docker anyways since this is an ancient form of MySQL.

The path of least resistance is probably to merge this ticket. We might run into some issues with the fact that mysql-connector-mxj has been discontinued (I think the Standalone uses it). Of course, then we have to deal with issues like this. Why can’t anything be easy? :sweat_smile:

my installation only contains only 1 module “legacy UI” i haven’t installed any other omod’s. i also checked the user table. it only contains “admin” username. how i enable debug to get more info in logs?just wanted to see of the log can print any other info other than just invalid username and password!!!

Ah sorry, I thought this was about Bahmni/Bahmni Core as per the title of this thread. I lost track that you were onto something else now.

eventually i will install bahmni but i am stuck at the initial step only.