The system maintenance modes can be enabled/disabled by using the following URL:
http://{servername}{:port}{/context}/modules/tools/maintenance.jsp
When the maintenance mode is activated, the server blocks all the requests but the ones to the tools area. This means that the webprojects are not accessible in live or edit mode, the edit mode, contribute mode and administration access are also blocked. Jobs/rules/events can still be triggered and operate modifications on the contents/DB/file system.
This only applies to the server/cluster node for which the maintenance mode is activated, therefore you might need to repeat the operations on all cluster nodes.
Please note that if you switch the maintenance mode flag, the changes are only valid during server runtime and are not persisted between server restarts.
If you would like to persist the flag value, set the maintenanceMode property to true in the jahia.properties
file:
maintenanceMode = true
The maintenance mode can be turned on a DX server also by directly calling the following URL (with Jahia Tools user credentials):
http://{servername}{:port}{/context}/modules/tools/maintenance.jsp?maintenance=true
And deactivated by using false
as a parameter value.
When the read-only mode is activated, the server blocks the requests to the edit/contribute/studio/administration modes. This means that the webprojects are still accessible in live, whereas the edit mode, contribute mode and administration access are blocked. Jobs/rules/events can still be triggered and operate modifications on the contents/DB/file system.
This only applies to the server/cluster node for which the read-only mode is activated, therefore you might need to repeat the operations on all cluster nodes.
The read-only mode is usually used in cluster environments to prevent the access to the edition interfaces on the browsing nodes.
Please note that if you switch the read-only mode flag, the changes are only valid during server runtime and are not persisted between server restarts.
If you would like to persist the flag value, set the maintenanceMode property to true in the jahia.properties
file:
readOnlyMode= true
The read only mode can be turned on a DX server also by directly calling the following URL (with Jahia Tools user credentials):
http://{servername}{:port}{/context}/modules/tools/maintenance.jsp?readOnlyMode=true
And deactivated by using false
as a parameter value.
The full read-only mode is an extended version of the read-only mode, as the edit/contribute/studio/administration modes are not accessible, as well as the user dashboards. But once the full read-only mode is activated, most of the writing operations are blocked, preventing everyone (including job, rules, events) to modify the jcr/database/filesystem. Creation of user generated contents will also fail, with no proper error message to the user. Please consult the techwiki to properly disable the creation of UGC when the full read-only mode is activated.
The logs are still being written on the file system when the full read-only mode is activated.
This only applies to the server/cluster node for which the full read-only mode is activated, therefore you might need to repeat the operations on all cluster nodes.
The full read-only mode is intended for hot backups of the environment, while the live versions of the webprojects are accessible to the visitors. Please consult our documentation regarding the backup and restoration of an environment. It is advised to activate the full read-only mode on the processing node first, and to end with the non-processing ones.
The full read only mode can be turned on a DX server also by directly calling the following URL (with Jahia Tools user credentials):
http://{servername}{:port}{/context}/modules/tools/maintenance.jsp?fullReadOnlyMode=true
And deactivated by using false
as a parameter value.
A new cache key part generator was introduced which is able to extend the cache keys to store the read only mode info when it’s necessary. Now it is possible to create components, that will render different HTML results in case the server is in full read only mode.
Example of scenario to handle:
Usage:
A new view property has been introduced:
cache.readOnly = true
You can use this view property with any component view, by creating a new properties file in the same folder of the view using the naming convention: name_of_the_view.properties
For example, there exist 2 views for a component commentable:
These two jsp views create different code in case the server is in read only mode or not.
So just create 2 properties files like this:
Each *.properties
file contains this line: cache.readOnly = true
By doing this the full read only mode info, will be stored in the cache key of the component. There will be two different cache entries depending on the state of the full read-only mode.
Therefore, we advise you to notify all the potential contributors that server maintenance operations will be performed, blocking the access to the edition interfaces, as well as failing all the attempts to create or update contents (in the case of a contributor being already connected when the full read-only mode is turned on).
For switching to the full read-only mode we recommend: