If you are unable to locate the Apache Tomcat directory, contact our Support for assistance.
The database connection URL can be located in one of two places, depending on whether your
installation of TrustView is configured to use JNDI or not.
Depending on the type of database, the connection URL may need to be adjusted, but it can also change if the driver type is changed.
Step 2a (JNDI case)
If your installation is using JNDI for database configuration, the file Tomcat-install-dir/conf/context.xml
contains the JDBC URL in the URL attribute of the Resource element, e.g.:
Finally, you must restart the Apache Tomcat service for the change to take effect.
TrustView is now connecting to the database on the new database host.
Copy the file mssql-jdbc_auth-<version>.x64.dll to C:\ProgramFiles\EclipseAdoptium\jdk-<version>\bin
Copy the file mssql-jdbc-<version>.jre8.jar to C:\ProgramFiles\ApacheSoftwareFoundation\Tomcat9.0_TrustView\lib
Important
The directories may differ depending on where your TrustView and Java installation folders are placed.
The Java used may also not be EclipseAdoptium, but another version, and therefore the directory
may be named differently, but the jre and bin folder, should still be present.
Replace the line with the default Java JDBC driver class in the context.xml file, located in the conf folder, to Microsoft:
Finally, the Apache Tomcat service must be restarted for the changes to take effect.
TrustView will now be connecting to the database, on the database host with the Microsoft JDBC drivers.
If the following error is seen in the TrustView logfile:
Error message that may occur during the establishment of the database connection#
The following options should be added to the JDBC URL:
Error message that may occur during the establishment of the database connection#
1encrypt=true;trustServerCertificate=true
In some instances, it may also be necessary to remove the user=dbuser and password=dbpassword from the JDBC URL,
if it has trouble connecting with the Microsoft JDBC drivers.
If you want to use gMSA (Group Managed Service Accounts) for the TrustView database connection,
you can do so by setting up such an account gMSA overview.
Next you need to attach it to the TrustView service by adding it under LogOnThisaccount under Properties of the service.
Then you need to update the JDBC URL found in the context.xml file in the conf directory.
Remove the lines with Username and Password from the context.xml file, as that is not necessary with a gMSA.
The Authentication scheme of authenticationScheme=NativeAuthentication and authenticationScheme=JavaKerberos can be used.
Just select one of the methods.
When using the logback.xml file, the Apache Tomcat Windows service does not need to be restarted.
It will automatically reload itself within minutes. The logback.xml file only needs to be saved after the changes.
If you are using the groovy-based logback configuration (logback.groovy), locate the file and add the following:
Example of how to add the appender in the logback.groovy configuration file#
When using the groovy-based logback configuration (logback.groovy), the Apache Tomcat Windows service must be restarted,
after the changes have been completed and saved.
TrustView uses Apache Tomcat to host the application and therefore it is possible to assign a SSL certificate to the application.
First, locate the Tomcat installation directory, typically:
If you are unable to locate the Apache Tomcat directory, contact our Support for assistance.
The SSL certificate is specified in the Tomcat Apache server.xml configuration file
Tomcat-install-dir\conf\server.xml.
In the file, you must locate the Connector element matching the port your TrustView is running on, typically 443 or 8443.
It is recommended to have a backup of the server.xml file before modifying it.
Now update the following attributes of the Connector element to match the renewed certificate:
keystoreFile
keystorePass
If the new certificate is available in JKS format instead of PKCS12 format, make sure that keystoreType is set to JKS instead of PKCS12.
If the new SSL certificate is in PFX format, the keystoreType still needs to be set to PKCS12.
Finally, you must restart the Apache Tomcat service for the change to take effect.
The version must be based on the relevant major Java version of the package type JDK.
See the Java requirements in the table above for the specific version needed, depending on the
version of TrustView you are currently running.
Choose the .msi version and run it to install it on the server, where TrustView is installed.
Once installed, go to the bin folder of the Apache Tomcat directory: C:\ProgramFiles\ApacheSoftwareFoundation\Tomcat9.0_TrustView\bin
and open/run the application file called TrustVieww.exe.
Under the Java tab, the section named JavaVirtualMachine, must have the path changed to the path of the jvm.dll file of the newly installed Java version.
The path can vary, but usually it can be found under the Java directory by following this path: ...\jre\bin\server\jvm.dll.
Once the new jvm.dll file has been selected, apply the changes and restart the Apache Tomcat Windows service, to get TrustView to use the newly installed Java version.
Tip
If you want to verify that the changes has been applied, you can see the Java version used by TrustView,
by logging into TrustView and going to Settings and then at the bottom of the page under Systeminfo.
Important
If you are only using a TrustView login with local users, this step is not required.
If you are using AD login for TrustView, you need to update your cacerts (the keystore) file in the conf folder of the Apache Tomcat installation directory to match the new Java version installed.
This is needed if TrustView is moved to a new major release of Apache Tomcat, but also if you need to move your TrustView instance to another server, or
update Tomcat because of a potential vulnerability. In that case, a clean installation will then be necessary, on the newly appointed server to host TrustView.
To update the Apache Tomcat application used to run TrustView, follow these steps:
Important
It is highly recommended to create a backup of the old Apache Tomcat directory before proceeding, just in case.
To backup the Java options for the Tomcat configuration, you need to go to C:\ProgramFiles\ApacheSoftwareFoundation\Tomcat9.0_TrustView\bin
and open trustvieww.exe and go to the Java tab. Under JavaOptions - copy the content to a text editor to back it up, since
the trustvieww.exe can’t be opened again, once the Tomcat service has been removed.
Download the new Apache Tomcat version from here.
Choose major version 9, but minor versions may vary depending on releases - so simply choose the newest minor version available.
Download the .exe file, by choosing the 32-bit/64-bitWindowsServiceInstaller under the Binary Distributions segment of the download page.
Once all the relevant files have been moved from the old Apache Tomcat directory, to the new one, you can delete the old directory and
the old Apache Tomcat Windows service, by using this command in a Command Prompt (with administrator rights):
sc delete<serviceName>
Tip
The name of a Windows service, can always be found under Properties of the specific service.
Ensure that the service of the new TrustView instance has Startup type set to Automatic(StartDelayed).
It is also recommended to setup a recovery method for the service, which can be done under Properties Recovery
and by setting the First, Second and Third failure to RestarttheService. Then finish by setting
Resetfailcountafter to 1 days and clicking apply before starting the service.
Once the new Apache Tomcat version has been downloaded, install the new Apache Tomcat version and name the service (during the installation setup) TrustView.
The old version, containing the current relevant files, is listed below:
TrustView.groovy (located in the lib directory)
context.xml (located in the conf directory)
server.xml (located in the conf directory)
logback.xml (located in the conf directory)
.war file (located in the webapps directory)
Note
The webapps directory should always only contain a single .war file.
Optional files, depending on your setup (and if you have the files):
cacerts (located in the conf directory and used for AD login)
Any SSL certificates (located in the conf directory and used for the https connection)
Needs to be moved over in the corresponding directories of the new Apache Tomcat installation directory, once that version has been installed.
Important
The Microsoft JDBC drivers, used for the database connection, also needs to be moved or reinstalled, when a new version of Apache Tomcat is installed.
See what files to move or how to install the Microsoft JDBC drivers here: Installing Microsoft JDBC drivers
After the installation of the new Tomcat has been completed and the relevant files has been moved over, go to the bin directory and open the TrustVieww.exe file.
Go to the Java tab in the dialogue box and at the bottom, set the HEAP memory:
Initial memory pool - 512 MB
Maximum memory pool - 2048 MB
Note
The HEAP memory pool is based on the available RAM on the server, where TrustView is installed,
so the maximum value, can be increased if necessary.
In the JavaOptions, add this line if it is missing:
If you are unable to locate the directory, contact our Support for assistance.
Open the TrustView.groovy file with a text editor (Notepad++ can be recommended)
and locate the following lines at the end of the file:
Example of SMTP server setup in the TrustView configuration file#
1grails{2mail{3host="smtp.company.com"4}5}
Change the smtp.company.com part of the hostname to the new name of your SMTP gateway address and save the TrustView.groovy file.
Restart the Apache Tomcat service for the change to take effect, and the SMTP gateway address will now be updated.
The support mail is used as the sender of the notification mails, that are sent from TrustView,
but also as the recipient mail when pressing forgotpassword on the login screen.
Note
It is recommended to change the support mail address in TrustView to fit your organization.
Locate the TrustView.groovy file in the TrustView installation directory, typically:
Directory path of the TrustView configuration file#
When TrustView makes a database update, Liquibase reads from the DATABASECHANGELOG table in the database to determine which changesets need to run.
To avoid conflicts between concurrent updates, which can happen if multiple changes happens at the same time, for the same database instance.
If TrustView make another update during this time, Liquibase waits until the lock releases before running it.
This example shows how the database change log lock should be displayed in a trustview-logback-xxxx-xx-xx.log file if it was acquired successfully:
There are several ways of clearing or unlocking the change log lock in the TrustView database:
Drop or delete the DATABASECHANGELOGLOCK table in the TrustView database; it will then be recreated, and the lock will be released
after you restart the TrustView Tomcat service.
There may be cases where you need the trustview-xxxx-xx-xx.log file for troubleshooting or we need it to provide support if we do not
have direct access to the server for your TrustView installation.
The log file can typically be found in this location, depending on the TrustView directory name:
The log file can be opened with any text editor but Notepad++ can be recommended.
It is also possible to send specific log files, directly from TrustView to our backend, instead of locating the log files manually.
Go to the Support section, found in the top right corner of TrustView.
Under SendlogfilestoTrustSkills, you can select all the available log files that are relevant for the situation and then press
SendtoTrustSkills to send the selected log files to our backend.
Note
It requires a user of the role Superuser or GlobalAdministrator, to be able to access this and send the log files.
If the passwords included in the xml and groovy files contain the & symbol, the Apache Tomcat service will not start and the symbol must be escaped
or the password changed, so it does not contain the & symbol.
To escape the symbol, replace & with &.
2.14. Use certificate and key from Microsoft certstore in Apache Tomcat#
Click here for detailed steps
We recommend using minimum Windows Server 2016
The following is specified in the Tomcat Apache server.xml configuration file, located in Tomcat-install-dir\conf\server.xml.
Update and/or add the following in the server.xml to match your configuration:
keyAlias=”friendly name of the cert”
keystoreType=”Windows-root or Windows-MY”
keystoreFile=” “
keystorePass=” “
KeyAlias can be found in mmc-certificate-properties-friendlyname.
Note
There are multiple keystoreType for the Windows connector configuration.
Windows-MY and Windows-Root, depending on where the certificate is located.
Windows-MY - System Accounts Personal certificate store
Windows-Root - Trusted Root CA store
Because Tomcat is running as a service you will need to use Windows-Root and place the certificate in the TrustedRootCAstore
or set the certificate into System accounts Personalcertificatestore and use Windows-MY. It won’t work with myuser account or computer account for this.
Tip
Ensure your certificates are in the correct store by running certmgr.msc.
Go to the Java tab and adjust the Heap memory section in the bottom to meet your needs.
It is recommended to set the minimum Heap memory stack to 512 and the maximum to 2048 or more, depending on the available
amount of GB of RAM on the server, that can be allocated to the use.