Open StefanKock opened 2 years ago
Current idea: Use https://github.com/hzi-braunschweig/SORMAS-Docker#quick-start and provide a reproducable way to show the problem. (on branch development
, because master
is still on v1.66.4)
Unfortunately it does not start on my machine:
docker-compose up
error while interpolating services.base-keycloak.mem_limit: failed to cast to expected type: strconv.ParseInt: parsing "1024M": invalid syntax
docker-compose up
error while interpolating services.base-postgres.mem_limit: failed to cast to expected type: strconv.ParseInt: parsing "2000M": invalid syntax
docker-compose up
error while interpolating services.base-keycloak-postgres.mem_reservation: failed to cast to expected type: strconv.ParseInt: parsing "1000M": invalid syntax
docker-compose up
error while interpolating services.base-apache2.mem_reservation: failed to cast to expected type: strconv.ParseInt: parsing "200M": invalid syntax
docker compose version
Docker Compose version v2.2.3
This seems to be a known and fixed problem, but is not yet released: https://github.com/docker/compose/issues/9095
Workaround: Append these values in the .env file:
APPSERVER_JVM_MAX=4096000000
APPSERVER_MEM=4300000000
APPSERVER_MEM_RESERVED=1500000000
WEBSERVER_MEM=1000000000
WEBSERVER_MEM_RESERVED=200000000
KEYCLOAK_MEM=1024000000
KEYCLOAK_MEM_RESERVED=512000000
DB_MEM=2000000000
DB_MEM_RESERVED=1000000000
KEYCLOAK_DB_MEM=2000000000
KEYCLOAK_DB_MEM_RESERVED=1000000000
DB_DUMP_MEM=500000000
DB_DUMP_MEM_RESERVED=100000000
Reproducing problem with SORMAS-Docker:
# Checkout repo
git clone https://github.com/hzi-braunschweig/SORMAS-Docker.git
cd SORMAS-Docker
### We want to test 1.67.0+ with payara-5.2021.10
git checkout development
# 1. Start SORMAS (first sync of images will take some minutes)
docker-compose up
# 2. Watch log in a separate console
docker logs -f sormas-docker-sormas-1
# 3. Go into container with running SORMAS-Project
docker exec -ti sormas-docker-sormas-1 bash
cd /opt/domains/sormas/autodeploy
# 4. Redeploy of a sormas WAR works (try several times if you want)
rm sormas-rest.war
cp ../deployments/sormas-rest.war .
# 5. Redeploy sormas-ear.ear works in itself
rm sormas-ear.ear
cp ../deployments/sormas-ear.ear .
# 6. Produce exception: Repeating step 4 results in exception and autodeploy failing
rm sormas-rest.war
cp ../deployments/sormas-rest.war .
# Note: It seems that at some point health checks kick in and restart sormas-docker-sormas-1 indefinitely
Reported as bug: https://github.com/payara/Payara/issues/5597
Reply from payara team: My reproducer was rejected because it's too complex and uses not an official payara docker image. In addition, the auto-deployment feature is discouraged for production use and therefore probably not used in official docker images.
This ticket should be rethinked since Payara 6 is out and Payara 5 is said to be end of community support at the end of 2022. https://www.payara.fish/downloads/payara-platform-community-edition/
Tested with payara-5.2022.5 (#10499), redeployment of sormas-ear still fails with the following exception:
org.hibernate.boot.InvalidMappingException: Could not parse mapping document: C:\srv\payara-domains\sormas_de\eclipseApps\sormas-ear\sormas-backend_jar\META-INF\listener.xml (INPUT_STREAM)
at org.hibernate.boot.jaxb.internal.InputStreamXmlSource.doBind(InputStreamXmlSource.java:46)
...
Caused by: org.apache.xerces.impl.dv.DVFactoryException: DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.
at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)
Also failes with exploded archives.
PS: Had to set <unpack>true</unpack>
for the sormas-backend module in the sormas-ear maven ear plugin.
Problem Description
Coming from #2511 and https://github.com/hzi-braunschweig/SORMAS-Project/issues/4601#issuecomment-916167447 .
We can only deploy the SORMAS artifacts once on a Payara domain newer than payara-5.194. After the second deployment of
sormas-ear
, the EJB remote lookup/instantiation fails because the classes to use come from differentEarClassLoader
instances.Proposed Solution
Possible Alternatives
Accept that redeployment does not work.
Additional Information