Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

Managing the Klocwork Servers

Managing the Klocwork Servers

There are three servers that are installed as a part of your Klocwork installation:

  • Database Server - This is a MySQL database server which contains data for Klocwork
  • Klocwork Server - This is an Apache Tomcat Web server that provides access to Klocwork.
  • License Server - This is a FlexNet Publisher server which manages licensing

When do I need to manage these servers?

These servers need to be restarted if changes are made to the following:
  • Licensing
  • Access control
  • Configuring your mail server

For more information on starting and stopping your servers, see the following:

Requirements for starting servers

  • Either you must put a copy of your Klocwork license in the <projects_root>/licenses directory or If you will use your organization's FlexNet Publisher license manager, you must configure a path to that server during installation, or with the kwservice set-service-property command.
  • You can manage the Klocwork Servers remotely on Unix with SSH, or on Windows with Windows Services administration. Otherwise, you must issue the start, restart and stop commands locally.
  • The path to the projects_root must be the same on all server hosts.
  • The path to the Klocwork executables must be the same on all server hosts.
  • The user starting the Klocwork Servers must have write access to the projects_root directory.

Starting the servers as regular processes

To start all of the Klocwork Servers as regular processes, run the following command:

kwservice --projects-root <projects_root> start

where <projects_root> is the projects_root directory you want to use

To start one of the Klocwork Servers, run the following command:

kwservice --projects-root <projects_root> start [<server_name>]

where

  • <server_name> can be one of:
    • database
    • license
    • klocwork
  • <projects_root> is the projects_root where the servers are running

Examples

To start all Klocwork Servers:

kwservice --projects-root "C:\Klocwork\Server 18.1\projects_root" start

To start the Klocwork Server:

kwservice --projects-root "C:\Klocwork\Server 18.1\projects_root" start klocwork

You see messages indicating that the servers have been started, showing the server host name and port number and the path to the projects_root. For example:

Using projects root: C:\Klocwork\Server 18.1\projects_root Local Host is: serverxyz.com [13.1.1.142] Starting License Server [started on serverxyz.com:27000] (projects root is C:\Klocwork\Server 18.1\projects_root) Starting Database Server [started on serverxyz.com:3306] (projects root is C:\Klocwork\Server 18.1\projects_root) Starting Klocwork Server [started on serverxyz.com:8080]

Starting the servers as Windows services

Your Windows services may already be running. During installation you have the option of automatically starting the Klocwork Servers as Windows services when installation has completed.

Note: It is not possible to run two sets of the Klocwork Servers as Windows Services on one host when the servers are of the same Klocwork version.

When running the Klocwork Servers as Windows Services, the Klocwork Server is dependent on the Database Server. This means:

  • When you start or restart the Klocwork Server, the Database Server will also start.
  • When you stop the Database Server, the Klocwork Server will also stop.

To start or restart one or more Klocwork Servers as Windows services, use the Windows Services Administration Control Panel.

Alternatively, use the following commands:

net start "Klocwork 18.1 Database Server"
net start "Klocwork 18.1 License Server"
net start "Klocwork 18.1 Server"

Requirements for stopping servers

  • You must be logged into the host machine directly. You cannot stop servers remotely.
  • Prior to shutting down all Klocwork servers, advise users of Klocwork clients to shut down client applications. If they do not do so, they may lose data.
Note: The messages indicating that the servers have stopped actually occur while they are stopping. Before you start another process such as restarting the servers or doing a backup, wait a minute.

Stopping the servers running as regular processes

To stop all of the Klocwork Servers running as regular processes, run the following command:

kwservice --projects-root <projects_root> stop 

where <projects_root> is the projects_root directory you want to use

To stop one of the Klocwork Servers, run the following command:

kwservice --projects-root <projects_root> stop <server_name> 

where

  • <server_name> can be one of:
    • database
    • license
    • klocwork
  • <projects_root> is the projects_root where the servers are running

Examples

To stop all Klocwork Servers:

kwservice --projects-root "C:\Klocwork\Server 18.1\projects_root" stop

To stop just the Klocwork Server:

kwservice --projects-root "C:\Klocwork\Server 18.1\projects_root" stop klocwork

You see messages indicating that the servers have been stopped. For example:

Using projects root: C:\Klocwork\Server 18.1\projects_root
Local Host is: serverxyz.com [13.1.1.142] Stopping License server [stopped] Stopping Database server [stopped] Stopping Klocwork server [stopped]

Stopping the servers running as Windows services

When running the Klocwork servers as Windows Services, the Klocwork Server is dependent on the Klocwork Database Server. This means:

  • When you start or restart the Klocwork Server, the Klocwork Database Server will also start.
  • When you stop the Klocwork Database Server, the Klocwork Server will also stop.

To stop one or more Klocwork Servers running as Windows services, use the Windows Services Administration Control Panel.

Alternatively, use the following commands:

net stop "Klocwork 18.1 Server"
net stop "Klocwork 18.1 Database Server"
net stop "Klocwork 18.1 License Server"