Difference between revisions of "Registry Properties File"
(→Loading the Properties File) |
(→Changing the location of the properties file) |
||
| Line 35: | Line 35: | ||
And the file is likely to be located at: <code>C:\Windows\System32\config\systemprofile\MetadataTechnology\FusionRegistry</code> | And the file is likely to be located at: <code>C:\Windows\System32\config\systemprofile\MetadataTechnology\FusionRegistry</code> | ||
| − | == | + | == Using the System Environment Variable == |
| − | + | Using a System Environment Variable to specify the home location can be useful, particularly if you wish to run multiple Registries on a single server. | |
| − | To specify a new location you need to set a Java System variable called “RegistryProperties” to the URI value of the location where you wish the properties file to be | + | To specify a new location you need to set a Java System variable called “RegistryProperties” to the URI value of the location where you wish the properties file to be. Otherwise the easiest way to achieve this is to create a new file called setenv.bat (or setenv.sh on Unix environments) and place it in the Tomcat’s bin directory. The contents of this file should state the full location of the properties file which must be in the URI format. To illustrate this: |
<code>SET JAVA_OPTS=-DRegistryProperties=file:///c:/dir/AFile.txt</code> (For Windows systems) | <code>SET JAVA_OPTS=-DRegistryProperties=file:///c:/dir/AFile.txt</code> (For Windows systems) | ||
Revision as of 10:03, 12 January 2026
Contents
Overview
Most of the information that the Registry requires for operation, such as the Structural Metadata and configuration information, is stored in a database. The Registry Properties file contains the connection details for that database. When the Registry starts, one of its initial tasks is to load the Properties file and establish the database connection.
The Registry automatically generates the Properties file the first time it runs. Unless an environment variable specifies a different name, the file name is "fmr.properties".
Because some values in the Properties file are encrypted, it should not be manually edited unless you have been specifically instructed to do so.
Loading the Properties File
The Properties file is read, only during Registry start‑up. Any changes made while the Registry is running will not take effect until the next restart.
- In FMR version 11, the default location is:
<user home>\MetadataTechnology\FusionRegistry - In FMR version 12, the default location is:
<user home>\SDMX_IO\FMR
Alternative locations can be used if required. When locating the Properties file, the FMR checks several locations in sequence. Initially it checks for a system environment variable ("RegistryProperties") that may specify an absolute file path. If this is not set, it then checks the WEB-INF/classes directory.
The search order is:
- Check the environment variable
- Check the WEB-INF/lib folder
- Check the "Registry Home" location
If no properties file is found, a new file will automatically be created in the "Registry Home" location.
If you are unsure about which of the files Fusion Metadata Registry is using to obtain system information, please look at the start-up log in your web application server. There will be entries like the following:
INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from class path resource [fusion_registry.properties] INFO localhost-startStop-1 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from URL [file:/C:/Users/<username>/FusionRegistry/fusion_registry.properties]
Tomcat as a Windows Service
If you are running Tomcat as a Windows service, then the Home directory is likely to be: C:\Windows\System32\config\systemprofile
And the file is likely to be located at: C:\Windows\System32\config\systemprofile\MetadataTechnology\FusionRegistry
Using the System Environment Variable
Using a System Environment Variable to specify the home location can be useful, particularly if you wish to run multiple Registries on a single server.
To specify a new location you need to set a Java System variable called “RegistryProperties” to the URI value of the location where you wish the properties file to be. Otherwise the easiest way to achieve this is to create a new file called setenv.bat (or setenv.sh on Unix environments) and place it in the Tomcat’s bin directory. The contents of this file should state the full location of the properties file which must be in the URI format. To illustrate this:
SET JAVA_OPTS=-DRegistryProperties=file:///c:/dir/AFile.txt (For Windows systems)
export JAVA_OPTS=-DRegistryProperties=file:///dir/AFile.txt (For Unix systems)
It is important to note that FMR will NOT start if this value is incorrect or if this file cannot be created.
To check that this value is being used by the system, check the Registry log during Registry startup and look for a line similar to the following:
Property RegistryProperties has been specified as file:///c:/dir/AFile.txt
File Contents
The file stores three pieces of information:
- Database connection details
- Directory to use to store temporary files
- Root user credentials
The file looks like this in Version 10
#Modified on Fri Mar 27 07:58:12 GMT 2020 #Fri Mar 27 07:58:12 GMT 2020 database.dialect=org.hibernate.dialect.MySQL55Dialect database.driver=com.mysql.cj.jdbc.Driver database.password=oMPSQtPj37lo1hrttvAhkQ\=\=metatech database.url=jdbc\:mysql\://localhost\:3306/registry_datbabase database.useCustomString=false database.username=root java.tmp=C\:\\Tomcats\\Tomcat-7.0.56-Registry-8080\\temp security.auth.prov=registry security.password=$2a$10$fhuzUaxFXv/qEN2hhuEc6O1FKUyHynebocAmWGyayAFPWfweMkpM. security.username=root
The file looks like this in Version 11
#Modified on Tue Dec 14 13:42:46 GMT 2021 #Tue Dec 14 13:42:46 GMT 2021 database.dialect=org.hibernate.dialect.MySQL55Dialect database.driver=com.mysql.cj.jdbc.Driver database.password=U8q7WdGf5jNUOOHWXXoXVQ\=\= database.url=jdbc\:mysql\://localhost\:3306/registry_datbabase database.useCustomString=false database.username=root encrypt.password=820619a9-ef55-49e5-beb8-17a1a66b797e encrypt.salt=94ff1c84-2498-44e3-9b2b-cf4b8c7f8bf6 security.password=$2a$10$lZzxmR1rDOxgjufIO8U7Rep1Z3wXFts85LOt/BdVRhoaWFM.xRuKi security.username=root
Passwords are encrypted using AES-256 encryption.
Values can be directly modified in the properties file, however an application restart is required for these changes to take effect. The Fusion Registry User Interface provides an Admin UI to modify any settings (including ones stored in the Registry database) and should be used over direct modification to the file if possible.
What Happens if the properties file is deleted?
If the properties file is deleted, fear not. On application server restart, the Fusion Registry will redirect to the Install wizard. Upon entering the connection details to the database that was previously used, the Registry will detect it is already installed and redirect to the home page. If the database connection is to a new database, then the remainder of the install wizard should be completed to re-install the product.