Artifactory offers different alternatives for session management between the Artifactory HA members when accessing one of the members. If you do not configure your HA cluster to enable sticky sessions, the UI will not work until you have completed upgrading the whole cluster.
The way to manage sessions is controlled via the artifactory.map.provider.type
property (in the $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties
file) which can take the following values:
db | (default) Sessions are managed by the database |
distributed | Sessions are managed by Hazelcast |
jvm | Sessions are managed by the JVM |
If sessions are configured to be managed by the database, Artifactory will also schedule a cron job to cleanup old sessions.
The cron expression to trigger the sessions can be configured using the artifactory.db.session.cleanup.cron
property in the $JFROG_HOME/artifactory/var/etc/artifactory
/artifactory.system.properties
file.
During installation, this cron expression is set with a default value that triggers the cleanup at a set minute (determined randomly) past each hour.
Upgrade HA Nodes Backward Compatibility
From Artifactory 7.17.4, the HA cluster supports Cloud-Native compatibility, whereby all nodes are equal and the need to set primary and secondary nodes is no longer required.
To use this new functionality, add the "taskAffinity
": "any
" to the nodes you would like to include in the cluster to the Artifactory System YAML.
When you upgrade, you are still set with primary and secondary nodes.
You can change these to taskAffinity: any
as follows:
and comment out or remove the following:
primary: false