# Install and Configure BonitaSubscription 7.9.x bundle Tomcat at CentOS7 with PostgreSQL 9.2

**URL:** https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827
**Category:** Q&A
**Created:** [8 October 2019 20:32 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827 "2019-10-08T20:32:03Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![azap\_ad\_1400955](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@azap\_ad\_1400955](https://community.ofelia.com/u/azap_ad_1400955)
#### Post date: [8 October 2019 20:32 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/1 "2019-10-08T20:32:03Z")

</div>

Hello,  
I’m trying to install and configure BonitaSubscription 7.9.x bundle with Tomcat 8 at CentOS7 server with PostgreSQL 9.2… Unfortunately getting some errors at configuration stage ☹  
Installed PostgreSQL 9.2. with Tomcat 8 and trying to configure according to: [Platform configuration setup tool](https://documentation.bonitasoft.com/bonita/current/BonitaBPM_platform_setup)

When using a setup tool, either way, "setup.sh init " or “setup.sh configure” getting the errors like:

> [ERROR] HikariPool-1 - Exception during pool initialization.  
> org.postgresql.util.PSQLException: An error occurred while setting up the SSL connection.

Please advise how to resolve the issue and run Bonita Platform.  
Thank you!

Here is some error output log:

> (Platform Setup 7.9.4)  
> [INFO] Starting PlatformSetupApplication on centosbonita1.localdomain with PID 14118 (/opt/BonitaSubscription-7.9.4-tomcat/setup/lib/platform-setup-7.9.4.jar started by root in /opt/BonitaSubscription-7.9.4-tomcat/setup)  
> [DEBUG] Running with Spring Boot v2.1.3.RELEASE, Spring v5.1.5.RELEASE  
> [INFO] The following profiles are active: default  
> [INFO] configuration for Database vendor: postgres  
> [INFO] Started PlatformSetupApplication in 1.322 seconds (JVM running for 1.805)  
> [ERROR] HikariPool-1 - Exception during pool initialization.  
> org.postgresql.util.PSQLException: An error occurred while setting up the SSL connection.  
> at org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:439)  
> at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:94)  
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)  
> at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)  
> at org.postgresql.jdbc.PgConnection.(PgConnection.java:195)  
> at org.postgresql.Driver.makeConnection(Driver.java:454)  
> at org.postgresql.Driver.connect(Driver.java:256)  
> at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:136)  
> at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)  
> at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)  
> at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)  
> at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541)  
> at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)  
> at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)  
> at org.bonitasoft.platform.setup.PlatformSetup.initDataSource(PlatformSetup.java:449)  
> at org.bonitasoft.platform.setup.PlatformSetup.initPlatformSetup(PlatformSetup.java:479)  
> at org.bonitasoft.platform.setup.PlatformSetup.init(PlatformSetup.java:98)  
> at org.bonitasoft.platform.setup.command.InitCommand.execute(InitCommand.java:45)  
> at org.bonitasoft.platform.setup.PlatformSetupApplication.execute(PlatformSetupApplication.java:105)  
> at org.bonitasoft.platform.setup.PlatformSetupApplication.run(PlatformSetupApplication.java:79)  
> at org.bonitasoft.platform.setup.PlatformSetupApplication.main(PlatformSetupApplication.java:64)  
> [DEBUG] ERROR:  
> org.bonitasoft.platform.exception.PlatformException: org.postgresql.util.PSQLException: An error occurred while setting up the SSL connection.  
> at org.bonitasoft.platform.setup.PlatformSetup.initDataSource(PlatformSetup.java:455)  
> at org.bonitasoft.platform.setup.PlatformSetup.initPlatformSetup(PlatformSetup.java:479)  
> at org.bonitasoft.platform.setup.PlatformSetup.init(PlatformSetup.java:98)  
> at org.bonitasoft.platform.setup.command.InitCommand.execute(InitCommand.java:45)  
> at org.bonitasoft.platform.setup.PlatformSetupApplication.execute(PlatformSetupApplication.java:105)  
> at org.bonitasoft.platform.setup.PlatformSetupApplication.run(PlatformSetupApplication.java:79)  
> at org.bonitasoft.platform.setup.PlatformSetupApplication.main(PlatformSetupApplication.java:64)  
> Caused by: org.postgresql.util.PSQLException: An error occurred while setting up the SSL connection.  
> at org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:439)  
> at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:94)  
> at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)  
> at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)  
> at org.postgresql.jdbc.PgConnection.(PgConnection.java:195)  
> at org.postgresql.Driver.makeConnection(Driver.java:454)  
> at org.postgresql.Driver.connect(Driver.java:256)  
> at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:136)  
> at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)  
> at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)  
> at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)  
> at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541)  
> at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:115)  
> at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)  
> at org.bonitasoft.platform.setup.PlatformSetup.initDataSource(PlatformSetup.java:449)  
> … 6 common frames omitted

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)
#### Post date: [9 October 2019 15:01 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/2 "2019-10-09T15:01:38Z")

