Administration

JMX Interfaces

All Sophora components support JMX. The JMX interface provides information about each component's state and allows for administrative actions.

Sophora Server

Configuration

Monitoring has to be enabled in the sophora.properties file before you can access the information as described here. The following snippet from the sophora.properties file shows how to activate JMX monitoring with access control:

sophora.rmi.servicePort=1198
sophora.rmi.registryPort=1199
 
sophora.jmx.enabled=true
sophora.jmx.username=admin
sophora.jmx.password=admin

With this configuration, the Sophora Server can be accessed using the following JMX connection string:

service:jmx:rmi://<HOST>:1198/jndi/rmi://<HOST>:1199/server

The following image shows the connection settings dialog from VisualVM:

+++
+++ (Image: subshell/CC BY)

Available MBeans

Note, that some Beans are only available if the corresponding feature is active in the respective Sophora server. For example, you will find the ArchiveWorker-Bean only if you have enabled the archival of documents in the server.

com.subshell.sophora

AccessManager
JMX-Attribute/JMX-MethodDescriptionPossible ValuesModifiable via JMX
CheckForIncorrectLoginsControls, whether incorrect login requests are counted. Too many incorrect login requests lead to the locking of accounts, depending on the server configuration parameter sophora.authenticate.incorrectLoginCount.true/falseYes
EnableUserLoginWhen set to false, non-admin users cannot log in to this server. Users who are logged in already remain logged in.true/falseYes
ArchiveWorker
JMX-Attribute/JMX-MethodDescriptionPossible ValuesModifiable via JMX
AddingToQueueWhen set to true, documents are added to the archive worker queue.true/falseYes, via
startAddingToQueue()/
stopAddingToQueue()
ArchivingThe archive worker is enabled, when this is set to true.true/falseYes, via
startArchival()/
stopArchival()
CheckAllDocumentsFor
OldVersions
The archive worker checks all documents for old versions in a background thread, if set to true.true/falseYes
CurrentDocumentUUIDThe UUID of the current document.A Sophora UUIDNo
DelayDelay in ms between the archiving of versions.Positive long integers.Yes
DeleteOldVersionsAfterDaysWhen the age of an archive version exceeds this amount of days the version will be removed from the archive.Positive integers. If 0 to 0, versions are not removed at all.Yes
MaxVersionsToGetThe maximum number of document versions that should be processed at once.Positive integers.Yes
MaxVersionsToRetainThe maximum number of document versions that will be kept in the main repository.Positive integers.Yes
PreserveNumberOfVersions
InArchiveRepository
The archiving processes keep at least this number of versions for all documents, regardless how old the versions are.Positive integers.Yes
QueueThe UUIDs of documents waiting to be processed by the archive worker.A list of UUIDs.Yes
clearQueue()Clears the archive worker queue.
addToQueue(String)Adds a document to the archive worker queue, where the string is the UUID of the Sophora document that should be addedUUID
QueueSizeCurrent size of the archive worker queue.Positive integers.No
RemainingVersionsOfCurrentDocumentRemaining number of versions of the current document.Positive integers.No
TotalVersionsOfCurrentDocumentTotal number of versions of the current document.Positive integers.No
createNewDocumentForVersions(String)Creates a new document for the newest version of the document that is given by its UUID.

ConfigurationHashes

There are configuration hashes for multiple types of configuration documents that can be found via JMX. However, the scheme is the same for all of these types. Therefore, the table below lists a few attributes as Feature[...]. For this attributes, you can substitute Feature with the following: Cnd, DefaultChildNodeConfiguration, DefaultPropertyConfiguration, DocumentProposalSection, FormFieldGroup, NodeTypeConfiguration, Role, StructureNodeDocument, StructureNode, SystemDocument, User.

