Windows 2003: Page 2

[frs-280] Setting VM Options via FRAPI


Setting VM Options via FRAPI

The Sun Java VM (JVM) offers many options to allow the user to control how the VM behaves. The HeapDumpOnOutOfMemoryError option for example is very useful if your server is suffering from heap memory problems and crashing.

By turning on HeapDumpOnOutOfMemoryError the JVM will create a dump file when java.lang.OutOfMemoryError is thrown that can be used in Memory Analysis tools such as MAT to track down memory problems.

A list of VM manageable runtime options includes:

Option Description
-XX:-HeapDumpOnOutOfMemoryError Dump heap to file when java.lang.OutOfMemoryError is thrown
-XX:-PrintClassHistogram Print a histogram of class instances on Ctrl-Break
-XX:-PrintConcurrentLocks Print java.util.concurrent locks in Ctrl-Break thread dump
-XX:-PrintGC Print messages at garbage collection
-XX:-PrintGCDetails Print more details at garbage collection
-XX:-PrintGCTimeStamps Print timestamps at garbage collection

Typically these options are added to the command line that starts the VM in the form of -XX:<optionname>.

There are however major problems with this:

  • Typically you have to edit the file that sets the command line options (e.g. jvm.conf) to change the settings.
  • If the -XX command line option wasn't added to the command line options at start-up then you can't set the option without restarting the server

Using FRAPI

It would be great if you control these VM options using code instead of the command line. FRAPI is a powerful and easy to use API that allows you to take control of FusionReactor programatically. Using FRAPI you can change the running configuration of FusionReactor or add extra debugging information to requests using just a few lines of code. We can also use FRAPI to set any "Managable" VM Option on the Sun JVM. (take a look at the following VM Options for details of all of the VM Options and look for "Manageable").

CFML
<cfset frapi = createObject("java", "com.intergral.fusionreactor.api.FRAPI").getInstance()>
<cfset frapi.setVMOption("HeapDumpOnOutOfMemoryError","true")>
<cfset frapi.setVMOption("PrintConcurrentLocks","true")>
<cfset frapi.setVMOption("PrintGCDetails","true")>   
JSP
<%@ page import="com.intergral.fusionreactor.api.*" %>
<%
    FRAPI frapi = FRAPI.getInstance();
    frapi.setVMOption("HeapDumpOnOutOfMemoryError","true");
    frapi.setVMOption("PrintConcurrentLocks","true");
    frapi.setVMOption("PrintGCDetails","true");   
%>

Requirements

You must be using a version of FRAPI that includes the setVMOption method (introduced in FRAPI 4.0) and a Sun JVM 1.5 or higher.

Notes

  • Due to a Bug in Java the HeapDumpPath VM Option may throw a NullPointerException and typically cannot be used.
  • Only VM Options that are known as "Manageble" can be set/changed at runtime. Manageable means that the option is dynamically writeable through the JDK management interface.

Summary

FRAPI is a easy way to set powerful VM Options while the server is running, without having to restart the server or edit configuration files.

Issue Details

Type: DevNet
Issue Number: FRS-280
Components: FRAPI
Environment:
Resolution: Fixed
Last Updated: 03/Nov/11 5:35 PM
Affects Version: 4.0.0
Fixed Version: 4.0.0
Server:
Platform: Windows XP, Windows 2000, Windows 2003, Linux, MacOS, Solaris, Windows Vista, Windows x64, AIX, Windows 7, Windows 2008
Related Issues:

FRS-232: Capturing ColdFusion’s Debug Output in FusionReactor

[frs-303] Silent Install for FusionReactor


Silent Install

To perform a silent install of Fusion Reactor use the following steps:

  1. Create a file called response.varfile
  2. Place the following two lines in the varfile :
    password=yourPassword
    passwordValidation=yourPassword
    
  3. From the command line run a similar command to the following:
    "C:InstallersFusionReactor_windows_4_5_2.exe" -q -dir"C:FusionReactor" -varfile response.varfile
  • The first part "C:InstallersFusionReactor_windows_4_5_2.exe" is the location of the installer
  • -q is the switch to install silently
  • -dir"C:FusionReactor" is the location that FusionReactor will be installed to
  • -varfile response.varfile is to specify to use the created varfile

Once all the previous steps are complete you can use FRAM (default port 8087) to install Fusion Reactor into your instances, documented here: http://docs.intergral.com/display/FR40/Install+FusionReactor+Instance

If that is not an option, you can follow the manual installation steps, documented here: http://docs.intergral.com/display/FR451/Manual+Instance+Installation

Issue Details

Type: Technote
Issue Number: FRS-303
Components: Installer
Environment:
Resolution: Fixed
Last Updated: 30/Nov/12 2:53 PM
Affects Version:
Fixed Version: 4.0.0
Server:
Platform: Windows XP, Windows 2000, Windows 2003, Windows Vista, Windows x64, Windows 7, Windows 2008
Related Issues:

[frs-217] JDBC Driver Wrapper exception using SQL Server Integrated Authentication: [Macromedia][SQLServer JDBC Driver]A username was not specified and the driver could not establish a connection using Kerberos (type 4) integrated security …


Problem

While using a mixture of wrapped and unwrapped JDBC data sources with the Macromedia SQL Server JDBC driver on Windows platforms, you receive the following exception:

[Macromedia][SQLServer JDBC Driver]A username was not specified and the driver could not establish a connection using Kerberos (type 4) integrated security: No LoginModules configured for JDBC_DRIVER_01

This message occurs during invocation of the driver type (wrapped, unwrapped) which occurred subsequently to the first invocation. E.g. if the first query performed used a wrapped driver, the first query to use an unwrapped driver will fail with this exception (and vice versa).

Analysis

This issue appears to be caused by security measures built into the Macromedia-shipped (Merant DataDirect) drivers residing in macromedia-drivers.jar, in connection with the supporting DLL DDJDBCAuth04.dll. These security measures interract with JRun's classloaders in a manner which makes it impossible to use both wrapped and unwrapped datasources simultaneously. Whichever datasource type is invoked first will function correctly.

Solution

We have been unable to find a perfect solution, however there are workarounds:

Use Username/Password Authentication
The issue only occurs when using Windows Integrated (Domain) Authentication. When using username and password authentication (this must be enabled in SQL Server) the supplied drivers do not exhibit this problem.

Use Single Type Datasources
The issue only occurs when mixing driver types – wrapped with unwrapped. Using all wrapped or all unwrapped drivers solves this issue.

Use a Third-Party Driver
Microsoft's own JDBC driver does not exhibit this issue, nor does JTDS. Both these drivers can operate in wrapped and unwrapped modes and support Windows Integrated Authentication.

Issue Details

Type: Technote
Issue Number: FRS-217
Components: JDBC
Environment:
Resolution: Won’t Fix
Last Updated: 29/May/12 10:23 AM
Affects Version:
Fixed Version: 3.0.1
Server:
Platform: Windows XP, Windows 2000, Windows 2003
Related Issues:

[frs-298] Instance Manager picks up the Tomcat based version of Railo twice


This technote is about installing an instance of FusionReactor on Railo Server.

Description

Version 4.5.0 of FusionReactor Instance Manager picks up the Tomcat based version of Railo twice. As a result the list of suitable target servers will contain the following target servers

  • Apache Tomcat
  • Railo

which actually represent the same server. This can be seen in the Server Scan dialog shown below

(note the directory paths) which typically is displayed when FusionReactor does its initial scan for target servers and later on the Instance Manager page:

Resolution

An instance of FusionReactor should be installed in only one of the two candidates, preferable the Railo server. Future versions of FusionReactor will only display Railo and omit the Apache Tomcat if it represents a Railo Server.
If you have done so the Instance Manager page will look like the one shown below.

Issue Details

Type: Technote
Issue Number: FRS-298
Components: Instance Manager
Environment:
Resolution: Fixed
Last Updated: 22/May/12 5:28 PM
Affects Version: 4.0.10
Fixed Version: 4.5.1
Server: Railo
Platform: Windows XP, Windows 2000, Windows 2003, Linux, MacOS, Solaris, Windows Vista, Windows x64, AIX, Windows 7, Windows 2008
Related Issues:

FRS-299: Railo instances are not updated to the correct server type

[frs-299] Railo instances are not updated to the correct server type


This technote is about updating an instance of FusionReactor on Railo Express or Railo Server.

Description

Version 4.5.0 of FusionReactor Instance Manager will prompt you to update any existing instances when you have completed the Setup.

