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

1
0
-1

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

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

Comments

Submitted by antoine.mottier on Wed, 10/09/2019 - 11:36

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

Submitted by azap_ad_1400955 on Wed, 10/09/2019 - 16:15

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

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

1 answer

1
0
-1

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?

Comments

Submitted by azap_ad_1400955 on Wed, 10/09/2019 - 18:24

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 :

I would appreciate your help.
Many thanks!

Submitted by antoine.mottier on Wed, 10/09/2019 - 18:39

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.

Submitted by azap_ad_1400955 on Tue, 10/15/2019 - 19:17

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!

Submitted by antoine.mottier on Wed, 10/16/2019 - 09:29

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.

Notifications