Running the Integration Daemon

Summary of Steps to Start Integration Daemon

The following steps are documented for both Microsoft Windows and Linux operating system installations. On Windows, the servers are normally started as Windows Services, although they can be started from the command-line for troubleshooting purposes. On Linux and other operating systems the servers are started on the command-line and run as background processes.

  • Start the ExtraView server
  • Start the Perforce server
  • Start the Integration Daemon

Start ExtraView Server

Start the application server (i.e., Tomcat, WebLogic) that has the ExtraView application deployed. Once the application server is started, connect to the ExtraView application with a web browser or other client from the machine where the integration daemon is installed in order to ensure connectivity from the integration daemon to the ExtraView application.

Start Perforce Server

Start Perforce according to its product documentation. For example, on Windows start the Perforce Service to start Perforce. Once the Perforce server is started, connect to the Perforce server with the p4 client from the machine where the integration daemon is installed in order to ensure connectivity from the integration daemon to the Perforce server.

Start Integration Daemon

On Microsoft Windows, if the integration daemon was installed as a Windows Service, then simply start the service named ExtraViewIntegrationDaemon. To start the integration daemon on the command-line, you must first open a Command Prompt window and change the current directory to the installation directory, INTEGRATION_HOME:

cd INTEGRATION_HOME

Next, execute the start_daemon.bat script. The following lines are written to the Command Prompt window as the integration daemon starts:

C:\ExtraView\integrationdaemon>start_daemon.bat
Perforce Integration Daemon Started
 Setting event log:C:\ExtraView\integrationdaemon\logs
Attempting to Open Log File: C:\ExtraView\integrationdaemon\logs\error.log
Log is:C:\ExtraView\integrationdaemon\logs\error.log
Running without a queue...

On Linux, execute the following commands to start the integration daemon:

cd INTEGRATION_HOME
./start_daemon.sh

Stop Integration Daemon

On Microsoft Windows, if the integration daemon was installed as a Windows Service, then simply stop the service named ExtraViewIntegrationDaemon. To stop the integration daemon on the command-line, type [Ctrl]+C on the Command Prompt window where you started the integration daemon. For example:

...
Running without a queue...
[TYPE Ctrl+C HERE]
Terminate batch job (Y/N)? y
C:\ExtraView\integrationdaemon>

On Linux, stop the start_daemon.sh script when it is running in the foreground. If the integration daemon is running in the background (e.g., using nohup or &), then find the process id of the java process running the com.extraview.sccintegration.common.IntegrationDaemon program and stop or kill the process.

State File – state.properties

Certain dynamic runtime state variables are maintained in a persistent properties file, named state.properties. This file is maintained in the “data” directory and it must be available for writing by the application (e.g., privileges are set appropriately and the file must not be “in use by another application”). The state file contains the state of progress data about the application, such as the latest ExtraView history already processed or the latest change number processed in Perforce. Since state information is maintained internally during the operation of the daemon, it will do no good to modify the values in this file while the daemon is running. The values can be modified when the daemon is not running, and the new values will be used when the daemon starts. The following keys and values are examples of state properties; note that all timestamps are maintained in a universal timestamp format, including time zone.

EV_TIMESTAMP=2004-11-27 14:26:49.000 -0800
P4_CHANGE=48
P4_TIMESTAMP=2004-11-29 13:05:38.000 -0800

The state.properties file is located in the INTEGRATION_HOME/data/Perforce folder. The file must be writable for the integration daemon process. It is possible to edit this file manually to rework some transactions or correct an error. However, if you do this, you must be careful to preserve the syntax and format of the file.

Error Log

The default location for the file error.log is in the logs subdirectory of the directory in which the Integration Daemon is installed. The log file contains entries recounting integration daemon activity, including exceptions and other entries depending upon the log level setting. Log information includes the P4 job names that matched and mapped to ExtraView issues, ExtraView issue ids that matched and mapped to P4 jobs, the names/ids of newly created jobs/issues, actions that failed, and notification of the updating of cutoff thresholds. If the daemon shuts down due to a failure, the log will include as much information about the failure as it is able to ascertain.

Note: Configuration errors such as fields mapped incorrectly, may cause the daemon to shut down, and a log entry to be created. This is because continued operation may result in a loss of synchronization of the ExtraView and P4 databases.

Debug Log

The Perforce interface log file named debug.log can be found in the same logs directory as the error.log file described above, although this is configurable with specific settings in the p4.properties configuration file. This log file contains entries specific to the Perforce side of the integration, such as commands issued to the Perforce server, any errors or warnings generated while communicating or performing certain operations on the Perforce server, etc.