Previous versions of FusionReactor allowed you to add Railo as Jetty (Railo Express) or Tomcat (Railo Server) server. When FusionReactor Instance Manager scans for new target servers it will list these existing servers as Railo server in addition to the already existing Jetty and Tomcat servers.

This does allow the user to accidentally install a new FusionReactor instance to a server that already has FusionReactor installed. As a result the previous server will report itself as not connected. However, the new instance will work as expected.

Resolution

Do not install a new instance on a target server that has FusionReactor already installed (identify the belonging server by the directory listed behind the server).
Alternatively uninstall the FusionReactor instance from the Apache Tomcat resp. Jetty Server and re-install it on the appropriate Railo Server. Afterwards delete the Tomcat resp. Jetty server from the Instance Manager.

Whether your instance is installed on the Tomcat resp. Jetty server or the Railo server has no effect on functionality. Just make sure that you do not install it on the same server twice. Future versions of FusionReactor will display Railo server only and omit the Tomcat and Jetty servers if these represent a Railo server.

Issue Details

Type: Technote
Issue Number: FRS-299
Components: Installer, Instance Manager
Environment:
Resolution: Fixed
Last Updated: 22/May/12 5:27 PM
Affects Version: 4.5.0
Fixed Version: 4.5.1
Server: Railo
Platform: Windows XP, Windows 2000, Windows 2003, Linux, MacOS, Solaris, Windows Vista, Windows x64, AIX, Windows 7, Windows 2008
Related Issues:

FRS-298: Instance Manager picks up the Tomcat based version of Railo twice

[frs-288] Windows: Changing the user of a FusionReactor installation


During installation, the FusionReactor Administration Manager is installed as the Administrators group, and the FusionReactor AM Service is installed to log on as the Local System account

If you have changed the user under which your J2EE container runs, we recommend changing FusionReactor to be owned by, and run as, the same user as your J2EE container. This is because the component installed into your J2EE container and FusionReactor itself will need to share files.

You may need to change the runtime user of FRAM/FusionReactor if:

  • Your J2EE container is not owned by the Administrators group and/or runs as a user other than the Local System account.
  • FusionReactor reports it "Cannot modify the web.xml" during instance installation
  • A FusionReactor instance doesn't start, and reports configuration exceptions, possibly reporting Permission Denied on file operations
  • You change the user under which your J2EE container runs

In order to change the runtime user of the FusionReactor system, the following procedure can be used. The procedure uses coldfusion as the runtime user, but you should substitute your J2EE service user as necessary. The procedure uses C:FusionReactor as the install location of FR – again, adjust this as necessary.

Procedure

Log in to the system as user with Administrative privileges.

  1. In the Services Control Panel stop the FusionReactor AM Service.
    • Right click the FusionReactor AM Service and select the Log On tab.
    • Select This account and provide the runtime user name, and the password for that user.
    • Click OK.
  2. In a file Explorer window, right-click your C:FusionReactor and select Properties.
  3. Select Security, then Advanced.
  4. Select the Owner tab.
    • In the box marked Change owner to… select the new owner of the system. If the new owner is not displayed, click Other Users or Groups and enter the new owner name., followed by OK. That name should appear in the *Change owner to…" box.
    • Ensure the box marked Replace owner on subcontainers and objects is checked
    • Click OK. This will change the owner of the FusionReactor system files.
  5. Select the Permissions tab.
    • You may see an Allow entry for your runtime user in the Permissions box.
      • If you do not, click Add, then enter the name of the runtime user, and click OK.
      • If you do, double-click on that user. Both actions bring up the "Permission Entry for FusionReactor" dialog.
    • In the "Permissions Entry for FusionReactor" dialog:
      • Change the Apply onto dropdown to This folder, subfolders and files
      • Check the Allow column's Full Control box.
      • Ensure the last checkbox on the dialog, entitled Apply these permissions to objects and/or containers within this container only is not checked.
      • Click OK.
    • Back in the Permissions tab of the Advanced Security Settings for FusionReactor dialog, you should now have an Allow entry for your runtime user.
      • The entry should list Allow, and Full Control for this user, applied to This folder, subfolders and files.
    • Check the box marked Replace permission entries on all child objects with entries shown here that apply to child objects
    • Click OK, and say Yes to the warning dialog which appears.
  6. Click OK to close the FusionReactor Properties dialog.
  7. Restart the FusionReactor AM Service

