LiveView Server System Configuration

LiveView has several customizations for logging, port usage, and authentication.

Project-Specific Configuration Files

LiveView Server uses an internal default StreamBase Server configuration file (an sbconf file) that is maintained internally and should never be manually edited.

Instead, to manage LiveView Server configuration settings, place an sbconf file named sbd.sbconf at the root of your Studio project directory and place your settings there. This project-specific sbconf file is automatically merged with the internal LiveView Server configuration settings such that valid project-specific settings take precedence.

If the ProjectProperties settings for your LiveView project specify the Automatically update/maintain server configuration files option (on the StreamBaseProject Configuration page), then Studio creates and maintains three server configuration files per project:

  • sbd.sbconf — For environment-specific settings, primarily used when running this project at the command prompt.

  • sbd-common.sbconf — For settings common to both command-line and Studio environments.

  • sbd-studio.sbconf — For settings specific to running projects in Studio, including module search path, resource search path, and Java path settings. This file is automatically maintained by Studio; do not edit or change this file manually.

The sbd.sbconf file is still the top-level configuration file, because it includes the other two files. If your LiveView project has all three server configuration files, make your LiveView-specific edits in the top-level sbd.sbconf file, or in sbd-common.sbconf. For LiveView projects, these project-specific settings are still automatically merged with the internally-maintained LiveView server configuration settings.

Changing System Logging Configuration

See StreamBase Logging in the StreamBase documentation for a full explanation of server logging settings. For LiveView, system logging is controlled by a configuration file. These files are by default installed in the $STREAMBASE_HOME/liveview/server/engine/conf folder. The available logging configuration files are:

logback.xml

Default logging setting.

LVDebugLogback.xml

Enable verbose logging. This setting enables LVDEBUG messages to view detailed information on queries submitted to LiveView Server.

LVAlertDebugLogback.xml

Enable verbose debug for alert functionality.

LVSBDebugLogback.xml

Enable logging of all debugging, including all StreamBase debugging. This setting enables verbose logging for both LiveView Server and the underlying StreamBase Server for multi-layered issues.

By default, LiveView uses logback for logging. You can change the logging configuration by setting the environment variable STREAMBASE_LIVEVIEW_LOG equal to the name of one of the preconfigured log files. For example setting STREAMBASE_LIVEVIEW_LOG=LVDebugLogback.xml will set LiveView Server logging to the verbose level.

Note

LiveView logging settings work in tandem with StreamBase Server logging. Depending on your server configuration settings, you might overwrite one set of logging configurations with another. See the TIBCO StreamBase Administration Guide's article on StreamBase Logging for more information on background mode logging settings.

Setting LiveView JVM Heap Memory

When launching a LiveView application from the command line or from StreamBase Studio, you might receive warnings such as:

MemoryConfigTooLow - Maximum heap size configured to be 3,204 MB, 
which is below recommended size for LiveView production configurations

To avoid such warnings, you can increase the maximum JVM heap size for the current LiveView project. Do this the same way for LiveView projects as you do for StreamBase projects, by setting Xmx and Xms values in the jvm-args element of the sbd.sbconf file for your LiveView project. Use settings like the following:

<java-vm>
  <param name="jvm-args" value="
    -Xms1g
    -Xmx4g
    -XotherSettings "/>
</java-vm>

See Java VM Memory Settings for further details.

Setting StreamBase and LiveView Ports

A running LiveView instance uses two ports. Each LiveView instance requires two TCP ports: one for server processes (streambase-port) and one for client connections (liveview-port). By default, these port numbers are 10000 and 10080. When you start a LiveView project, both ports are in use. There are three ways that you can change the port numbers for a server process:

  1. Start the server with the command-line client lv-server and use the --streambase-port and --liveview-port options. The is option supersedes all other options. For example, the following lv-server command would start a project named liveview-project on ports 10001 and 10081:

    lv-server run --streambase-port 10001 --liveview-port 10081 liveview_project
  2. Use the sbd.sbconf file to set the system properties tcp-port and liveview.port. This option supersedes the environment variable option in (3).

    To specify port numbers in an sbd.sbconf, set the following options:

    • In the <server> element in sbd.sbconf, add the tcp-port parameter:

      <server> 
      <param name="tcp-port" value="new-port-value"/> 
      </server> 
    • In the <java-vm> element, add the liveview.port system property (whose value should differ from that of the tcp-port parameter):

      <java-vm> 
      <sysproperty name="liveview.port" value="different-new-port-value" /> 
      </java-vm> 

    If you are running from StreamBase Studio, edit the ports as follows:

    1. Right-click on a project folder, or on any of the lvconf files for a project, and select Run AsExternal Tools Configurations. This opens the External Tools Configurations dialog.

    2. In the Options pane, set the port numbers.

    3. Click Run.

  3. Set the environment variables liveview.streambase.connection.pool.port and liveview.port. This option will be overridden by either option (1) or option (2).

Configuring the Location of Generated Files and Metadata

By default, when you run a LiveView project, LiveView creates an lv-bin directory for generated project files and an lv-systemdata directory for generated project data. (These directories are hidden by default; you can change the default view with the Package Explorer filters.) You can add a system property to the project sbconf file (liveview.project.out) that defines a writable folder for files and metadata that LiveView Server generates:

<sysproperty value="..\out" name="liveview.project.out"/>

The value of this property can be an absolute or relative path. If it is a relative path, it will be appended to the liveview.project.home. If the specified folder is not writable, LiveView throws an exception. LiveView Server redirects all generated files and metadata to this path.

The lv-bin folder is written under the specified folder (for example, ..\out\lv-bin). If this property is not specified, the output folder is assumed to be the project home (lv-bin is then created in \project_home\lv-bin.) The the project_home folder is not writable, the compiler first tries the user's folder and then tries the temp folder. This information is logged. If LiveView cannot find a writable folder, it throws an exception.

If only 'sysproperty name="liveview.project.out"...' is set, SB/LV writes lv-bin and lv-systemdata to the lv.project.out directory.

If both 'sysproperty name="liveview.project.out"...' and 'sysproperty name="liveview.systemdata.directory"...' are set, lv-bin goes into lv.project.out and lv-systemdata goes in lv.systemdata.directory.

If only 'sysproperty name="liveview.systemdata.directory"...' is set, lv-bin goes in the project workspace and lv-systemdata goes in lv.systemdata.directory.