.
This knowledge base article provides instructions for running the Sonatype IQ Server as a service under Windows using a free edition of Java Service Wrapper.
New Sonatype IQ Server installed as a Windows Service
- Ensure you have already installed a supported JDK on the target system and the system meets our other system requirements.
- Download and extract the clm-jsw.zip file attached to this article into a directory path that does not contain spaces.
- Replace the extracted
./conf/config.yml
with the config.yml file from the current server installation.- Check the "sonatypeWork" property in the copied version to make sure it is correct
- Check the "sonatypeWork" property in the copied version to make sure it is correct
- Copy the nexus-iq-server-<version>.jar file from your installation into the
./lib/
directory.- Only one jar file should be in the library directory, do not leave older server jar files
- Do not copy the CLI file, only copy over the server jar.
- The service will run as the SYSTEM user. The server requires the use of a temporary directory to perform some work.
The SYSTEM user will use%systemroot%\System32\config\systemprofile\Temp
as its temporary directory.
On some versions of Windows, this directory does not exist by default. Create it manually if it does not.
- Using an administrative user, run
.\bin\clm install
- Using an administrative user, run
.\bin\clm start
to start the service, or start it through the services UI
- Verify that on restarting the host, the application will successfully restart itself.
Change the Java executable used to launch the server
To explicitly specify the path to the java.exe executable to use to launch the server, instead of just relying on the location in the JAVA_HOME environment variable:
- Edit
./bin/jsw/conf/wrapper.conf
- Find the uncommented line containing
wrapper.java.command=java
and change its value to include the absolute path of the Java executable, using forward slashes as path separators even on Windows.
Example:wrapper.java.command=F:/Software/Java/jdk-11.0.15/bin/java.exe
See Java Service Wrapper documentation
Edit the Java program arguments used to launch the server
You may want to edit the Java.exe arguments used when the server is launched. These are not parameters to the server, but rather parameters for the Java Virtual Machine (JVM).
To change arguments passed to the java.exe program:
- Edit
./bin/jsw/conf/wrapper.conf
- Find the references to
wrapper.java.additional.<n>
properties - add or remove lines with new properties according to the Java service wrapper documentation
Example: Configure a custom outbound truststore
To override the default Java truststore:
- Edit
./bin/jsw/conf/wrapper.conf
- Specify
wrapper.java.additional.<n>
properties defining the trustStore and its password. Make sure all paths specified use forward slashes, even on windows and if the value requires a space, then the entire value must be in quotes.
wrapper.java.additional.4=-Djavax.net.ssl.trustStore=/<replace_with_absolute_full_path>/nexus-iq-server-outbound.jks
wrapper.java.additional.5=-Djavax.net.ssl.trustStorePassword=changeit