This documentation relates to an earlier version of FishEye.
View

Unknown macro: {spacejump}

or visit the current documentation home.

Environment variables are system-wide settings that are required for certain applications.
The environment variables used by FishEye are listed in the following table:

On this page:

Environment variableNotes
JAVA_HOME

Used by FishEye to select the Java Virtual Machine (JVM) to be used to run FishEye. If this environment variable is not set, FishEye will use whatever Java executable is available on the path. In Linux systems, this may sometimes be GCJ-based which causes some problems running FishEye.

See the instructions on setting JAVA_HOME.

If you're using the wrapper to start Fisheye on Windows, then wrapper will use the java in your PATH instead of using the JAVA_HOME. We recommend that JAVA_HOME should point to the java executable in your PATH

FISHEYE_OPTS

Used to pass parameters to the Java Virtual Machine (JVM) used to run FishEye. This is typically used to set the Java heap size available to FishEye (see Fix out of Memory Errors).

With a Sun JVM, for example, you would use:

FISHEYE_OPTS=-Xmx1024m -XX:MaxPermSize=128m

This would give FishEye a max of 1024 MByte heap, a Max permanent generation size of 128m. See Tuning FishEye for more information.

You can also use FISHEYE_OPTS to set various System Properties in FishEye. For example:

FISHEYE_OPTS=-Dname.of.property=value

After having set the FISHEYE_OPTS and restarting your server, go to Administration > Sys Info/Support > System Info, and check your JVM Input Arguments to ensure that your server is picking up your FISHEYE_OPTS as expected.

FISHEYE_ARGSFISHEYE_ARGS are the arguments which will be passed to FishEye when it is started. You can set this to --debug, for example, or --debug-perf if you always want to have FishEye debugging put into the FishEye log files.
FISHEYE_LIBRARY_PATHUsed to tell FishEye where it should look to load any additional native libraries.
FISHEYE_INST

Used to tell FishEye where to store its data. If you wish to separate FishEye's data from its application files in FISHEYE_HOME, you should use this variable. For example:

c:\path\to\fisheye_data   (no trailing backslash)

(info) Read more about using FISHEYE_INST in the Installation Guide.

Setting environment variables under Windows XP

(If you are running Fisheye as a windows service you need to refer to the instructions here)
(Linux instructions are here)

1. Click Start > Control Panel > System.

Screenshot: System Properties under Windows XP Control Panel

2. Click the Advanced tab.
3. Click the Environment Variables button.

Screenshot: Environment Variables under Windows XP Control Panel

4. Click New.
5. In the Variable name field, enter the name of the environment variable, for example:

FISHEYE_OPTS

6. In the Variable value field, enter the setting as required. This may be quite cryptic, for example the default value for FISHEYE_OPTS is this:

-Xmx256m

Screenshot: Setting Environment Variables under Windows XP

7. Restart the computer.

Setting environment variables for Windows Services

Please note, that if you run as a service, then any environment variables that you want to set need to be set in your FISHEYE_HOME/wrapper/conf/wrapper.conf file.

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

# JDK 1.5 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.authenticate=false
wrapper.java.additional.9=-Dcom.sun.management.jmxremote.password.file=./wrapper/jmxremote.password
wrapper.java.additional.10=-Dwrapper.mbean.name="wrapper:type=Java Service Wrapper Control"

For example if you wish to add a FISHEYE_INST environment variable or add the java parameter "MaxPermSize", or the -Xrs options (should be used if running FishEye as a service under Windows, to prevent the JVM closing when an interactive user logs out) then it would be something like:

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

Your memory settings can also be found in this file:

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

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

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

Setting environment variables under Linux or Mac

There are a number of ways to set environment variables on Linux or UNIX based systems (including Mac OS X). Here are just two:

For your current user:

1. Open up a shell or terminal window
2. Type this command:

vi ~/.profile 

(vi is a text editor, you can use another if desired)
3. Add this command:

export (variable name)=(variable value)

Where (variable name) and (variable value) are the environment variable elements. For example, if the environment variable you are setting is FISHEYE_OPTS, and the variable value is -Xmx256m, you would type the following:

export FISHEYE_OPTS=-Xmx256m

Add this command on its own line at the end of the file.
4. Save, and restart your shell.

For all users in the system:

1. Open up a shell or terminal window
2. vi /etc/profile (replace vi with your favourite text editor)
3. Add export (variable name)=(variable value) on its own line at the end of the file
4. Save, and restart your shell

If you are using a GUI, you may not need to open up the shell. Instead, you might be able to open the file directly in a graphical text editor.

(info) If you are experiencing memory errors in FishEye, see Fix Out of Memory Errors.

5 Comments

  1. MattS

    FECRU Version:2.1.2 Build:build-444 2009-11-18 has a new way of setting FISHEYE_OPTS that has to be commented out to allow your own settings to take effect.

    1. Conor

      Matt,

      FishEye does have a new way of setting FISHEYE_OPTS but it should not affect your own settings. A small utility now checks whether FISHEYE_OPTS contains any memory settings. When these are not present, FishEye adds a reasonable default. If these settings are present, FishEye does not change the value. The settings that are added if not present are:

      • -Xmx
      • -XX:MaxNewSize
      • -XX:MaxPermSize

      The utility only ever adds settings to FISHEYE_OPTS. Any settings you have that are not related to memory should be unaffected. The updated FISHEYE_OPTS value is then used for the rest of the launch script. You can set the environment variable FISHEYE_DONT_OVERRIDE to prevent this utility from changing the value of FISHEYE_OPTS.

      If you've had a problem and things haven't worked as I've described, we'd like to know more (environment info, what went wrong, etc)

  2. Anonymous

    I found that I had to set -Xms512m to get the total memory in the system info screen to go up. Setting Xmx did not update total memory.

    1. Tom Davies

      'total memory' is the current amount of memory allocated for the heap (some of which will be used, and some of which will be unused). This starts at the value given to -Xms and then increases as the JVM allocates more heap, ending up at the value given to -Xmx. So changing -Xmx won't immediately change the value reported for total memory.

  3. Anonymous

    A tip for Linux users running as a service. Add the options to your init script, not to the .profile or other shell related profiles.