JMX-Attribute/JMX-MethodDescriptionPossible ValuesModifiable via JMX
FeatureHashHash, calculated for all available documents of this feature.a StringNo
FeatureHashEntriesAll entries that were used to calculate the FeatureHash.Map<String, String> of each document's name and hash.No
FeaturesAreInSyncWithMasterInforms, whether this server's hash value is equal to the Sophora Primary Server's hash value of this feature, and therefore, if the configuration of this feature is in sync with the Sophora Primary Server.TRUE, FALSE, UNKNOWN, NOT_CONSIDEREDNo
HasSameConfigurationAsMasterInforms, whether this server has the same configuration as its Sophora Primary Server.TRUE, FALSE, UNKNOWN, NOT_CONSIDEREDNo
ContentManager
JMX-Attribute/JMX-MethodDescriptionPossible ValuesModifiable via JMX
ApiVersionVersion of the Sophora API used in this server.Sophora API version numbersNo
Call StatisticsStatistics about method calls in the ContentManager.No
CreateDocumentVersion
WithoutStateCheckCount
The same as getMethodCount("createDocumentVersionWithoutStateCheck").Positive integersNo
CreateDocumentVersion
WithoutStateCheckDuration
The same as getMethodDuration("createDocumentVersionWithoutStateCheck").Positive integersNo
CurrentLoadSystem load average during the last minute. The calculation is depending on the operating system.Positive floating point numbersNo
DocumentTypeStatisticsNumber of documents in the repository per type. Documents that are marked as deleted are included.No
LockedDocumentCountThe number of currently locked documents.Positive integersNo
LoggedInUsersA list of all users that are currently logged in.String array of user namesNo
NumberOfActiveRequestsThe number of current requests to the ContentManager.Positive integersNo
ProfilerSummaryStatistic for every API call concerning the ContentManager.No
PublishDocumentCountThe number of publishing events during the last minute (getMethodCount("publishDocument")).Positive integersNo
PublishDocumentDurationThe average duration of publishing events during the last minute (in ms) (getMethodDuration("publishDocument")).Positive integersNo
ReadAnywhereAvailableInforms, if this server is available in a ReadAnywhere cluster.true/falseYes, via toggleReadAnywhereStatus()
ReplicationModeCurrent replication mode of this Sophora server.NONE, MASTER, SLAVE, STAGINGSLAVEYes, for servers started in cluster mode.
SaveDocumentWithout
PermissionCheckCount
The same as getMethodCount("saveDocumentWithoutPermissionCheck").Positive integersNo
SaveDocumentWithout
PermissionCheckDuration
The same as getMethodDuration("saveDocumentWithoutPermissionCheck").Positive integersNo
SaveSophoraDocumentCountThe same as getMethodCount("saveSophoraDocument").Positive integersNo
SaveSophoraDocumentDurationThe same as getMethodDuration("saveSophoraDocument").Positive integersNo
ServerIdUnique ID of this Sophora server.UUIDNo
ServerVersionVersion number of this Sophora server.Sophora Server version numbersNo
StartDateStartup date and time of this server.Date in format yyyy-MM-dd
HH:mm:ss.SSS
No
ThrottleLoadLimitThreshold to decide on whether to throttle background tasks or not. See also the Throttle Mode documentation.Positive floating point numbers.Yes
ThrottleModeInforms whether the Sophora server is under high load, causing the server to go into throttle mode.1 if the load is high, 0 otherwise.No
resetInvertibleBloomFilters()Erases and again initializes invertible bloom filters, if they are activated.
syncDocuments(String)Synchronizes the documents that are given via their UUIDs to all staging and replication Sophora Replica Servers. Returns an error, if the server this method is called on is not in replication mode MASTER. Multiple UUIDs can be separated with a comma, semicolon or tab.
sendDocumentChangeEvents(String)Sends document changed events for the documents specified by the given UUIDs. Multiple UUIDs can be separated with a comma, semicolon or tab.
getMethodCount(String)Returns the number of method calls to the ContentManager of the given method during the last minute.
getMethodDuration(String)Returns the average duration of method calls to the ContentManager of the given method during the last minute.
removeAllServers()Removes all Sophora Replica Servers that were previously connected to this server.
DeletedDocumentsWorker
JMX-Attribute/JMX-MethodDescriptionPossible ValuesModifiable via JMX
BlockSizeNumber of documents that are collected for removal in each run.Positive integersYes
MinimumAgeInDaysNumber indication how long ago a document's deletion has to be before it is considered by the DeletedDocumentsWorkerPositive integersYes
CronExpressionThe Cron Expression to trigger the DeletedDocumentsWorkerValid Cron ExpressionsYes
startDeletingDocuments()Enables the worker if it has been switched off
stopDeletingDocuments()Disables the worker.
isDeletingDocuments()Informs, whether the worker is currently enabled.
triggerDeletedDocumentsWorker()Run the DeletedDocumentsWorker one time
Indexing
JMX-Attribute/JMX-MethodDescriptionPossible ValuesModifiable via JMX
IndexersLists all Solr indexes that are currently available.Set with each indexes name and UUID.No
IndexQueueSizesProvides information about each index's Solr queue size.A map of Index names and their queue sizes.No
reindexCompleteIndexByName(String)Reindexes the Solr index with the given name, considering a reindex query if it is available.
reindexCompleteIndexByName
WithoutReindexQuery(String)
Reindexes the Solr index with the given name, not considering a reindex query even with one available.
reindexCompleteIndexByUUID(String)Reindexes the Solr index with the given UUID.
reindexDocumentsByQuery(String, boolean)Reindexes the documents that are found by the query. A query might look like this:
@sophora:myproperty='value'.
The query will hit deleted documents as well.

The boolean parameter controls whether the documents to be indexed are added to the indexer's queue (true) or indexed through the indexers fast lane handling (false).
reindexDocumentsByUUID(String, boolean)Reindexes the documents provided by a comma-separated UUID string. Spaces around UUIDs are trimmed. Unparseable UUIDs are ignore.

The boolean parameter controls whether the documents to be indexed are added to the indexer's queue (true) or indexed through the indexers fast lane handling (false).
reindexDocumentsSince(String, boolean)Reindexes all documents modified after this date.
This will cover deleted documents as well.

The boolean parameter controls whether the documents to be indexed are added to the indexer's queue (true) or indexed through the indexers fast lane handling (false).
  • 2021-11-29T13:50:00.000+01:00
  • 29.11.2021 13:50
  • 29.11.2021
LifeCycle
JMX-Attribute/JMX-MethodDescriptionPossible ValuesModifiable via JMX
InitializedSolrCoresAll currently initialized Solr cores.A set of the Solr cores' names.No
InitializingTrue, if the server is currently starting, false otherwise.true/falseNo
IsArchivingWhether the archival process is active.0, if archival is not active
1, if archival is active
2, if archival is active and currently busy
3, if archival is not enabled
No
ReadyThere are 3 criteria:
1. the server can accept client connections
2. the synchronization is finished
3. the staging has not been stopped after the synchronization
To be considered as ready, all servers have to fulfill 1. Servers in mode Sophora Replica Server have to fulfill 2 in addition, staging Sophora Replica Servers have to additionally fulfill criteria 2 and 3.
true/falseNo
SolrInitializedWhether all Solr cores are initialized. A Solr core is initialized, when it was initially synchronized after the server startup.true/falseNo
StartArchival()Starts the archival, if it is enabled1, if the archival is already running
2, if the archival was started
3, if archival is not enabled
StartStaging()Starts the staging, if it is enabled1, if the staging is already running
2, if the staging was started
3, if staging is not enabled
StopArchival()Stops the archival.1, if the archival was not started
2, if the archival was stopped
3, if archival is not enabled
StopStaging()Stops the staging.1, if the staging was not started
2, if the staging was stopped
3, if staging is not enabled
Stop()Stops the archival and the Sophora Server.

Last modified on 10/16/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon