Hi Ivy Team

I am getting following error message during Ivy startup after I migrated to the 7.3.1 image :

java.lang.Exception: The system database (jdbc:postgresql://10.172.0.9:5432/ivysystemdb_7) with all tables already exists (Version: 50). But was created with a older version of the ivy Engine. at ch.ivyteam.ivy.server.configuration.command.CreateDbCommand.checkIfCreationNeeded(CreateDbCommand.java:114) at ch.ivyteam.ivy.server.configuration.command.CreateDbCommand.createSystemDatabase(CreateDbCommand.java:63) at ...

What has to be done to fix this problem.

Thanks & Regards John

asked 29.08 at 10:33

John%20Moser's gravatar image

John Moser
462515
accept rate: 0%


Hello @John Moser

The system database needs to be converted. Classically, you started the Engine Configuration UI and clicked on the button Convert. But UI Interactions in a container world are not desired.

I think for the container use case, our autoConvert feature is pretty nice. While starting the container the migration will be done automatically. See autoConvert in the SystemDb section:

https://developer.axonivy.com/doc/latest/EngineGuideHtml/configuration.html#configuration-file-ref-ivy-yaml

We provide additionally a Command Line Tool, called EngineConfigCLI (https://developer.axonivy.com/doc/latest/EngineGuideHtml/tools.html#tool-engineconfigcli). This CLI is also able to convert the database. This CLI tool is also available in our docker image.

Be aware that a migration can take some time.

Attention: Always make a backup of the SystemDb before converting.

link

answered 30.08 at 02:06

Alex%20Suter's gravatar image

Alex Suter ♦♦
2.3k91937
accept rate: 81%

I tried the autoConvert solution but it did not work. I even installed/started an "empty" Ivy. If you look at the stack trace, it fails always at the same code line

ch.ivyteam.ivy.server.configuration.command.CreateDbCommand.checkIfCreationNeeded(CreateDbCommand.java:114) at

and looking at the name of the method, it looks like it does not even attempt to convert.

(30.08 at 10:09) John Moser John%20Moser's gravatar image

It seems to me that you are using the CLI tool and calling the creation command? e.g. ./EngineConfigCli create-db. You need to call ./EngineConfigCli convert-db

(02.09 at 00:45) Alex Suter ♦♦ Alex%20Suter's gravatar image

No ... I am running the following flag in ivy.yaml :

# If set to true the system database is automatically converted to the latest version during startup of the Axon.ivy Engine if needed.

Autoconvert: true

My expectation is that during the startup of Ivy this flag will cause the db to convert so that Ivy 7.3.1 can be run. So my question is, does this flag work at all ?

PS: imho I would be surprised if this works, if you have a real big sys db, how do you make sure that the Ivy startup can be delayed for so long ?

(17.09 at 08:40) John Moser John%20Moser's gravatar image

I double checked your issue and can now explain why this happens. Our docker image provides an own docker-entrypoint.sh and execute create-db before starting, to bootstrap a db. But in this scenario this commando will fail. We will fix that for 8.0 (XIVY-3343).

As workaround you can override the docker-entrypoint.sh with a more intelligent implementation. See https://developer.axonivy.com/doc/latest/engine-guide/getting-started/docker.html

We can not ensure that ivy startup is delayed for so long. You need to prepare a maintenance window for your user.

(17.09 at 10:04) Alex Suter ♦♦ Alex%20Suter's gravatar image

Ok ... then we will use the CLI.

Btw I just saw that 7.4 is out. Should we (from KLARA) move right to 7.4 or first move to 7.3.1 ?

(17.09 at 10:49) John Moser John%20Moser's gravatar image

I recommend to go directly to 7.4.we have improved db migration scripts between 7.2 unf 7.3.

(17.09 at 10:58) Alex Suter ♦♦ Alex%20Suter's gravatar image

we'd love to get early feedback on the 7.4 release. And migrators could benefit of the enhanced cockpit and migration scripts. However, a 7.4 migration must be carefully considered since with it the migration to java11 and primeFaces 7.0 is enforced with it. So it might take some manual migration steps...

(18.09 at 02:46) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image
showing 5 of 7 show 2 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×114
×34
×11

Asked: 29.08 at 10:33

Seen: 81 times

Last updated: 18.09 at 02:46