</div>

From the configuration file you shared I can see that your configured the PostgreSQL database connection to use port `8080`. Port `8080` is usually the default port used by a Java application server such as Tomcat.  
PostgreSQL use by default port `5432`. Are you sure that your PostgreSQL server is listening on port `8080`?

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)
#### Post date: [9 October 2019 09:36 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/3 "2019-10-09T09:36:06Z")

</div>

Hi,

As you are using Bonita Subscription (i.e. the Enterprise Edition) may I suggest that you reach out to Bonitasoft commercial support?

Still I can try to help. Can you share the full log output in a separated file hosted for example on Google Drive, Dropbox…?

Also can you share the `database.properties` file?

Thanks

---

<div class="post-metadata">

### Author: ![azap\_ad\_1400955](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@azap\_ad\_1400955](https://community.ofelia.com/u/azap_ad_1400955)
#### Post date: [9 October 2019 14:15 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/4 "2019-10-09T14:15:04Z")

</div>

Hi,  
Yes, I’m trying to install a platform server Bonita Subscription 7.9.4.  
OS: CentOS 7; SQLDB: PostgreSQL 9.2.24; Tomcat 8.5.46

Bonita Studio has no problem running with the same environment (but I used only H2 instead of PostgreSQL). This installation is to prepare migration from Windows to Linux as server platform.

Here is the Dropbox link:  
[BonitaFolder](https://www.dropbox.com/sh/u2parshq0aoosru/AAB5Fqny5865pZRMMXCeJe9Ba?dl=0 "config files for Bonita Subscription")

Please let me know if you need more information,  
Many thanks!

---

<div class="post-metadata">

### Author: ![azap\_ad\_1400955](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@azap\_ad\_1400955](https://community.ofelia.com/u/azap_ad_1400955)
#### Post date: [9 October 2019 16:24 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/5 "2019-10-09T16:24:55Z")

</div>

You were right this was my fault (for some reasons I choose 8080… ) now it is fixed.

```
(Platform Setup 7.9.4)    
[INFO] configuration for Database vendor: postgres
[INFO] Connected to 'postgres' database with url: 'jdbc:postgresql://localhost:5432/bonita_db' with user: 'bonita_db_user'
[INFO] Platform is already created.
[INFO] Upgrading default configuration with files from folder: platform_conf/initial
[INFO] Tomcat environment detected with root /opt/BonitaSubscription-7.9.4-tomcat
[INFO] Running auto-configuration using file /opt/BonitaSubscription-7.9.4-tomcat/setup/database.properties
[INFO] Same configuration detected for file 'server/bin/setenv.bat'. No need to change it.
[INFO] Same configuration detected for file 'server/bin/setenv.sh'. No need to change it.
[INFO] Same configuration detected for file 'server/conf/Catalina/localhost/bonita.xml'. No need to change it.
[INFO] Your postgres driver file 'server/lib/bonita/postgresql-42.2.5.jar' already exists. Skipping the copy.
[INFO] Your postgres driver file 'server/lib/bonita/postgresql-42.2.5.jar' already exists. Skipping the copy.
[INFO] Tomcat auto-configuration complete.

```

Setup seemed to complete without errors.  
**However Bonita platform still not running**. I might have some configuration mistakes (sorry, but those docs I found are not very clear).  
After ‘setup.sh init’, also done ‘setup.sh configure’ and push/pull to make sure no errors…  
I have Bonita logs saved in the same shared folder. [here is the link to the gzip file](https://www.dropbox.com/s/49ck49a2wdklzeo/logs.bonita.tar.gz?dl=0) :

I would appreciate your help.  
Many thanks!

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)
#### Post date: [9 October 2019 16:39 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/6 "2019-10-09T16:39:50Z")

</div>

From the log I can see that Tomcat fail to start because port is already used by another application. Bonita Tomcat bundle start on default Tomcat port (8080).

You can find out which application is using port 8080 by running the following command: `ss -ltp sport eq 8080` then you can use the pid to get the full path of the application: `ps ww <pid>`.

You should either stop the application in conflict with Bonita Tomcat bundle or reconfigure the bundle to use a different port number.

If this comment does not solve your issue, please create another post on the forum. It well other users looking for solving similar issues to find the information.

---

<div class="post-metadata">

### Author: ![azap\_ad\_1400955](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@azap\_ad\_1400955](https://community.ofelia.com/u/azap_ad_1400955)
#### Post date: [15 October 2019 17:17 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/7 "2019-10-15T17:17:56Z")

</div>

Hi,  
It took a while, I had to re-do everything 2-3 times… still have some issues, but to summarize:  
Re tomcat:  
There was an issue when I tried to start the service of the tomcat install (installed onto: /opt/tomcat, and also use “systemctl enable tomcat” to make it start with the system). This tomcat instance did not run at the time when system starts.  
However when I start Bonita bundle ( installed into: /opt/bonita/) by startup script: ./start-bonita.sh - everything is fine, and I can reach Bonita by localhost:8080/bonita  
I used documentation available on site and also other related docs… anyway… I would appreciate if some one responsible could review and revise documentation link to make sure there is no steps missed/messed up.

If this comment does not solve your issue, please create another post on the forum. It well other users looking for solving similar issues to find the information

I could continue discussion of the subject to help to improve the documentation in another topic if this one is not suitable. No problems.  
Thanks!

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)
#### Post date: [16 October 2019 07:29 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/8 "2019-10-16T07:29:08Z")

