# Installation error on centOS 6.8

**URL:** <https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759>\
**Category:** Bahmni\
**Created:** [March 27, 2017, 11:02am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759 "2017-03-27T11:02:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![munnavhai](https://talk.openmrs.org/user_avatar/talk.openmrs.org/munnavhai/32/4527_2.png) [@munnavhai](https://talk.openmrs.org/u/munnavhai)\
**Post date:** [March 27, 2017, 11:02am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/1 "2017-03-27T11:02:59Z")

</div>

Hello,

I am facing the following error while trying to install bahmni on centOS with blank database with possible\_config

TASK [bahmni-emr : Backup openmrs markers, failed\_events tables] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-emr/tasks/main.yml:89 fatal: [localhost -\> localhost]: FAILED! =\> {“changed”: true, “failed”: true, “rc”: 6, “stderr”: “+ . /etc/bahmni-installer/bahmni.conf\n++ IMPLEMENTATION\_NAME=possible\n++ OPENMRS\_DB\_USERNAME=openmrs-user\n++ OPENMRS\_DB\_PASSWORD=password\n++ OPENMRS\_DB\_SERVER=localhost\n++ OPENELIS\_DB\_USERNAME=clinlims\n++ OPENELIS\_DB\_PASSWORD=password\n++ OPENELIS\_DB\_SERVER=localhost\n++ OPENERP\_DB\_USERNAME=openerp\n++ OPENERP\_DB\_PASSWORD=password\n++ OPENERP\_DB\_SERVER=localhost\n++ MYSQL\_ROOT\_USER=root\n++ MYSQL\_ROOT\_PASSWORD=password\n++ REPORTS\_DB\_SERVER=localhost\n++ REPORTS\_DB\_PASSWORD=password\n++ REPORTS\_DB\_USERNAME=reports-user\n++ date +%Y%m%d\_%H%M%S\n+ TIME=20170327\_163742\n+ mysqldump -uroot -ppassword openmrs markers failed\_events\nWarning: Using a password on the command line interface can be insecure.\nmysqldump: Couldn’t find table: “markers”\n”, “stdout”: “”, “stdout\_lines”: []}

---

<div class="post-metadata">

**Author:** ![gsluthra](https://talk.openmrs.org/user_avatar/talk.openmrs.org/gsluthra/32/1453_2.png) [@gsluthra](https://talk.openmrs.org/u/gsluthra)\
**Post date:** [March 27, 2017, 12:59pm UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/2 "2017-03-27T12:59:13Z")

</div>

Hi @munnavhai… can you please also mention the steps you took to trigger the installation. Is this on a fresh CentOS machine or a VM? Plus maybe you can paste the complete logs of the output of installation process (you can use [pastebin.com](http://pastebin.com) to share a link of the logs).

---

<div class="post-metadata">

**Author:** ![munnavhai](https://talk.openmrs.org/user_avatar/talk.openmrs.org/munnavhai/32/4527_2.png) [@munnavhai](https://talk.openmrs.org/u/munnavhai)\
**Post date:** [March 28, 2017, 4:15am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/3 "2017-03-28T04:15:26Z")

</div>

Hello Gurpreet,

I have followed the installation instruction from this (bahmni-installer-0.87-81), [https://bahmni.atlassian.net/wiki/pages/viewpage.action?pageId=35291242](https://bahmni.atlassian.net/wiki/pages/viewpage.action?pageId=35291242)

I am trying to install in a fresh CentOS with blank database but with possible config,

> **[Possiblehealth/possible-config](https://github.com/Possiblehealth/possible-config)**
>
> Contribute to possible-config development by creating an account on Github.

i have pasted the full log in the link bellow, [https://pastebin.com/KGvAEjeu](https://pastebin.com/KGvAEjeu)

---

<div class="post-metadata">

**Author:** ![binduak](https://talk.openmrs.org/letter_avatar/binduak/32/5_5575768a8748004e209b776fc1b2916d.png) [@binduak](https://talk.openmrs.org/u/binduak)\
**Post date:** [March 28, 2017, 4:35am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/4 "2017-03-28T04:35:31Z")

</div>

Hi @munnavhai,

```
TASK [bahmni-emr : Install bahmni-openmrs from bahmni-repo] ********************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-emr/tasks/main.yml:49
ok: [localhost] => {"changed": false, "msg": "", "rc": 0, "results": ["bahmni-openmrs-0.87-52.noarch providing bahmni-openmrs-0.87-52 is already installed"]}

```

From above log it looks like you already have openmrs installed in your machine. Can you trigger the bahmni install command after removing bahmni-openmrs from your machine.

```
yum -y remove bahmni-web bahmni-emr bahmni-openmrs
bahmni -i local install

```

Please let us know if this doesn’t solve the issue.

---

<div class="post-metadata">

**Author:** ![munnavhai](https://talk.openmrs.org/user_avatar/talk.openmrs.org/munnavhai/32/4527_2.png) [@munnavhai](https://talk.openmrs.org/u/munnavhai)\
**Post date:** [March 28, 2017, 6:03am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/5 "2017-03-28T06:03:07Z")

</div>

Hello @binduak

Thank you for your suggestion. I followed this but still having the same error,

TASK [bahmni-emr : Backup openmrs markers, failed\_events tables] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-emr/tasks/main.yml:89 fatal: [localhost -\> localhost]: FAILED! =\> {“changed”: true, “failed”: true, “rc”: 6, “stderr”: “+ . /etc/bahmni-installer/bahmni.conf\n++ IMPLEMENTATION\_NAME=possible\n++ OPENMRS\_DB\_USERNAME=openmrs-user\n++ OPENMRS\_DB\_PASSWORD=password\n++ OPENMRS\_DB\_SERVER=localhost\n++ OPENELIS\_DB\_USERNAME=clinlims\n++ OPENELIS\_DB\_PASSWORD=password\n++ OPENELIS\_DB\_SERVER=localhost\n++ OPENERP\_DB\_USERNAME=openerp\n++ OPENERP\_DB\_PASSWORD=password\n++ OPENERP\_DB\_SERVER=localhost\n++ MYSQL\_ROOT\_USER=root\n++ MYSQL\_ROOT\_PASSWORD=password\n++ REPORTS\_DB\_SERVER=localhost\n++ REPORTS\_DB\_PASSWORD=password\n++ REPORTS\_DB\_USERNAME=reports-user\n++ date +%Y%m%d\_%H%M%S\n+ TIME=20170328\_113402\n+ mysqldump -uroot -ppassword openmrs markers failed\_events\nWarning: Using a password on the command line interface can be insecure.\nmysqldump: Couldn’t find table: “markers”\n”, “stdout”: “”, “stdout\_lines”: []} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* localhost : ok=108 changed=41 unreachable=0 failed=1

---

<div class="post-metadata">

**Author:** ![binduak](https://talk.openmrs.org/letter_avatar/binduak/32/5_5575768a8748004e209b776fc1b2916d.png) [@binduak](https://talk.openmrs.org/u/binduak)\
**Post date:** [March 28, 2017, 6:12am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/6 "2017-03-28T06:12:03Z")

</div>

Hi @munnavhai,

You might have to drop the database before triggering the `bahmni install` command. Please run the below commands.

```
mysql -uroot -ppassword -e "drop database openmrs"
yum -y remove bahmni-web bahmni-emr bahmni-openmrs
bahmni -i local install
```

---

<div class="post-metadata">

**Author:** ![sravanthi17](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sravanthi17/32/1357_2.png) [@sravanthi17](https://talk.openmrs.org/u/sravanthi17)\
**Post date:** [March 28, 2017, 6:19am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/7 "2017-03-28T06:19:48Z")

</div>

I guess removing openmrs would be sufficient

> mysql -uroot -ppassword -e “drop database openmrs” yum remove -y bahmni-openmrs bahmni -i local install

---

<div class="post-metadata">

**Author:** ![munnavhai](https://talk.openmrs.org/user_avatar/talk.openmrs.org/munnavhai/32/4527_2.png) [@munnavhai](https://talk.openmrs.org/u/munnavhai)\
**Post date:** [March 28, 2017, 7:58am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/8 "2017-03-28T07:58:50Z")

</div>

Hello all,

I tried with removing the openmrs database and bahmni-openmrs, bahmni-web, bahmni-emr, but still got some error,

TASK [implementation-config : Run openmrs liquibase migrations] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* task path: /opt/bahmni-installer/bahmni-playbooks/roles/implementation-config/tasks/implementation-config.yml:70 fatal: [localhost]: FAILED! =\> {“changed”: true, “failed”: true, “rc”: 255, “stderr”: “+ . /etc/bahmni-installer/bahmni.conf\n++ IMPLEMENTATION\_NAME=possible\n++ OPENMRS\_DB\_USERNAME=openmrs-user\n++ OPENMRS\_DB\_PASSWORD=password\n++ OPENMRS\_DB\_SERVER=localhost\n++ OPENELIS\_DB\_USERNAME=clinlims\n++ OPENELIS\_DB\_PASSWORD=password\n++ OPENELIS\_DB\_SERVER=localhost\n++ OPENERP\_DB\_USERNAME=openerp\n++ OPENERP\_DB\_PASSWORD=password\n++ OPENERP\_DB\_SERVER=localhost\n++ MYSQL\_ROOT\_USER=root\n++ MYSQL\_ROOT\_PASSWORD=password\n++ REPORTS\_DB\_SERVER=localhost\n++ REPORTS\_DB\_PASSWORD=password\n++ REPORTS\_DB\_USERNAME=reports-user\n+ CHANGE\_LOG\_TABLE=’-Dliquibase.databaseChangeLogTableName=liquibasechangelog -Dliquibase.databaseChangeLogLockTableName=liquibasechangeloglock -DschemaName=openmrs’\n+ LIQUIBASE\_JAR=/opt/openmrs/openmrs/WEB-INF/lib/liquibase-core-2.0.5.jar\n+ DRIVER=com.mysql.jdbc.Driver\n++ ls /opt/openmrs/openmrs/WEB-INF/lib/mysql-connector-java-5.1.28.jar\n+ CLASSPATH=/opt/openmrs/openmrs/WEB-INF/lib/mysql-connector-java-5.1.28.jar\n+ CHANGE\_LOG\_FILE=liquibase.xml\n+ ‘[’ -f /var/www/bahmni\_config/openmrs/migrations/liquibase.xml ‘]’\n+ cd /var/www/bahmni\_config/openmrs/migrations\n+ java -Dliquibase.databaseChangeLogTableName=liquibasechangelog -Dliquibase.databaseChangeLogLockTableName=liquibasechangeloglock -DschemaName=openmrs -jar /opt/openmrs/openmrs/WEB-INF/lib/liquibase-core-2.0.5.jar --driver=com.mysql.jdbc.Driver --classpath=/opt/openmrs/openmrs/WEB-INF/lib/mysql-connector-java-5.1.28.jar --changeLogFile=liquibase.xml --url=jdbc:mysql://localhost:3306/openmrs --username=openmrs-user --password=password update\nINFO 3/28/17 12:28 PM:liquibase: Successfully acquired change log lock\nINFO 3/28/17 12:28 PM:liquibase: Reading from `liquibasechangelog`\nINFO 3/28/17 12:28 PM:liquibase: Reading from `liquibasechangelog`\nSEVERE 3/28/17 12:28 PM:liquibase: Change Set openmrs-id-gen-liquibase.xml::POSSIBLE-IMPL-OMRS-IDGEN-BAH::tw failed. Error: Error executing SQL INSERT INTO idgen\_identifier\_source (uuid, name, description, identifier\_type, creator, date\_created)\n VALUES (@uuid, ‘BAH’, ‘ID sequence source for patients whose primary health center is Bayalapatta’, @patient\_identifier, 1, @currdate): Column ‘identifier\_type’ cannot be null\nliquibase.exception.DatabaseException: Error executing SQL INSERT INTO idgen\_identifier\_source (uuid, name, description, identifier\_type, creator, date\_created)\n VALUES (@uuid, ‘BAH’, ‘ID sequence source for patients whose primary health center is Bayalapatta’, @patient\_identifier, 1, @currdate): Column ‘identifier\_type’ cannot be null\n\tat liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)\n\tat liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)\n\tat liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)\n\tat liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)\n\tat liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)\n\tat liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)\n\tat liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)\n\tat liquibase.Liquibase.update(Liquibase.java:114)\n\tat liquibase.integration.commandline.Main.doMigration(Main.java:825)\n\tat liquibase.integration.commandline.Main.main(Main.java:134)\nCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ‘identifier\_type’ cannot be null\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n\tat com.mysql.jdbc.Util.handleNewInstance(Util.java:411)\n\tat com.mysql.jdbc.Util.getInstance(Util.java:386)\n\tat com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)\n\tat com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)\n\tat com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819)\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2768)\n\tat com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:949)\n\tat com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:795)\n\tat liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92)\n\tat liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)\n\t… 9 more\nINFO 3/28/17 12:28 PM:liquibase: Successfully released change log lock\nLiquibase Update Failed: Error executing SQL INSERT INTO idgen\_identifier\_source (uuid, name, description, identifier\_type, creator, date\_created)\n VALUES (@uuid, ‘BAH’, ‘ID sequence source for patients whose primary health center is Bayalapatta’, @patient\_identifier, 1, @currdate): Column ‘identifier\_type’ cannot be null\nSEVERE 3/28/17 12:28 PM:liquibase: Error executing SQL INSERT INTO idgen\_identifier\_source (uuid, name, description, identifier\_type, creator, date\_created)\n VALUES (@uuid, ‘BAH’, ‘ID sequence source for patients whose primary health center is Bayalapatta’, @patient\_identifier, 1, @currdate): Column ‘identifier\_type’ cannot be null\nliquibase.exception.MigrationFailedException: Migration failed for change set openmrs-id-gen-liquibase.xml::POSSIBLE-IMPL-OMRS-IDGEN-BAH::tw:\n Reason: liquibase.exception.DatabaseException: Error executing SQL INSERT INTO idgen\_identifier\_source (uuid, name, description, identifier\_type, creator, date\_created)\n VALUES (@uuid, ‘BAH’, ‘ID sequence source for patients whose primary health center is Bayalapatta’, @patient\_identifier, 1, @currdate): Column ‘identifier\_type’ cannot be null:\n Caused By: Error executing SQL INSERT INTO idgen\_identifier\_source (uuid, name, description, identifier\_type, creator, date\_created)\n VALUES (@uuid, ‘BAH’, ‘ID sequence source for patients whose primary health center is Bayalapatta’, @patient\_identifier, 1, @currdate): Column ‘identifier\_type’ cannot be null:\n Caused By: Column ‘identifier\_type’ cannot be null\n\tat liquibase.changelog.ChangeSet.execute(ChangeSet.java:347)\n\tat liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)\n\tat liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)\n\tat liquibase.Liquibase.update(Liquibase.java:114)\n\tat liquibase.integration.commandline.Main.doMigration(Main.java:825)\n\tat liquibase.integration.commandline.Main.main(Main.java:134)\nCaused by: liquibase.exception.DatabaseException: Error executing SQL INSERT INTO idgen\_identifier\_source (uuid, name, description, identifier\_type, creator, date\_created)\n VALUES (@uuid, ‘BAH’, ‘ID sequence source for patients whose primary health center is Bayalapatta’, @patient\_identifier, 1, @currdate): Column ‘identifier\_type’ cannot be null\n\tat liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)\n\tat liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)\n\tat liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)\n\tat liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)\n\tat liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)\n\t… 5 more\nCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ‘identifier\_type’ cannot be null\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n\tat com.mysql.jdbc.Util.handleNewInstance(Util.java:411)\n\tat com.mysql.jdbc.Util.getInstance(Util.java:386)\n\tat com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)\n\tat com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)\n\tat com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819)\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2768)\n\tat com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:949)\n\tat com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:795)\n\tat liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92)\n\tat liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)\n\t… 9 more\n\n\nFor more information, use the --logLevel flag)\n”, “stdout”: “”, “stdout\_lines”: []} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

details log here, [https://pastebin.com/9991VGEz](https://pastebin.com/9991VGEz)

---

<div class="post-metadata">

**Author:** ![sravanthi17](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sravanthi17/32/1357_2.png) [@sravanthi17](https://talk.openmrs.org/u/sravanthi17)\
**Post date:** [March 28, 2017, 8:15am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/9 "2017-03-28T08:15:25Z")

</div>

This is a problem with combination of possible\_config and an empty database. The config migrations usually work on possible database. any reason why you have chosen possible config ?

Also can you please check the output of the query

> ```
> SELECT patient_identifier_type_id from patient_identifier_type where name = 'Bahmni Id'
> 
> ```

---

<div class="post-metadata">

**Author:** ![munnavhai](https://talk.openmrs.org/user_avatar/talk.openmrs.org/munnavhai/32/4527_2.png) [@munnavhai](https://talk.openmrs.org/u/munnavhai)\
**Post date:** [March 29, 2017, 8:42am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/10 "2017-03-29T08:42:19Z")

</div>

Hi sravanthi,

I am working on implementing bahmni for govt district hospital here in nepal. Possible config was customized for Nepal context and i would like to test that.

yes there are some data in the patient\_identifier\_type table (3).

i have checked in the ‘openmrs-id-gen-liquibase.xml’ ([https://github.com/Possiblehealth/charikot-config/tree/master/openmrs/migrations](https://github.com/Possiblehealth/charikot-config/tree/master/openmrs/migrations)) file and found the following,

 SELECT count(\*) from idgen\_identifier\_source where name = 'BAH'; Add id gen sources select uuid() into @uuid; select now() into @currdate;

```
        SELECT patient_identifier_type_id from patient_identifier_type where name = 'Bahmni Id' into @patient_identifier;

        INSERT INTO idgen_identifier_source (uuid, name, description, identifier_type, creator, date_created)
        VALUES (@uuid, 'BAH', 'ID sequence source for patients whose primary health center is Bayalapatta', @patient_identifier, 1, @currdate);
        SET @source_id := LAST_INSERT_ID();
        INSERT INTO idgen_seq_id_gen (id, next_sequence_value, base_character_set, first_identifier_base, prefix, suffix, min_length, max_length)
        VALUES (@source_id, 200000, '0123456789','200000', 'BAH', '', 4, 9);

```

The problem is occurring while trying to insert data into the `idgen_identifier_source` table, i have checked that there is data in the patient\_identifier\_type table. I am still looking for the solution. Thank you.

---

<div class="post-metadata">

**Author:** ![premkjoe](https://talk.openmrs.org/letter_avatar/premkjoe/32/5_5575768a8748004e209b776fc1b2916d.png) [@premkjoe](https://talk.openmrs.org/u/premkjoe)\
**Post date:** [April 10, 2017, 10:02am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/11 "2017-04-10T10:02:27Z")

</div>

Hi,

I’ve come up into a similar problem while installing bahmni on a CentOS 6.9 x64 server with 2vCPU & 7.5 GB RAM.

I followed the instructions given at [https://bahmni.atlassian.net/wiki/display/BAH/Install+Bahmni+on+CentOS](https://bahmni.atlassian.net/wiki/display/BAH/Install+Bahmni+on+CentOS) to install Bahmni v0.88 (Recommended).

The installation failed at `bahmni -i local install`

```
TASK [bahmni-erp : Install bahmni-erp from bahmni-repo] ************************
task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-erp/tasks/main.yml:47
fatal: [localhost]: FAILED! => {"changed": true, "failed": true, "msg": "Error: Package: bahmni-erp-0.88-32.noarch (bahmni)\n Requires: mx\n", "rc": 1, "results": ["Loaded plugins: fastestmirror, security\nSetting up Install Process\nLoading mirror speeds from cached hostfile\n * base: mirrors.gigenet.com\n * epel: mirror.steadfast.net\n * extras: mirror.team-cymru.org\n * updates: bay.uchicago.edu\nResolving Dependencies\n--> Running transaction check\n---> Package bahmni-erp.noarch 0:0.88-32 will be installed\n--> Processing Dependency: mx for package: bahmni-erp-0.88-32.noarch\n--> Finished Dependency Resolution\n You could try using --skip-broken to work around the problem\n You could try running: rpm -Va --nofiles --nodigest\n"]}
        to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP *********************************************************************
localhost : ok=226 changed=83 unreachable=0 failed=1

Traceback (most recent call last):
  File "/usr/bin/bahmni", line 9, in <module>
    load_entry_point('bahmni==0.1', 'console_scripts', 'bahmni')()
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/click-6.7-py2.6.egg/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bahmni-0.1-py2.6.egg/bahmni.py", line 79, in install
    return subprocess.check_call(command, shell=True)
  File "/usr/lib64/python2.6/subprocess.py", line 505, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'ansible-playbook -i /etc/bahmni-installer/local all.yml -vv --extra-vars '@/etc/bahmni-installer/rpm_versions.yml' --extra-vars '@/etc/bahmni-backrest.conf' --extra-vars '@/etc/bahmni-installer/setup.yml'' returned non-zero exit status 2

```

I boiled the issue down to a missing dependency for **mx** which isn’t there on the base & epel repository. Was wondering if there was a fix to get the system running as I couldn’t find much on this issue, nor could I find much on mx dependency as most applications do not use it anymore. My installation now shows “Down for maintenance”

```
 [root@instance-2 ~]# yum install bahmni-erp
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.gigenet.com
 * epel: mirror.steadfast.net
 * extras: mirror.team-cymru.org
 * updates: bay.uchicago.edu
Resolving Dependencies
--> Running transaction check
---> Package bahmni-erp.noarch 0:0.88-32 will be installed
--> Processing Dependency: mx for package: bahmni-erp-0.88-32.noarch
--> Finished Dependency Resolution
Error: Package: bahmni-erp-0.88-32.noarch (bahmni)
           Requires: mx
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@instance-2 ~]

```

Here is the list of installed apps

```
[root@instance-2 ~]# yum list installed | grep bahmni
bahmni-emr.noarch 0.88-241 @bahmni
bahmni-installer.noarch 0.88-101 @/bahmni-installer-0.88-101.noarch
bahmni-lab.noarch 0.88-32 @bahmni
bahmni-lab-connect.noarch 0.88-241 @bahmni
bahmni-openmrs.noarch 0.88-60 @bahmni
bahmni-reports.noarch 0.88-10 @bahmni
bahmni-web.noarch 0.88-241 @bahmni
python-gdata.noarch 2.0.11-1.el6 @bahmni
[root@instance-2 ~]#
```

---

<div class="post-metadata">

**Author:** ![sravanthi17](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sravanthi17/32/1357_2.png) [@sravanthi17](https://talk.openmrs.org/u/sravanthi17)\
**Post date:** [April 10, 2017, 10:10am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/12 "2017-04-10T10:10:56Z")

</div>

Please follow the steps [here](https://talk.openmrs.org/t/openerp-not-installing/10975/4)

---

<div class="post-metadata">

**Author:** ![munnavhai](https://talk.openmrs.org/user_avatar/talk.openmrs.org/munnavhai/32/4527_2.png) [@munnavhai](https://talk.openmrs.org/u/munnavhai)\
**Post date:** [April 10, 2017, 10:14am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/13 "2017-04-10T10:14:23Z")

</div>

Hello,

Are you trying to install the bahmni default config ?

I was trying to install with Possible config and it is running fine now with the specific database customized for Nepal. The error i was facing is because of the database. Now its solved.

---

<div class="post-metadata">

**Author:** ![premkjoe](https://talk.openmrs.org/letter_avatar/premkjoe/32/5_5575768a8748004e209b776fc1b2916d.png) [@premkjoe](https://talk.openmrs.org/u/premkjoe)\
**Post date:** [April 10, 2017, 10:35am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/14 "2017-04-10T10:35:32Z")

</div>

I have go the application working now, thanks to the solution you have provided.

---

<div class="post-metadata">

**Author:** ![ejustine](https://talk.openmrs.org/letter_avatar/ejustine/32/5_5575768a8748004e209b776fc1b2916d.png) [@ejustine](https://talk.openmrs.org/u/ejustine)\
**Post date:** [June 8, 2017, 7:37am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/15 "2017-06-08T07:37:42Z")

</div>

Inconjuction to that, am a newbie in bahmni, Installing bahmni 0.89 on centos 6.8, This is what i also encounter after installation: TASK [bahmni-erp-connect : Backup openerp markers, failed\_events tables] \*\*\*\*\*\*\* task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-erp-connect/tasks/main.yml:40 fatal: [localhost -\> localhost]: FAILED! =\> {“changed”: true, “failed”: true, “rc”: 1, “stderr”: “+ . /etc/bahmni-installer/bahmni.conf\n++ IMPLEMENTATION\_NAME=default\n++ OPENMRS\_DB\_USERNAME=openmrs-user\n++ OPENMRS\_DB\_PASSWORD=password\n++ OPENMRS\_DB\_SERVER=localhost\n++ OPENERP\_DB\_USERNAME=openerp\n++ OPENERP\_DB\_PASSWORD=password\n++ OPENERP\_DB\_SERVER=localhost\n++ MYSQL\_ROOT\_USER=root\n++ MYSQL\_ROOT\_PASSWORD=password\n++ DCM4CHEE\_DB\_SERVER=localhost\n++ date +%Y%m%d\_%H%M%S\n+ TIME=20170608\_124459\n+ pg\_dump -U openerp -a -t markers -t failed\_events openerp\npg\_dump: server version: 9.2.21; pg\_dump version: 8.4.20\npg\_dump: aborting because of server version mismatch\n”, “stdout”: “”, “stdout\_lines”: []} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* localhost : ok=185 changed=67 unreachable=0 failed=1

**[root@TEST-SERVER ~]# yum list installed | grep bahmni** bahmni-emr.noarch 0.89-326 @bahmni  
bahmni-erp.noarch 0.89-49 @bahmni  
bahmni-erp-connect.noarch 0.89-49 @bahmni  
bahmni-implementer-interface.noarch 0.89-97 @bahmni  
bahmni-installer.noarch 0.89-193 @/bahmni-installer-0.89-193.noarch  
bahmni-lab.noarch 0.89-69 @bahmni  
bahmni-lab-connect.noarch 0.89-326 @bahmni  
bahmni-openmrs.noarch 0.89-89 @bahmni  
bahmni-reports.noarch 0.89-64 @bahmni  
bahmni-web.noarch 0.89-326 @bahmni  
python-gdata.noarch 2.0.11-1.el6 @bahmni

**At the openmrs log file i find this message** org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:303) at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy206.onStartup(Unknown Source) at org.openmrs.scheduler.SchedulerUtil.startup(SchedulerUtil.java:52) at org.openmrs.web.Listener.startOpenmrs(Listener.java:269) at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42) Caused by: org.openmrs.scheduler.SchedulerException: could not load class at org.openmrs.scheduler.TaskFactory.createInstance(TaskFactory.java:72) at org.openmrs.scheduler.timer.TimerSchedulerServiceImpl.scheduleTask(TimerSchedulerServiceImpl.java:217) … 36 more Caused by: java.lang.ClassNotFoundException: org.bahmni.module.elisatomfeedclient.api.task.OpenElisPatientFeedTask at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1320) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1173) at org.openmrs.util.OpenmrsClassLoader.loadClass(OpenmrsClassLoader.java:166) at java.lang.ClassLoader.loadClass(Unknown Source) at org.openmrs.scheduler.TaskFactory.createInstance(TaskFactory.java:51) … 37 more WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2085) |2017-06-08 12:45:15,350| Unable to find a runtime properties file at /openmrs-runtime.properties

**At the browser** i find “Bahmni down for maintenace” Friends I need help

---

<div class="post-metadata">

**Author:** ![binduak](https://talk.openmrs.org/letter_avatar/binduak/32/5_5575768a8748004e209b776fc1b2916d.png) [@binduak](https://talk.openmrs.org/u/binduak)\
**Post date:** [June 8, 2017, 10:53am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/16 "2017-06-08T10:53:38Z")

</div>

Hi @ejustine,

> [@ejustine](#):
>
> openerp\npg\_dump: server version: 9.2.21; pg\_dump version: 8.4.20\npg\_dump: aborting because of server version mismatch\n"

Looks like you have multiple versions of postgresql installed in your server. Can you share the ouput of below command.

`yum list installed | grep postgresql`

---

<div class="post-metadata">

**Author:** ![ejustine](https://talk.openmrs.org/letter_avatar/ejustine/32/5_5575768a8748004e209b776fc1b2916d.png) [@ejustine](https://talk.openmrs.org/u/ejustine)\
**Post date:** [June 8, 2017, 12:19pm UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/17 "2017-06-08T12:19:31Z")

</div>

[root@TEST-SERVER ~]# yum list installed | grep postgresql postgresql.x86\_64 8.4.20-6.el6 @anaconda-CentOS-201605220104.x86\_64/6.8 postgresql-docs.x86\_64 8.4.20-6.el6 @anaconda-CentOS-201605220104.x86\_64/6.8 postgresql-libs.x86\_64 8.4.20-6.el6 @anaconda-CentOS-201605220104.x86\_64/6.8 postgresql-odbc.x86\_64 08.04.0200-1.el6 postgresql-server.x86\_64 postgresql92.x86\_64 9.2.21-1PGDG.rhel6 postgresql92-contrib.x86\_64 postgresql92-libs.x86\_64 postgresql92-server.x86\_64

---

<div class="post-metadata">

**Author:** ![ejustine](https://talk.openmrs.org/letter_avatar/ejustine/32/5_5575768a8748004e209b776fc1b2916d.png) [@ejustine](https://talk.openmrs.org/u/ejustine)\
**Post date:** [June 8, 2017, 4:42pm UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/18 "2017-06-08T16:42:58Z")

</div>

Thanks have recectified that and another one has come it brings bahmni down for maintenance page

**openmrslog file** WARN - AbstractBeanFactory.getTypeForFactoryBean(1427) |2017-06-08 21:59:38,540| Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘reportingSerializedDefinitionService’ defined in URL [jar:file:/opt/openmrs/.openmrs-lib-cache/reporting/lib/reporting-api-0.10.4.jar!/moduleApplicationContext.xml]: Cannot create inner bean ‘org.openmrs.module.reporting.definition.service.SerializedDefinitionServiceImpl#3faa4a88’ of type [org.openmrs.module.reporting.definition.service.SerializedDefinitionServiceImpl] while setting bean property ‘target’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.openmrs.module.reporting.definition.service.SerializedDefinitionServiceImpl#3faa4a88’ defined in URL [jar:file:/opt/openmrs/.openmrs-lib-cache/reporting/lib/reporting-api-0.10.4.jar!/moduleApplicationContext.xml]: Cannot resolve reference to bean ‘serializedObjectDAO’ while setting bean property ‘dao’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘serializedObjectDAO’ defined in class path resource [applicationContext-service.xml]: Cannot resolve reference to bean ‘sessionFactory’ while setting bean property ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name ‘sessionFactory’: FactoryBean which is currently in creation returned null from getObject

---

<div class="post-metadata">

**Author:** ![binduak](https://talk.openmrs.org/letter_avatar/binduak/32/5_5575768a8748004e209b776fc1b2916d.png) [@binduak](https://talk.openmrs.org/u/binduak)\
**Post date:** [June 9, 2017, 5:57am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/19 "2017-06-09T05:57:12Z")

</div>

Hi @ejustine,

> [@ejustine](#):
>
> WARN - AbstractBeanFactory.getTypeForFactoryBean(1427) |2017-06-08 21:59:38,540|

Its just a Warning as mentioned, So you can ignore that. We have created a mingle card to fix those warnings. You can track the card [here](https://bahmni.mingle.thoughtworks.com/projects/bahmni_emr/cards/3102). Do you see any other error stack trace in the _openmrs.log_ file.

---

<div class="post-metadata">

**Author:** ![ejustine](https://talk.openmrs.org/letter_avatar/ejustine/32/5_5575768a8748004e209b776fc1b2916d.png) [@ejustine](https://talk.openmrs.org/u/ejustine)\
**Post date:** [June 10, 2017, 4:51am UTC](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759/20 "2017-06-10T04:51:20Z")

</div>

Thanks, am just wondering what could be the cause of this: **For bahmni**

 ![](https://talk.openmrs.org/uploads/default/original/2X/0/08ad43942bc914a60090db6c628ae86e9842277d.png)

**For openmrs**

 ![](https://talk.openmrs.org/uploads/default/original/2X/e/eca6cce8e11c32a60bffc444f4fe4b1625d69961.png)

[Next page](https://talk.openmrs.org/t/installation-error-on-centos-6-8/10759.md?page=2)
