<div dir="ltr"><div>Hey Deshak,</div><div><br></div><div>If you take a look at the <a href="https://docs.evolveum.com/midpoint/release/4.8/">Release Notes for midPoint 4.8</a> and use your browser's Find function with the term "native", a couple results in you'll see:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><ul><li>Generic Repository with PostgreSQL is not supported, if you are using PostgreSQL with generic repository, please migrate to <a href="https://docs.evolveum.com/midpoint/reference/master/repository/native-postgresql/">PostgreSQL native repository</a>.
</li></ul></div></blockquote><div>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:</div><div><ol><li>Add a
MP_SET_midpoint_repository_type=native environment variable to your midPoint container</li><li>Set things so your midPoint container doesn't boot til after your database is configured<br></li><li>Recreate this logic somehow on the database container for the first launch (maybe make an init container to run these commands or something?):<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">sudo su - postgres<br>psql<br>CREATE USER midpoint WITH PASSWORD '<PASSWORD>' LOGIN SUPERUSER; <br>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;<br>\q<br><br>curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres.sql">https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres.sql</a> --output postgres.sql<br>curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-audit.sql">https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-audit.sql</a> --output postgres-audit.sql<br>curl <a href="https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-quartz.sql">https://raw.githubusercontent.com/Evolveum/midpoint/support-4.8/config/sql/native/postgres-quartz.sql</a> --output postgres-quartz.sql<br><br>psql -h localhost -d midpointdev -U midpoint -f postgres.sql -f postgres-audit.sql -f postgres-quartz.sql</blockquote></li></ol></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 10, 2023 at 8:37 AM BHATNAGAR Deshak via midPoint <<a href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6881871265031390861">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_-6881871265031390861WordSection1">
<p class="m_-6881871265031390861msipheadercbcacb55" style="margin:0in"><span style="font-size:10pt;color:green">THALES GROUP LIMITED DISTRIBUTION to email recipients
</span><u></u><u></u></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal">Added the docker-compose for reference.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks<u></u><u></u></p>
<div>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0in 0in">
<p class="MsoNormal"><b><span>From:</span></b><span> BHATNAGAR Deshak
<br>
<b>Sent:</b> Friday, November 10, 2023 9:43 PM<br>
<b>To:</b> <a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a><br>
<b>Subject:</b> Unable to deploy midPoint 4.8 with postgresql using Docker<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="m_-6881871265031390861msipheadercbcacb55" style="margin:0in"><span style="font-size:10pt;color:green">THALES GROUP LIMITED DISTRIBUTION to email recipients
</span><u></u><u></u></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal">Hello midpoint community,<u></u><u></u></p>
<p class="MsoNormal">I am deploying the Evolveum midpoint 4.8 with postgresql using Docker but I am facing the below mentioned error:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">ERROR initializing midPoint: org.springframework.context.ApplicationContextException: Unable to start web server<u></u><u></u></p>
<p class="MsoNormal">ROOT cause: com.evolveum.midpoint.util.exception.SystemException: DB script (/sql/postgresql-4.6-all.sql) couldn't be found<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">This above error occurs because the system is not able to create required database tables, the log file is attached below (log file (error))<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have tried with all the recommended version of both midpoint 4.8 as well as postgresql db.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">But the error remains the same in all cases.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Also, a similar error was reported on the Jira of Evolveum regarding the schema validation in which the database tables were not created:
<a href="https://jira.evolveum.com/projects/MID/issues/MID-9258?filter=doneissues" target="_blank">
https://jira.evolveum.com/projects/MID/issues/MID-9258?filter=doneissues</a> <u></u>
<u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">As per the conclusion drawn after my troubleshooting. <u></u><u></u></p>
<p class="MsoNormal">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 (<a href="https://github.com/Evolveum/midpoint/tree/v4.8/config/sql/native" target="_blank">https://github.com/Evolveum/midpoint/tree/v4.8/config/sql/native</a>).
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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 (<a href="https://github.com/Evolveum/midpoint/tree/v4.7.2/config/sql/native-new" target="_blank">https://github.com/Evolveum/midpoint/tree/v4.7.2/config/sql/native-new</a>).
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">So, I suspect that the issue is caused due to the file being missing in the repositories.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Please resolve the above issue or let me know the way that I can resolve this.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">docker-compose is also attached for the reference.<u></u><u></u></p>
<p class="MsoNormal"><span lang="NL" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="NL" style="color:rgb(31,73,125)">Thanks.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="NL" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="NL" style="color:rgb(31,73,125)">Kind regards,</span><span style="color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125)">Deshak Bhatnagar</span><span style="color:black"><u></u><u></u></span></p>
</div>
</div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</div></blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="font-family:sans-serif;font-size:12px;line-height:1.5em"><span style="font-weight:bold">Drew Roberts</span> | <span style="font-weight:bold">Systems Administrator II</span><br>IT Platform Engineering, Azusa Pacific University<br><a href="https://apu.edu" target="_blank">apu.edu</a> <br><br><img style="width: 210px;" src="https://www.apu.edu/static/src/sites/strategic-communication-engagement/images/apu_125_logo.png" alt="APU logo"></div></div></div>