</div>

Your issue is that you have two installations of Tomcat configured to use the same port:

- Bonita Tomcat bundle that can be started using `start-bonita.sh`
- CentOS Tomcat package that can be started as a service using systemd command `systemctl start tomcat` and that is started by default automatically at server start if service is enabled.

My recommendation is to uninstall CentOS Tomcat package and only keep Bonita.

If you need Bonita to start when you server start you can create a systemd service for that.

---

<div class="post-metadata">

### Author: ![azap\_ad\_1400955](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@azap\_ad\_1400955](https://community.ofelia.com/u/azap_ad_1400955)
#### Post date: [16 October 2019 19:54 UTC](https://community.ofelia.com/t/install-and-configure-bonitasubscription-7-9-x-bundle-tomcat-at-centos7-with-postgresql-9-2/9827/9 "2019-10-16T19:54:44Z")

</div>

Hi,  
Thank you, this is fixed now, Bonita Platform starts as service in my configuration.  
I had to disable startup of Tomcat from /opt/tomcat and enable another version comes with Bonita bundle from /opt.bonita/server (not sure if this is correct way to fix the issue, but it works). I had to change tomcat service configuration in /etc/systemd/system/tomcat.service so it reflects the actual path:

```
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CLASSPATH=/opt/bonita/server/lib/:/opt/bonita/server/bin
Environment=CATALINA_PID=/opt/bonita/server/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/bonita/server
Environment=CATALINA_BASE=/opt/bonita/server
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/opt/bonita/start-bonita.sh
ExecStop=/bin/kill -15 $MAINPID

```

Also I had to modify a file path to “startup.sh” in the bonita platform startup script " /opt/bonita/start-bonita.sh" so it points to:  
./bin/startup.sh  
instead of:  
./server/bin/startup.sh

> “Your issue is that you have two installations of Tomcat configured to use the same port”

- Looks like this is the case.  
Following the current docs: [https://documentation.bonitasoft.com/bonita/7.9/ubuntu-openjdk-tomcat-postgresql](https://documentation.bonitasoft.com/bonita/7.9/ubuntu-openjdk-tomcat-postgresql) - I have installed Tomcat into /opt/tomcat (as per step “Install Tomcat 8.5”) and configured Tomcat to start as service from /opt/tomcat, then unpacked the Bonita deploy bundle into /opt/bonita … At some point I got lost in the docs and messed with configuration…