Issue Details

Type: Technote
Issue Number: FRS-288
Components: Installer
Environment:
Resolution: Fixed
Last Updated: 19/Mar/12 5:09 PM
Affects Version: 4.0.0
Fixed Version: 4.0.0
Server:
Platform: Windows 2003, Windows 7, Windows 2008
Related Issues:

FRS-270: Unix: Changing the user of a FusionReactor installation

[frs-287] Instance Manager reports “Could not update web descriptor”


Symptoms

Customers attempting to add an instance of FusionReactor using the FusionReactor Administration Manager (FRAM) Instance Manager receive a dialog box with the following text.

Could not update web descriptor /path/to/descriptor/default-web.xml.

Clicking "Skip" or the close icon is the only available action. The instance is not added.

Analysis

We have tracked this issue to a problem when the J2EE server's runtime user is different to that of FusionReactor. This occurs usually when customers have locked down the J2EE server by changing its runtime user in Windows Services (for Windows) or by installing it as a non-root account in Linux or other Unix.

Because the web descriptor is owned by another user, FusionReactor is unable to access it to add a <filter> element. The dialogue box gives the full path to the file whose edit failed.

Resolution

We have developed a procedure to allow FusionReactor to coexist with J2EE servers with differing runtime users. It is part of FusionReactor's online user manual, and can be found at the following URL:

Installing FusionReactor in Locked Down Environments

Issue Details

Type: Technote
Issue Number: FRS-287
Components: Installer
Environment:
Resolution: Fixed
Last Updated: 10/Jan/12 5:12 PM
Affects Version: 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5
Fixed Version: Pending
Server:
Platform: Windows XP, Windows 2000, Windows 2003, Linux, MacOS, Solaris, Windows Vista, Windows x64, Windows 2008
Related Issues:

[frs-286] Fixing a FR 4.0.4 installation so that it can be updated by later versions


Problem

Users who have installed FusionReactor 4.0.4 may not be able to upgrade their installations to a newer version due to a bug in the FusionReactor 4.0.4 installer. The problem only pertains to users who installed FusionReactor 4.0.4. The following procedure details a workaround for users who wish to avoid a complete uninstall of FusionReactor 4.0.4 and new installation of the later FusionReactor version.

Procedure

Windows

  1. Start the Windows Registry Editor and browse to the HKEY_LOCAL_MACHINE/SOFTWARE/ej-technologies/install4j/installations hive.








  2. Rename the value allinstdirs9866-5861-3195-1737 to allinstdirs7439-1350-6687-7781
  3. Rename the value instdir9866-5861-3195-1737 to instdir7439-1350-6687-7781








  4. Exit the Registry Editor
  5. Open the file i4params.conf located in the .install4j directory









    of your FusionReactor 4.0.4 installation in an editor.
  6. Find the two occurences of the string 9866-5861-3195-1737 and replace them with 7439-1350-6687-7781.
  7. Save the file and exit the editor to complete the procedure. You can now run the latest Setup to update your version 4.0.4 to the most recent version of FusionReactor.






