Skip to content

Commit

Permalink
Merge pull request #10495 from IQSS/10494-payara-6.2024.4
Browse files Browse the repository at this point in the history
Upgrade to Payara 6.2024.6
  • Loading branch information
landreev authored Jun 27, 2024
2 parents 8fc3f0d + 7b7f2e3 commit 887a401
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 30 deletions.
119 changes: 119 additions & 0 deletions doc/release-notes/10494-payara-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Upgrade Payara to v6.2024.6

With this version of Dataverse, we encourage you to upgrade to version 6.2024.6.
This will address security issues accumulated since the release of 6.2023.8, which was required since Dataverse release 6.0.

## Instructions for Upgrading

If you are using GDCC containers, this upgrade is included when pulling new release images.
No manual intervention is necessary.

We recommend you ensure you followed all update instructions from the past releases regarding Payara.
(Latest Payara update was for [v6.0](https://github.com/IQSS/dataverse/releases/tag/v6.0))

Upgrading requires a maintenance window and downtime. Please plan ahead, create backups of your database, etc.

The steps below are a simple matter of reusing your existing domain directory with the new distribution.
But we also recommend that you review the Payara upgrade instructions as it could be helpful during any troubleshooting:
[Payara Release Notes](https://docs.payara.fish/community/docs/Release%20Notes/Release%20Notes%206.2024.6.html)
We assume you are already on a Dataverse 6.x installation, using a Payara 6.x release.

```shell
export PAYARA=/usr/local/payara6
```

(or `setenv PAYARA /usr/local/payara6` if you are using a `csh`-like shell)

1\. Undeploy the previous version

```shell
$PAYARA/bin/asadmin list-applications
$PAYARA/bin/asadmin undeploy dataverse<-version>
```

2\. Stop Payara

```shell
service payara stop
rm -rf $PAYARA/glassfish/domains/domain1/generated
rm -rf $PAYARA/glassfish/domains/domain1/osgi-cache
rm -rf $PAYARA/glassfish/domains/domain1/lib/databases
```

3\. Move the current Payara directory out of the way

```shell
mv $PAYARA $PAYARA.MOVED
```

4\. Download the new Payara version (6.2024.6), and unzip it in its place

5\. Replace the brand new payara/glassfish/domains/domain1 with your old, preserved domain1

6\. Make sure that you have the following `--add-opens` options in your domain.xml. If not present, add them:

```diff
--- payara-6.2023.8/glassfish/domains/domain1/config/domain.xml
+++ payara-6.2024.6/glassfish/domains/domain1/config/domain.xml
@@ -212,12 +212,16 @@
<jvm-options>--add-opens=java.naming/javax.naming.spi=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.logging/java.util.logging=ALL-UNNAMED</jvm-options>
+ <jvm-options>--add-opens=java.management/javax.management=ALL-UNNAMED</jvm-options>
+ <jvm-options>--add-opens=java.management/javax.management.openmbean=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=java.base/sun.net.www=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=java.base/sun.security.util=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.lang.invoke=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.desktop/java.beans=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED</jvm-options>
+ <jvm-options>[17|]--add-opens=java.base/java.io=ALL-UNNAMED</jvm-options>
+ <jvm-options>[21|]--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED</jvm-options>
<jvm-options>-Xmx512m</jvm-options>
<jvm-options>-XX:NewRatio=2</jvm-options>
<jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
@@ -447,12 +451,16 @@
<jvm-options>--add-opens=java.naming/javax.naming.spi=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.logging/java.util.logging=ALL-UNNAMED</jvm-options>
+ <jvm-options>--add-opens=java.management/javax.management=ALL-UNNAMED</jvm-options>
+ <jvm-options>--add-opens=java.management/javax.management.openmbean=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=java.base/sun.net.www=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=java.base/sun.security.util=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.lang.invoke=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.desktop/java.beans=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED</jvm-options>
+ <jvm-options>[17|]--add-opens=java.base/java.io=ALL-UNNAMED</jvm-options>
+ <jvm-options>[21|]--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED</jvm-options>
<jvm-options>-Xmx512m</jvm-options>
<jvm-options>-XX:NewRatio=2</jvm-options>
<jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
```
(You can also save this as a patch file and try to apply it.)

TODO: For the combined 6.3 release note, I would consider replacing the patch format above with just the 4 specific options, for clarity etc. (L.A.) As in:
```
<jvm-options>--add-opens=java.management/javax.management=ALL-UNNAMED</jvm-options>
<jvm-options>--add-opens=java.management/javax.management.openmbean=ALL-UNNAMED</jvm-options>
<jvm-options>[17|]--add-opens=java.base/java.io=ALL-UNNAMED</jvm-options>
<jvm-options>[21|]--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED</jvm-options>
```

7\. Start Payara

```shell
service payara start
```

8\. Deploy this version.

```shell
$PAYARA/bin/asadmin deploy dataverse-6.3.war
```

9\. Restart payara

```shell
service payara stop
service payara start
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/admin/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Tips:
MicroProfile Metrics endpoint
-----------------------------

Payara provides the metrics endpoint: <https://docs.payara.fish/community/docs/6.2023.9/Technical%20Documentation/MicroProfile/Metrics/Metrics%20Rest%20Endpoint.html>_
Payara provides the metrics endpoint: <https://docs.payara.fish/community/docs/Technical%20Documentation/MicroProfile/Metrics/Metrics%20Rest%20Endpoint.html>_
The metrics you can retrieve that way:
- `index_permit_wait_time_seconds_mean` displays how long does it take to receive a permit to index a dataset.
- `index_time_seconds` displays how long does it take to index a dataset.
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/developers/classic-dev-env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ On Linux, install ``jq`` from your package manager or download a binary from htt
Install Payara
~~~~~~~~~~~~~~

Payara 6.2023.8 or higher is required.
Payara 6.2024.6 or higher is required.

To install Payara, run the following commands:

``cd /usr/local``

``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.8/payara-6.2023.8.zip``
``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip``

``sudo unzip payara-6.2023.8.zip``
``sudo unzip payara-6.2024.6.zip``

``sudo chown -R $USER /usr/local/payara6``

Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ On RHEL/derivative you can make Java 17 the default with the ``alternatives`` co
Payara
------

Payara 6.2023.8 is recommended. Newer versions might work fine. Regular updates are recommended.
Payara 6.2024.6 is recommended. Newer versions might work fine. Regular updates are recommended.

Installing Payara
=================
Expand All @@ -55,8 +55,8 @@ Installing Payara

- Download and install Payara (installed in ``/usr/local/payara6`` in the example commands below)::

# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.8/payara-6.2023.8.zip
# unzip payara-6.2023.8.zip
# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip
# unzip payara-6.2024.6.zip
# mv payara6 /usr/local

If nexus.payara.fish is ever down for maintenance, Payara distributions are also available from https://repo1.maven.org/maven2/fish/payara/distributions/payara/
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/qa/test-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Go to the end of the log and then scroll up, looking for the failure. A failed A

```
TASK [dataverse : download payara zip] *****************************************
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.8/payara-6.2023.8.zip"}
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip"}
```

In the example above, if Payara can't be downloaded, we're obviously going to have problems deploying Dataverse to it!
Expand Down
2 changes: 0 additions & 2 deletions modules/container-base/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ RUN <<EOF
${ASADMIN} create-jvm-options '-XX\:MetaspaceSize=${ENV=MEM_METASPACE_SIZE}'
${ASADMIN} create-jvm-options '-XX\:MaxMetaspaceSize=${ENV=MEM_MAX_METASPACE_SIZE}'
${ASADMIN} create-jvm-options '-XX\:+IgnoreUnrecognizedVMOptions'
# Workaround for FISH-7722: Failed to deploy war with @Stateless https://github.com/payara/Payara/issues/6337
${ASADMIN} create-jvm-options --add-opens=java.base/java.io=ALL-UNNAMED
# Disable autodeploy and hot reload
${ASADMIN} set configs.config.server-config.admin-service.das-config.dynamic-reload-enabled="false"
${ASADMIN} set configs.config.server-config.admin-service.das-config.autodeploy-enabled="false"
Expand Down
15 changes: 1 addition & 14 deletions modules/dataverse-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,13 @@
<argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>

<!-- Major system components and dependencies -->
<payara.version>6.2023.8</payara.version>
<payara.version>6.2024.6</payara.version>
<postgresql.version>42.7.2</postgresql.version>
<solr.version>9.4.1</solr.version>
<aws.version>1.12.290</aws.version>
<google.library.version>26.30.0</google.library.version>

<!-- Basic libs, logging -->
<jakartaee-api.version>8.0.0</jakartaee-api.version>
<slf4j.version>1.7.35</slf4j.version>
<commons.io.version>2.15.1</commons.io.version>
<commons.logging.version>1.2</commons.logging.version>
Expand Down Expand Up @@ -386,18 +385,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<!-- This repository is about to being phased out. See https://github.com/payara/Payara_PatchedProjects/issues/366 -->
<repository>
<id>payara-patched-externals</id>
<name>Payara Patched Externals</name>
<url>https://raw.github.com/payara/Payara_PatchedProjects/master</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>central-repo</id>
<name>Central Repository</name>
Expand Down
3 changes: 0 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@
<groupId>fish.payara.api</groupId>
<artifactId>payara-api</artifactId>
<scope>provided</scope>
<!-- Note: The version was provided by Payara BOM till 6.2023.7, when they removed the Core BOM from it as
meant for internal use only. Simply referencing the version property here solves the problem. -->
<version>${payara.version}</version>
</dependency>

<!-- JSON-P -->
Expand Down
3 changes: 0 additions & 3 deletions scripts/installer/as-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ function preliminary_setup()

./asadmin $ASADMIN_OPTS create-jvm-options "-Ddataverse.timerServer=true"

# Workaround for FISH-7722: Failed to deploy war with @Stateless https://github.com/payara/Payara/issues/6337
./asadmin $ASADMIN_OPTS create-jvm-options --add-opens=java.base/java.io=ALL-UNNAMED

# enable comet support
./asadmin $ASADMIN_OPTS set server-config.network-config.protocols.protocol.http-listener-1.http.comet-support-enabled="true"

Expand Down

0 comments on commit 887a401

Please sign in to comment.