[midPoint] [External] Re: Unable to deploy midPoint 4.8 with postgresql using Docker

Drew Roberts aroberts at apu.edu
Fri Nov 10 23:20:25 CET 2023


Hey Deshak,

If you take a look at the Release Notes for midPoint 4.8
<https://docs.evolveum.com/midpoint/release/4.8/> and use your browser's
Find function with the term "native", a couple results in you'll see:

>
>    - Generic Repository with PostgreSQL is not supported, if you are
>    using PostgreSQL with generic repository, please migrate to PostgreSQL
>    native repository
>    <https://docs.evolveum.com/midpoint/reference/master/repository/native-postgresql/>.
>
>
> I believe the issue you're experiencing is due to this change. My
environment and setup are slightly different from yours so your mileage may
vary but here are my two cents:

   1. Add a MP_SET_midpoint_repository_type=native environment variable to
   your midPoint container
   2. Set things so your midPoint container doesn't boot til after your
   database is configured
   3. Recreate this logic somehow on the database container for the first
   launch (maybe make an init container to run these commands or something?):

>    sudo su - postgres
>    psql
>    CREATE USER midpoint WITH PASSWORD '<PASSWORD>' LOGIN SUPERUSER;
>    CREATE DATABASE midpointdev WITH OWNER = midpoint ENCODING = 'UTF8'
>    TABLESPACE = pg_default LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'
>    CONNECTION LIMIT = -1;
>    \q
>
>    curl
>    https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres.sql
>    --output postgres.sql
>    curl
>    https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-audit.sql
>    --output postgres-audit.sql
>    curl
>    https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-quartz.sql
>    --output postgres-quartz.sql
>
>    psql -h localhost -d midpointdev -U midpoint -f postgres.sql -f
>    postgres-audit.sql -f postgres-quartz.sql



On Fri, Nov 10, 2023 at 8:37 AM BHATNAGAR Deshak via midPoint <
midpoint at lists.evolveum.com> wrote:

> THALES GROUP LIMITED DISTRIBUTION to email recipients
>
>
>
> Added the docker-compose for reference.
>
>
>
> Thanks
>
> *From:* BHATNAGAR Deshak
> *Sent:* Friday, November 10, 2023 9:43 PM
> *To:* midpoint at lists.evolveum.com
> *Subject:* Unable to deploy midPoint 4.8 with postgresql using Docker
>
>
>
> THALES GROUP LIMITED DISTRIBUTION to email recipients
>
>
>
> Hello midpoint community,
>
> I am deploying the Evolveum midpoint 4.8 with postgresql using Docker but
> I am facing the below mentioned error:
>
>
>
> ERROR initializing midPoint:
> org.springframework.context.ApplicationContextException: Unable to start
> web server
>
> ROOT cause: com.evolveum.midpoint.util.exception.SystemException: DB
> script (/sql/postgresql-4.6-all.sql) couldn't be found
>
>
>
> This above error occurs because the system is not able to create required
> database tables, the log file is attached below (log file (error))
>
>
>
> I was previously using the LTS version midpoint 4.4.4 and used the same
> docker-compose file with changes to midpoint 4.8 image and postgresql-16
> image.
>
>
>
> I have tried with all the recommended version of both midpoint 4.8 as well
> as postgresql db.
>
>
>
> But the error remains the same in all cases.
>
>
>
> Also, a similar error was reported on the Jira of Evolveum regarding the
> schema validation in which the database tables were not created:
> https://jira.evolveum.com/projects/MID/issues/MID-9258?filter=doneissues
>
>
>
> As per the conclusion drawn after my troubleshooting.
>
> I found out that the config/sql file in midpoint 4.8 repository on Github
> do not have the above-mentioned file in the error i.e.,
> postgresql-4.6-all.sql (
> https://github.com/Evolveum/midpoint/tree/v4.8/config/sql/native).
>
>
>
> In-comparison, all of the previous versions of midpoint on the Github had
> the file (postgresql-4.6-all.sql) in their respective repositories, for
> example: midpoint 4.7.2 had the file postgresql-4.6-all.sql in it on the
> Github (
> https://github.com/Evolveum/midpoint/tree/v4.7.2/config/sql/native-new).
>
>
>
> So, I suspect that the issue is caused due to the file being missing in
> the repositories.
>
>
>
> Please resolve the above issue or let me know the way that I can resolve
> this.
>
>
>
> docker-compose is also attached for the reference.
>
>
>
> Thanks.
>
>
>
> Kind regards,
>
> Deshak Bhatnagar
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> https://lists.evolveum.com/mailman/listinfo/midpoint
>


-- 
Drew Roberts  |  Systems Administrator II
IT Platform Engineering, Azusa Pacific University
apu.edu

[image: APU logo]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20231110/9bcb9747/attachment-0001.htm>


More information about the midPoint mailing list