Running FishEye as a Windows service

For FishEye 3.4 and later, 32-bit and 64-bit Windows installers are available. Each installer sets up the service wrapper, adds FishEye as a Windows service, and starts the service, automatically.

The installer is the recommended way to install FishEye as a service on Windows. See Installing FishEye on Windows.

If you use the FishEye installer for Windows, you can edit JVM settings using the tool included with the installer. See Setting JVM system properties for more information.

The content on this page describes the old, deprecated method of configuring FishEye as a Windows service, and is only retained here for informational purposes.

On this page:

Running FishEye as a Windows service

FishEye can be run as a service under Microsoft Windows using a Java Service Wrapper.

The service wrapper provides the following benefits:

  • Allows FishEye, which is a Java application, to be run as a Windows Service.
  • No need for a user to be logged on to the system at all times, or for a command prompt to be open and running on the desktop to be able to run FishEye.
  • The ability to run FishEye in the background as a service, for improved convenience, system performance and security.
  • FishEye is launched automatically on system startup and does not require that a user be logged in. 
  • Users are not able to stop, start, or otherwise tamper with FishEye unless they are an administrator.
  • Provides advanced failover, error recovery, and analysis features to make sure that FishEye has the maximum possible uptime.

(warning) Please note that:

  • This page should be read in conjunction with Installing FishEye on Windows.
  • You should use 32-bit Java to run the service wrapper provided via the link in the install instructions below, even on a 64-bit machine. (64-bit Java will not work with the 32-bit wrapper. There is no 64-bit community "free" version of the service wrapper.)
  • You should use the Java JDK, rather than the JRE, to take advantage of the -server parameter, provided in the Wrapper configuration of wrapper.zip, which enables the Java HotSpot(TM) Server VM. See the note below for details.

Installing the Java Service Wrapper

To install the Java Service Wrapper on Windows:

  1. Download wrapper.zip from here.
  2. Unzip the wrapper zip file into your <FishEye install directory> (that is, the directory into which FishEye was originally installed). Note, the resulting folder structure should be <FishEye install directory>\wrapper or  <FishEye install directory>\wrapper\bin, etc and NOT <FishEye install directory>\wrapper\wrapper or <FishEye install directory>\wrapper\wrapper\bin. The location of the wrapper directory is important.
  3. Tell the wrapper where to find the Java JDK by editing the <FishEye install directory>\wrapper\conf\wrapper.conf file, replacing this:

    # Java Application
    wrapper.java.command=java

    with the following, and comment out the option you don't wish to use:

    # Java Application
     
    # Option 1: If you have JAVA_HOME defined in your Windows system environment variables (for example, if JAVA_HOME is defined as C:/Java/bin, then you can use:
    wrapper.java.command=%JAVA_HOME%/java 
     
    # Option 2: If you have multiple JDKs installed, and you don't want to use a Windows environment variable to specify which one to use, provide the absolute path to where the JDK is installed (e.g. C:/Java/jdk1.7.0_05/bin/java):
    wrapper.java.command=C:/<path to Java location>/bin/java
    

    To get confirmation in the wrapper log that the wrapper is using the correct Java JDK, add the following lines to the wrapper.conf file:

    # Tell the Wrapper to log the full generated Java command line.
    wrapper.java.command.loglevel=INF

    You can find the logs at <FishEye install directory>\var\log\wrapper.log.

  4. Set the FISHEYE_INST environment variable (and other FishEye-specific environment variables) in the <FishEye install directory>\wrapper\conf\wrapper.conf file, following the instructions below.
  5. Install FishEye as a service as follows:
    1. Open an Administrator command prompt by searching for 'Command prompt' in the Windows Start menu, right-clicking on Command Prompt and then choosing Run as administrator.
    2. Change directory to <FishEye install directory>\wrapper\bin and run Fisheye-Install-NTService.bat. If you run into any problems starting the wrapper, you'll find its logs in <FishEye install directory>\var\log\wrapper.log.
  6. Start the Fisheye service under the Windows Control Panel; you can search in the Start menu for 'services', and in the list of services, right-click on the 'FishEye' item and choose Start. You can also stop the FishEye service in this way.

(info) Please note that:

  • If you make changes to the wrapper.conf file, having already started the service, you need to stop and then restart the service for it to make use of the changed configuration.
  • If in future you move the FishEye install directory, you will need to uninstall (using Fisheye-Uninstall-NTService.bat) and then reinstall the FishEye service.

Setting FishEye environment variables for Windows Services

Please note, that if you run FishEye as a Windows service, any FishEye-specific environment variables must be set in your <FishEye install directory>\wrapper\conf\wrapper.conf file.

If you run into any problems starting the wrapper, you'll find its logs in <FishEye install directory>\var\log\wrapper.log.

If there are other Java parameters you wish to add, then you will need to add them under the additional parameters section, e.g.

# JDK Additional Parameters for jmx
wrapper.java.additional.4=-Dcom.sun.management.jmxremote
wrapper.java.additional.5=-Dcom.sun.management.jmxremote.port=4242
wrapper.java.additional.6=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.7=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.8=-Dcom.sun.management.jmxremote.password.file=./wrapper/jmxremote.password
wrapper.java.additional.9=-Dwrapper.mbean.name="wrapper:type=Java Service Wrapper Control"

wrapper.java.additional.10=-XX:PermSize=256m

To add the FISHEYE_INST environment variable, the Java MaxPermSize parameter, or the -Xrs options, use the following:

wrapper.java.additional.11=-Dfisheye.inst="c:/path/to/FISHEYE_INST"
wrapper.java.additional.12=-XX:MaxPermSize=128m
wrapper.java.additional.13=-Xrs

Note that the the -Xrs options should be used when running FishEye as a service under Windows to prevent the JVM closing when an interactive user logs out.

Your memory settings can also be found in this file:

# Initial Java Heap Size (in MB)
wrapper.java.initmemory=256

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024

Increase these values if you have a large repository or expect to use more memory (init of 256, and a max of 1024 are the default values).

In Fisheye/Crucible 1.6.4 and higher, you can check the JVM input arguments by clicking System info, under 'System Settings' in the admin area.

Troubleshooting

Extracting files from wrapper.zip

Some customers have reported trouble running the wrapper. These can be avoided by:

  • Uncompressing wrapper.zip with Winzip or WinRar rather than using the Extract All command in the Windows right-click contextual menu.
  • If the wrapper.zip filename appears green instead of black in Windows Explorer, decrypt it, prior to unzipping its contents, by right-clicking on the file, choose Properties, click the Advanced button, then clear the Encrypt contents to secure data checkbox.

Warning when using 64-bit Java JDK

When using a 64-bit Java JDK with the wrapper obtained via the link in the install instructions above, you will see the following in the wrapper.log file, and the service won't start:

WARNING - Unable to load the Wrapper's native library 'wrapper.dll'. The file is located on the path at the following location but could not be loaded: C:\installs\service\fisheye28\wrapper\lib\wrapper.dll.

Please verify that the file is readable by the current user and that the file has not been corrupted in any way. System signals will not be handled correctly.

This is caused by using a 64-bit JDK (even on a 64-bit machine). Changing to a 32-bit version of the JDK will prevent this warning. Community Edition versions of the 64-bit Windows Java Service Wrapper are not currently available.

Wrapper configuration and "-server" parameter

Please note that the wrapper configuration provided above uses the -server parameter to enable the Java HotSpot(TM) Server VM. This feature is only available if you use the JDK. If you use the JRE you will likely get the following error in your logs:

INFO | jvm 1 | 2010/12/20 18:19:28 | Error: missing `server' JVM at `C:\Program Files\Java\jre6\bin\server\jvm.dll'.

A common issue is that customers remove the -server parameter from the wrapper.conf file. Please note that if you do this, the wrapper script will ignore any of the following JVM parameters in the file unless you change the sequence to be in order, starting from wrapper.java.additional.1. This is an issue with the wrapper application.

In this situation it's best to install and run Fisheye/Crucible with the JDK to get all the advantages of the -server functionality. You also need to force the wrapper to use the JDK by specifying the path to the Java JDK in the wrapper.conf file, as described in the installation instructions above.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport