You may need to start DTP services after a new installation, migration, or upgrade.

In this section:

Starting DTP Services on Linux

There are a few ways you can start DTP and its related services:

Using the Console Script

In addition to starting and stopping DTP and its related services, the dtpconsole.sh script provides interactive management capabilities, such as configuring database connections. 

  1. Run the DTP Configuration Manager after the installation completes: 
    DTP_HOME/bin/dtpconsole.sh
    The DTP main menu is displayed:

    DTP - Configuration Manager
    Copyright (C) by Parasoft Corporation
    MAIN MENU
    =========
    Options:
      (1) DTP Server (Report Center, License Server)
      (2) Data Collector
      (3) DTP Enterprise Pack
      (4) Status
      (5) Database configuration
      (6) System administration
      (7) Show Machine Id
      (q) Exit to system
  2. Choose (1) to enter the DTP Server menu. 

  3. Choose (1) to run the service and (q) to return to the menu.
  4. Choose (2) to enter the Data Collector menu.
  5. Choose (1) to run the Data Collector service and (q) to return to the menu.
  6. Choose (3) to enter the Enterprise Pack menu.
  7. Choose (1) to run the service and (q) to return to the menu. You can only start and stop DTP Enterprise Pack through the DTP console interface. Additional administration commands for Enterprise Pack applications are available in the dedicated dtpservices.sh in the <DTP_INSTALL>/dtpservices/ directory. See Getting Started with Enterprise Pack

Using the Automation Scripts

After the initial startup and configuration, you can start DTP applications using the dedicated scripts. The scripts are non-interactive and suitable for starting and stopping DTP services in automated environments. Please note that automation scripts are not compatible with crontab functionality. If you are using crontab functionality, use the dtpconsole.sh script to start and stop DTP.

DTP Server

Use the dtp.sh script located in the <DTP_INSTALL>/bin directory. You can specify the following commands:

dtp.sh runRun the DTP server process in the current window.
dtp.sh startStart DTP server as a background process.
dtp.sh stopStop DTP server.
dtp.sh statusDisplay the current status of DTP server.
dtp.sh helpPrint the help to the console.

Data Collector

Use the datacollector.sh script located in the <DTP_INSTALL>/bin directory. You can specify the following commands:

datacollector.sh runRun the Data Collector process in the current window.
datacollector.sh startStart Data Collector as a background process.
datacollector.sh stopStop Data Collector.
datacollector.sh statusDisplay the current status of Data Collector.
datacollector.sh helpPrint the help to the console.

DTP Enterprise Pack

Use the dtpservices.sh script located in the <DTP_INSTALL>/dtpservices directory. You can specify the following commands:

dtpservices.sh runRun the Enterprise Pack process in the current window.
dtpservices.sh startStart Enterprise Pack as a background process.
dtpservices.sh stopStop Enterprise Pack.
dtpservices.sh statusDisplay the current status of Enterprise Pack.
dtpservices.sh reset-serverReset the DTP server connection settings for Enterprise Pack to the defaults. See Server Settings for information about the server configuration. 
dtpservices.sh helpPrint the help to the console.

Potential Errors When Stopping on Linux

In some unexpected instances, you may see the following message when running the stop on Linux:    

"Time out on DTP Enterprise Pack process termination. Please kill all processes manually. (Refer to the documentation)"

This message only triggers if any of the children processes of the main DTP Enterprise Pack application (typically one of the service processes) started but was not killed completely. These processes must be terminated before starting DTP Enterprise Pack again. 

  1. Run following command:    
    pgrep node or pgrep -f <installation home>/nodejs/bin/node
    This command will print out all processes that DTP Enterprise Pack started.
  2. Run the kill command using the same argument to kill these process:
    pkill node 
    or
    pkill -f <installation home>/nodejs/bin/node

Using systemd Services

User permissions for the installation and systemd Services must be the same.

As alternative to using the dtpconsole.sh script, the automation scripts, or crontab to manage DTP, it is possible to configure custom systemd services on Linux systems that support systemd. Before doing this, ensure that the DTP services are not running. Please note that these systemd services are not compatible with crontab functionality. If you are using crontab functionality, use the dtpconsole.sh script to start and stop DTP.

To use systemd services:

  1. Create a file for each DTP service where each file is in the format <servicefilename>.service.
    • These files can be named whatever you want, but the filename must use the ".service" extension in order for systemd to process them correctly.
  2. Place these files in the /etc/systemd/system directory.

Below are some sample systemd services for each of the DTP services that can be used in the files you created in the above steps. It is important to ensure that the User and Group for each service is consistent with the DTP installation owner. Additionally, the "ExecStart" and "ExecStop" options should correspond to your DTP installation location.

For DTP Server:

[Unit]
Description=Parasoft DTP Server
# Wait for the network services to be started first
Wants=network.target
After=network.target

# When the database is MySQL and on the local machine...
# Wants=mysql.service
# After=mysql.service

[Service]
# User/Group should be consistent with DTP installation owner
User=devtest
Group=devtest

Type=simple
ExecStart=/home/devtest/parasoft/dtp/bin/dtp.sh run
ExecStop=/home/devtest/parasoft/dtp/bin/dtp.sh stop
# Set maximum file descriptor limit to max
LimitNOFILE=65536
SuccessExitStatus=143 SIGKILL
Restart=on-failure

[Install]
WantedBy=multi-user.target

For DTP Data Collector:

[Unit]
Description=Parasoft DTP Data Collector Service
# Wait for the network services to be started first
Wants=network.target
After=network.target

# When the database is MySQL and on the local machine...
# Wants=mysql.service
# After=mysql.service

[Service]
# User/Group should be consistent with DTP installation owner
User=devtest
Group=devtest

Type=simple
ExecStart=/home/devtest/parasoft/dtp/bin/datacollector.sh run
ExecStop=/home/devtest/parasoft/dtp/bin/datacollector.sh stop
# Set maximum file descriptor limit to max
LimitNOFILE=65536
SuccessExitStatus=143 SIGKILL
Restart=on-failure

[Install]
WantedBy=multi-user.target

For DTP Enterprise Pack (if installed):

[Unit]
Description=Parasoft DTP Enterprise Pack Service
# Wait for the network services to be started first
Wants=network.target
After=network.target

[Service]
# User/Group should be consistent with DTP installation owner
User=devtest
Group=devtest

Type=simple
ExecStart=/home/devtest/parasoft/dtp/dtpservices/dtpservices.sh run
ExecStop=/home/devtest/parasoft/dtp/dtpservices/dtpservices.sh stop
# Set maximum file descriptor limit to max
LimitNOFILE=65536
Restart=on-failure

[Install]
WantedBy=multi-user.target

After the services have been configured, you can enable them to start automatically when the machine is restarted. For each service file you created, run the following:

sudo systemctl enable <servicefilename>

Once you have enabled all the services, reload the systemd manager configuration:

sudo systemctl daemon-reload

Then for each service you created, run the following to start them:

sudo systemctl start <servicefilename>

To check the status for a service:

sudo systemctl status <servicefilename>

To stop a service:

sudo systemctl stop <servicefilename>

Troubleshooting

In a SELINUX environment, if the installation tar.gz is extracted and run in your home directory, then is subsequently installed in a directory outside of your home directory, the labels will be incorrect. You will need to relabel the files or DTP will not start due to SELINUX blocking it. To relabel the files, run the following command:

restorecon -Rv <INSTALL-DIR> 

After running this command, you can determine the SELINUX state by running the following command:

sestatus

Starting DTP Services on Windows

You can easily use the Windows Start menu to start and stop DTP services:

  1. Go to Start > Parasoft > DTP. Right-click Start DTP Server and choose Run as administrator.

  2. Press any key to proceed when prompted.

  3. Repeat the process to start Data Collector and DTP Enterprise Pack, if applicable.

You can also use Windows Services to start and stop DTP services, as well as change startup from automatic to manual.

See the documentation for your version of Windows for details.

  • No labels