CMDBuild Forum

Installing 3.4 on windows 2019 server

Hi all, been trying unsuccessfully for last few hours to install cmdbuild 3.4 on my windows 2019 server.
PostgreSQL version 12 and Java version 17 installed - no issues.
i can see the DB in pgAdmin - all tables are there.

If somebody is able to see anything that I am missing from my below log - please advise. Will try this on different OS system next - but I have a dedicated windows 2019 server that meets system requirements available vs a linux machine - so ideally like to use this.

C:\Users\mypcname\Downloads\cmdbuild-3.4>java -jar cmdbuild.war -v
17:27:53.999 DEBUG org.cmdbuild.utils.cli.Main - running from war file = C:\Users\mypcname\Downloads\cmdbuild-3.4\cmdbuild.war
17:28:16.667 INFO o.c.utils.gui.GuiCommandRunner - prepare db config
17:28:16.707 INFO o.c.utils.crypto.Cm3EasyCryptoUtils - using default cm3easy key ( if this is a production environment you should change this to a secure key source by setting either env param CMDBUILD_CM3EASY_KEY or java system property org.cmdbuild.cm3easy.key to a valid key file )
17:28:16.867 INFO o.c.utils.gui.GuiCommandRunner - prepare tomcat config
17:28:16.891 INFO o.c.u.t.TomcatConfig$Builder - port offset = 100
17:28:16.898 INFO o.c.utils.gui.GuiCommandRunner - config is ready
17:28:16.906 INFO o.c.utils.gui.GuiCommandRunner - start installation thread
17:28:16.907 INFO o.c.utils.gui.GuiCommandRunner - installation thread is running
17:28:16.909 INFO o.c.u.tomcatmanager.TomcatBuilder - buildTomcat BEGIN
17:28:17.021 INFO o.c.u.tomcatmanager.TomcatBuilder - unpacking tomcat cm_97bd407eb2f4e18294aa7667a4174bef.cache to C:\CMDBUILD\cmdbuild_30
17:28:18.046 INFO o.c.u.tomcatmanager.TomcatBuilder - successfully unpacked tomcat binary distribution to dir = C:\CMDBUILD\cmdbuild_30
17:28:18.046 INFO o.c.u.tomcatmanager.TomcatBuilder - configure tomcat ports, http port = 8180, shutdown port = 8105
17:28:18.199 INFO o.c.u.tomcatmanager.TomcatBuilder - set catalina pid = C:\CMDBUILD\cmdbuild_30\bin\catalina.pid
17:28:18.205 INFO o.c.u.tomcatmanager.TomcatBuilder - deploy war artifact = C:\Users\NeoAdmin\Downloads\cmdbuild-3.4\cmdbuild.war AS cmdbuild to tomcat = C:\CMDBUILD\cmdbuild_30
17:28:26.487 INFO o.c.u.tomcatmanager.TomcatBuilder - successfully deployed war artifact = C:\Users\NeoAdmin\Downloads\cmdbuild-3.4\cmdbuild.war AS cmdbuild to dir = C:\CMDBUILD\cmdbuild_30\webapps\cmdbuild
17:28:26.488 INFO o.c.u.tomcatmanager.TomcatBuilder - adding config overlay for key = database file = C:\CMDBUILD\cmdbuild_30.\conf\cmdbuild\database.conf content =
#Thu Sep 08 17:28:16 SAST 2022
db.admin.password=postgres
db.password=cmdbuild
db.username=cmdbuild
db.admin.username=postgres
db.url=jdbc:postgresql://localhost:5432/cmdbuild_bc77

17:28:26.492 INFO o.c.u.tomcatmanager.TomcatBuilder - buildTomcat END
create database cmdbuild_bc77 demo.dump.xz
17:28:35.085 INFO o.c.dao.config.inner.DatabaseCreator - create database = jdbc:postgresql://localhost:5432/cmdbuild_bc77 from source = demo.dump.xz
17:28:35.088 INFO o.c.dao.config.inner.DatabaseCreator - checking database
17:28:35.298 INFO o.c.dao.config.inner.DatabaseCreator - database not found: org.postgresql.util.PSQLException: FATAL: database “cmdbuild_bc77” does not exist
17:28:35.298 INFO o.c.dao.config.inner.DatabaseCreator - Creating database cmdbuild_bc77
17:28:36.706 INFO o.c.dao.config.inner.DatabaseCreator - Creating role = cmdbuild
17:28:36.918 INFO o.c.dao.config.inner.DatabaseCreator - checking database
17:28:36.960 INFO o.c.dao.config.inner.DatabaseCreator - database found
17:28:36.982 DEBUG o.c.utils.postgres.PostgresUtils - the dump file is compressed with xz, decompressing before import
17:28:37.685 INFO o.c.dao.config.inner.DatabaseCreator - restoring database from dump = C:\Users\mypcname\AppData\Local\Temp\3\file_2022-09-08_17-28-36_cbe717.dump
17:28:37.699 DEBUG o.c.utils.postgres.PgLibsUtils - invalid default pg lib
java.lang.RuntimeException: java.io.IOException: Cannot run program “psql.exe”: CreateProcess error=2, The system cannot find the file specified
at org.cmdbuild.utils.lang.CmExceptionUtils.toRuntimeException(CmExceptionUtils.java:102)
at org.cmdbuild.utils.lang.CmExceptionUtils.runtime(CmExceptionUtils.java:60)
at org.cmdbuild.utils.exec.CmProcessUtils.executeProcess(CmProcessUtils.java:84)
at org.cmdbuild.utils.exec.CmProcessUtils.executeProcess(CmProcessUtils.java:44)
at org.cmdbuild.utils.postgres.PgLibsUtils.getLibVersion(PgLibsUtils.java:86)
at org.cmdbuild.utils.postgres.PgLibsUtils.getPgLibs(PgLibsUtils.java:73)
at org.cmdbuild.utils.postgres.PostgresHelperImpl.(PostgresHelperImpl.java:78)
at org.cmdbuild.utils.postgres.PostgresHelperConfigImpl$PostgresHelperBuilder.buildHelper(PostgresHelperConfigImpl.java:222)
at org.cmdbuild.utils.postgres.PostgresUtils.dumpContainsSchema(PostgresUtils.java:55)
at org.cmdbuild.dao.config.inner.DatabaseCreator.restoreDump(DatabaseCreator.java:333)
at org.cmdbuild.dao.config.inner.DatabaseCreator.configureDatabase(DatabaseCreator.java:169)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:42)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:36)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:32)
at org.cmdbuild.utils.gui.GuiCommandRunner$InstallHelper.lambda$install$10(GuiCommandRunner.java:319)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: Cannot run program “psql.exe”: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at org.cmdbuild.utils.exec.CmProcessUtils.executeProcess(CmProcessUtils.java:58)
… 13 common frames omitted
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:494)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
… 15 common frames omitted
17:28:37.702 ERROR o.c.utils.gui.GuiCommandRunner - error executing install
org.cmdbuild.dao.DaoException: Error while configuring the database
at org.cmdbuild.dao.config.inner.DatabaseCreator.configureDatabase(DatabaseCreator.java:185)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:42)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:36)
at org.cmdbuild.utils.cli.utils.DatabaseUtils.createDatabase(DatabaseUtils.java:32)
at org.cmdbuild.utils.gui.GuiCommandRunner$InstallHelper.lambda$install$10(GuiCommandRunner.java:319)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.cmdbuild.dao.DaoException: java.lang.IllegalArgumentException: CM: autodetect failed to find postgres libs on this system
at org.cmdbuild.dao.config.inner.DatabaseCreator.restoreDump(DatabaseCreator.java:389)
at org.cmdbuild.dao.config.inner.DatabaseCreator.configureDatabase(DatabaseCreator.java:169)
… 5 common frames omitted
Caused by: java.lang.IllegalArgumentException: CM: autodetect failed to find postgres libs on this system
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135)
at org.cmdbuild.utils.postgres.PgLibsUtils.getPgLibs(PgLibsUtils.java:77)
at org.cmdbuild.utils.postgres.PostgresHelperImpl.(PostgresHelperImpl.java:78)
at org.cmdbuild.utils.postgres.PostgresHelperConfigImpl$PostgresHelperBuilder.buildHelper(PostgresHelperConfigImpl.java:222)
at org.cmdbuild.utils.postgres.PostgresUtils.dumpContainsSchema(PostgresUtils.java:55)
at org.cmdbuild.dao.config.inner.DatabaseCreator.restoreDump(DatabaseCreator.java:333)
… 6 common frames omitted

Hello Thorsten, it looks like CMDBuild is trying to call the PostgreSQL executable:

Try putting PostgreSQL installation folder in your system wide PATH environment variable and restart CMDBuild.

Have a nice day!

1 Like

@Thorsten make sure there is postgresql-42.2.2.jar or newer in \cmdbuild\WEB-INF\lib
this lib is used for communication between cmdbuild and postgreql.
also add your ~\PostgreSQL\12\bin to Environment Path.

thank you for the responses. Have managed to get past the bottleneck, but other issues coming up now. Will investigate further with this installation in October - other projects taking up my time. Demo of product is good - installation guide a bit rough.