Linux and Solaris

  1. Stop the FusionReactor daemon
  2. Become user root and execute the cd command to change to the home directory.
  3. If the file /etc/.java/.systemPrefs/com/install4j/installations/prefs.xml exists open it in an editor.
  4. If the files does not exist open the fallback file ./java/.userPrefs/com/install4j/installations/prefs.xml instead. It looks similar to the one shown below:
    </xml version="1.0" encoding="UTF-8" standalone=no"?>
    <!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
    <map MAP_XML_VERSION="1.0">
      <entry key="allinstdirs9866-5861-3195-1737" value="opt/fusionreactor"/>
      <entry key="instdirs9866-5861-3195-1737" value="opt/fusionreactor"/>
    </map>
    
  5. Find the two occurences of the string 9866-5861-3195-1737 and replace them with 7439-1350-6687-7781:
    </xml version="1.0" encoding="UTF-8" standalone=no"?>
    <!DOCTYPE map SYSTEM "http://java.sun.com/dtd/preferences.dtd">
    <map MAP_XML_VERSION="1.0">
      <entry key="allinstdirs7439-1350-6687-7781" value="opt/fusionreactor"/>
      <entry key="instdirs7439-1350-6687-7781" value="opt/fusionreactor"/>
    </map>
    
  6. Open the file i4params.conf located in the .install4j directory of your FusionReactor 4.0.4 installation (typically /opt/fusionreactory in an editor.
  7. Find the two occurences of the string 9866-5861-3195-1737 and replace them with 7439-1350-6687-7781.
  8. Save the file and exit the editor to complete the procedure. You can now run the latest Setup to update your version 4.0.4 to the most recent version of FusionReactor.

Issue Details

Type: Technote
Issue Number: FRS-286
Components: Installer
Environment:
Resolution: Fixed
Last Updated: 08/Dec/11 6:58 PM
Affects Version: 4.0.4
Fixed Version: 4.0.5
Server:
Platform: Windows XP, Windows 2000, Windows 2003, Linux, Solaris, Windows Vista, Windows x64, Windows 7, Windows 2008
Related Issues:

[frs-278] How to get a thread dump from the JVM


Background

To assist in debugging potential issues it is sometimes necessary to generate a thread dump. This is a list of all threads in the JVM and their current stack of processing code.

Generating a thread dump

Preferred method: If you have access to FusionReactor, you can goto the "Resource->List All Threads" page in the left-hand menu, then click the "Stack Trace ALL" button at the top-right of the page.

Other ways to generate a thread dump differ depending on the platform:

Windows systems

  • Press Ctrl-Break in the command console you used to start your application.
    • If a command console isn't an option (eg when started as a service) you can use a tool like StackTrace to get a stack trace. At the time of writing, the licence allows free use when started with the JNLP Web Start option.
  • If you start your application with the com.sun.management.jmxremote option you should be able to attach jconsole and get a thread dump (JDK 5.0 or higher.)
  • There is a little tool called SendSignal which uses a clever trick to call the ctrl-break signal handler of any process.
  • JDK 5 & 6 offer tools for monitoring, management, and troubleshooting (jconsole, jps, jstat, jstatd, jinfo, jmap, jstack.)

Mac OS X

  • Press *Ctrl-* in the terminal console you used to start your application.
  • You can also generate a thread dump by sending the QUIT signal to the Java VM running your application kill -QUIT process_id where process_id is the process number of the respective java process.
    • Note: This method outputs the stacktrace to the standard output stream which may be redirected to a log file.
  • Thread dump by using gdb.
    • Attach to the target process with gdb and run the following command:
    • (gdb) call (void)pss()
  • The latest Apple 1.5 JVMs offer all the monitoring tools available for Linux and Solaris (jconsole, jps, jstat, jstatd, jinfo, jmap, jstack.)

Unix systems

  • Press Ctrl- in the terminal console you used to start your application.
  • You can also generate a thread dump by sending the QUIT signal to the Java VM running your application kill -QUIT process_id where process_id is the process number of the respective java process.
    • Note: This method outputs the stacktrace to the standard output stream which may be redirected to a log file.
  • JDK 5 & 6 offer tools for monitoring, management, and troubleshooting (jconsole, jps, jstat, jstatd, jinfo, jmap, jstack.)

Issue Details

Type: Technote
Issue Number: FRS-278
Components: Logging
Environment:
Resolution: Fixed
Last Updated: 08/Nov/11 3:01 PM
Affects Version:
Fixed Version: 4.0.0
Server:
Platform: Windows XP, Windows 2000, Windows 2003, Linux, MacOS, Solaris, Windows Vista, Windows x64, AIX, Windows 7, Windows 2008
Related Issues:

[frs-273] Web interface doesn’t work in Internet Explorer


Much of the JavaScript enhanced functionality of the web interface appears disabled / non-functioning in Internet Explorer. The reason for this is Enhanced Security Configuration (IE ESC) is enabled for your user.

To use the disabled functionality, we recommend accessing the web interface remotely from your own machine. Alternatively (but not recommended for best security practice), disable IE ESC for your user. For details on how to disable IE ESC, please see the Microsoft website (linked below):

IE ESC on Windows 2003
IE ESC on Windows 2008 / 2008 R2

Issue Details

Type: Technote
Issue Number: FRS-273
Components: Enterprise Dashboard
Environment:
Resolution: Fixed
Last Updated: 26/Sep/11 5:18 PM
Affects Version:
Fixed Version: 4.0.0
Server:
Platform: Windows 2003, Windows 2008
Related Issues: