Starting the Server

Version 22.0.8486


Starting the Server


CData Connect comes bundled with a Web server built on top of Jetty to support simple cross-platform deployment. There are options for running Connect that depend on your environment and personal preferences.

Windows

In Windows, CData Connect is installed as a service. To access the application, you must first ensure that the service is running. Once the service is running, you can access the CData Connect admin console by opening a web browser and entering http://localhost:8080/ in the URL field.

You can also run the application without the service through a java command. CData recommends using the service, but this method can be useful for certain configurations.

Starting and Stopping the Service

There are three ways to start and stop the service, which are outlined below:

Start Menu Shortcuts

The CData Connect installer creates start menu shortcuts that allow you to easily use the application. To access these shortcuts, open the Start menu and expand the CData Connect 2022 folder. These shortcuts are available:

  • Start CData Connect: Starts the CData Connect service. By default, this service runs when Windows starts, so you do not need to run this command every time you run the application.
  • Stop CData Connect: Stops the CData Connect service. This is necessary when Upgrading Connect.
  • Launch CData Connect Admin Console: Opens a web browser window in your default web browser to the admin console URL, http://localhost:8080/. If the service is not running, the web browser returns an error.

Services Management Console

To open the Services Management Console, open the start menu and type services. Select the Services application that appears.

Scroll down to the service called CData Connect. If it is running, the Status column says Running. You can right-click the service to access options to Start, Stop, and Restart it.

Command Prompt

Advanced users can use Windows command prompt to manually issue commands to the service. Open a command prompt window and change the directory to the installation folder (by default, C:\Program Files\CData\CData Connect).

Note: You can also use PowerShell to issue these commands, but the syntax is slightly different. Modify the commands accordingly if you use PowerShell.

To start the CData Connect service, issue this command:

connect.exe -start

You can restart or stop the service with these commands:

connect.exe --restart --ServiceName "CData Connect"
connect.exe --stop --ServiceName "CData Connect"

Launching Without the Service

To run CData Connect without starting the service, open a command prompt window in the installation folder. Issue the following command to start the application:

java -jar connect.jar -f service.json

In the example above, the configuration file argument -f service.json instructs the application to load settings from the service.json file, which is located in the same directory as connect.jar. See Configuration Options for information on configuring service.json.

Creating a Custom Service

Although CData Connect creates a service by default during installation, you can create an additional service for testing and setup cases.

Open a command prompt window in the installation folder. The commands below show how to install and uninstall a custom service:

connect.exe --install --ServiceName "CData Connect Test" --StartMode Java --ClassPath connect.jar --StartParams "-f;service.json" --StopParams "-f;service.json;-stop"
connect.exe --uninstall --ServiceName "CData Connect Test"

Linux

After you install CData Connect to a location of your choice, you can either run install CData Connect as a service or run the application manually. CData recommends using a service if you use Connect for critical applications.

Running Connect as a Service

Running CData Connect as a service allows the application to run independently from any user process and restart automatically upon reboot. This is the preferred method for critical applications.

CData recommends creating a daemon to manage the CData Connect application on Linux. A script included in the installation package can do this automatically. You can also manually create the daemon if needed.

Using the Included Script

The safest way to configure the CData Connect daemon is to run the script included in the installation package, provided the system is using the systemd daemon manager:

bash ./service

This script creates a daemon called cdata-connect.service. You can then use systemctl to manage the daemon:

systemctl enable cdata-connect
systemctl start cdata-connect

Manually Creating the Service

If desired, you can install the daemon manually by following these steps:

  1. Extract the CData Connect archive:

     tar -xzvf connect.tar.gz -C /opt/cdata/connect/
    
  2. Create a user designed to run the service, and give the user ownership of the CData Connect folder:

     useradd -m cdata
     chown -R cdata:cdata /opt/cdata/connect
    
  3. Create the file /etc/systemd/system/cdata-connect.service, and copy the following:

     [Unit]
     Description=CData Connect 2020
     After=network.target
    
     [Service]
     WorkingDirectory=/opt/cdata/connect
     ExecStart=/usr/bin/java -jar /opt/cdata/connect/connect.jar -f /opt/cdata/connect/service.json
     ExecStop=/usr/bin/java -jar /opt/cdata/connect/connect.jar -f /opt/cdata/connect/service.json -stop
     ExecStop=/bin/sleep 3
     Restart=always
     User=cdata
     Group=cdata
    
     [Install]
     WantedBy=multi-user.target
    

Running the Standalone Application

To start CData Connect without creating a service, use the terminal to open the connect.jar file in the installation directory with a configuration file argument, as shown here:

java -jar connect.jar -f service.json

In the example above, the configuration file argument -f service.json instructs the application to load settings from the service.json file, which is located in the same directory as connect.jar. See Configuration Options for information on configuring service.json.