Windows
In Windows, is installed as a service by default. To access the application, you must first ensure that the service is running. Once the service is running, you can access the admin console by opening a web browser and entering http://localhost:8181/ in the URL field. You can also run the application without the service through ajava command. recommends using the service, but this method can be useful for certain configurations.
Starting and Stopping the Service
You can start and stop the service in either of the following ways:- Start menu shortcuts (recommended)
- The Services Management Console
- Command prompt commands
Start Menu Shortcuts
The installer creates start menu shortcuts that allow you to easily use the application. To access these shortcuts, open the Start menu and expand the{siteName} 2023 folder. These shortcuts are available:
- Start : Starts the 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 : Stops the service. This action is necessary when you upgrade .
- Launch Admin Console: Opens a web browser window in your default web browser to the admin console URL, http://localhost:8181/. 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 . If that service is running, the Status column says Running. You can right-click the service to access options to start (Start), stop (Stop), and restart (Restart) it.Command Prompt
Advanced users can use Windows command prompt to issue commands manually to the service. Open a command prompt and change the directory to the installation folder (by default,C:\Program Files\CData\CData Sync).
You can also use a Microsoft PowerShell window to issue these commands, but the syntax is slightly different. Modify the commands accordingly if you use PowerShell.
Launching Without the Service
To run without starting the service, open a command prompt in the installation folder. Issue the following command to start the application:Linux
After you install to a location of your choice, you can run as a service or run the application manually. recommends using a service if you use for critical applications.Running as a Service
Running as a service enables the application to run independently from any user process and to restart automatically upon rebooting. Follow these steps to ensure that your Linux installation of functions as expected as a service:- When you install , ensure that the user who is performing the installation has read and write permissions for the installation directory. The root user works fine for this.
-
Run the service.sh script. This script is located at the root of the extracted setup archive. For example, if you extract the archive to
/opt/sync, the script is located in/opt/sync/service.sh. -
After you run service.sh, enable and start the service according to the service manager that is used by your Linux distribution:
-
Enable the service by submitting this command:
systemctl enable cdatasync -
Enable your service manager:
For init.d, submit this command:
sudo service cdatasync startFor systemd, submit this command:sudo systemctl start cdatasync
-
Enable the service by submitting this command:
Regardless of how you choose to deploy , the files and folders within
ApplicationDirectory must be readable and writable by the user who is running the application. The service installer that is included with the Java edition setup uses cdatasync as this user.sudo chown -R cdatasync:cdatasync /opt/sync
Running the Standalone Application
To start without creating a service, use the terminal to open the sync.jar file in the installation directory with a configuration file argument, as shown here:Configuring the Embedded Jetty Server
comes pre-configured to work immediately in any environment. However, you can customize the way you access the data that is exposed in by generating the sync.properties file in the installation directory (for Windows, this isC:\Program Files\CData\CData Sync by default).
Generating the sync.properties File
Before you can make any customizations to the embedded Jetty server, you must create the sync.properties file. To do so, submit the following command in the installation directory (InstallationDirectory) where the .jar file is located:
Once you generate the
sync.properties file, any upgrades you make do not overwrite it.Changing the Port
To configure the port on which the embedded server listens:-
Locate the sync.properties file in
InstallationDirectoryand open it in a text editor. -
Locate the following line where the port is set:
cdata.http.port=8181 - Change this value to the port number that you want.
Changing the Inactivity Timeout
By default, the inactivity (session) timeout for is 10 minutes (600 seconds). To change the timeout value, set thecdata.session.timeout property in the sync.properties file, as shown below:
cdata.session.timeout=1200
Enabling SSL/TLS
To enable SSL/TLS connections (HTTPS), you also need to modify the sync.properties file inInstallationDirectory, as follows:
-
Set the
cdata.tls.keyStoreTypesetting to the type of keystore that will be used. Valid values include jks, pkcs12, and jceks. -
Set the
cdata.tls.keyStorePathsetting to the path of the keystore that will be used. Note that $cdata.home might be used to refer toInstallationDirectory. -
Set the
cdata.tls.keyStorePasswordsetting to the password for the keystore. For improved security, you can store this value in encrypted form in sync.properties. -
Set the
cdata.tls.portsetting to the port that should be used to host the server. -
(Optional) Set the
cdata.http.portsetting to an empty string to disable plaintext connections.
If you obtain an external private key for configuration in , be sure to change the owner of the certificate to the service account that is used to host (
cdata:cdata).Enabling LDAP Authentication
supports the use of LDAP authentication. To enable LDAP authentication, a user must be defined in where that user matches an LDAP user. For instructions about creating users in , see Adding a User. To enable LDAP authentication, modify the sync.properties file inInstallationDirectory, as follows:
-
Set
ldap.hostnameto the domain name or IP address of the LDAP server. -
Set
ldap.portto the port on which the LDAP server is running. -
Set
ldap.authenticatedMethodto the authentication mechanism that should be used when you connect to the LDAP server. Options are none and simple. -
Set
ldap.bindDnandldap.bindPasswordto the distinguished name and password of a user against which to authenticate the LDAP server. For improved security, you can store the password value in encrypted form in sync.properties. -
Set
ldap.debugas to whether you want to add debugging information to the server logs. Options are true or false. -
Set
ldap.user*to the properties that are used to search for user entries. -
Set
ldap.role*to the properties that are used to search for role entries.
Configuring the Application Directory
TheApplicationDirectory folder contains all the data that is used by the application: configuration data, application data, logging data, certificates, and so on. The default location of ApplicationDirectory depends on whether is hosted via the embedded web server or via an external Java servlet container.
For the embedded web server, ApplicationDirectory is the same as InstallationDirectory. By default, that location is the following:
ApplicationDirectory is relative to the home directory of the user who is running the server:
~/sync
In this path, ’~’ resolves to the home directory of the user who is running the server that hosts the application.
You can configure the ApplicationDirectory folder, which is useful in a variety of scenarios:
- clustering multiple instances of
- using a shared network drive for application data
- embedding within other systems that access the same folders
ApplicationDirectory moves the application’s data files. However, it does not move other application resources like EXE files, JAR files, and so on. These resources are held in the InstallationDirectory folder, which might be the same as ApplicationDirectory, but the location of those resources does not change if ApplicationDirectory is changed.
When you use with the embedded Jetty server, ApplicationDirectory is configured in the sync.properties file that is found in InstallationDirectory. Within this server configuration file, you must set the cdata.app.directory setting to the path of the desired directory. The following example demonstrates what this might look like when you set the data directory to a shared folder on a mounted drive:
cdata.app.directory path and it has the appropriate permissions to read and write at that path, it creates the data folder within the specified directory.
Configure the Application Database
Starting with version 26.2, uses an embedded H2 database that resides inApplicationDirectory as the default application database.
Existing installations continue to use the legacy embedded Derby database. does not automatically migrate existing installations to H2.
The application database stores several tables of application data, including the following:
- Jobs
- Tasks
- Connections
- History (both Jobs and Tasks)
- Application Log (application-level errors and events)
- Audit Log (user-made changes to the configuration)
ApplicationDirectory when you use an embedded database.
You can also configure to use an enterprise database, such as Microsoft SQL Server, PostgreSQL, or MySQL, as explained in the next section. While there are alternative ways to configure an external database (for example, as explained in AWS-AMI Edition or Azure Marketplace Edition), the recommended approach is to follow the steps in the Migration documentation.
Embedded Java Server
When you use with the embedded Jetty server, the application database is configured in the sync.properties file that resides inInstallationDirectory. Within this server configuration file, you must set the cdata.app.db setting to a Java Database Connectivity (JDBC) connection string that contains the appropriate connection parameters for the database that you want. The following examples illustrate this setting for the MySQl, PostgreSQL, and SQl databases:
MySQL
cdata.app.db connection string, it uses that database as the application database.
Login Lockouts
automatically locks out users who enter incorrect passwords too many times in order to prevent brute-force attacks. By default, a user who enters six incorrect passwords within five minutes is locked out for thirty minutes. You can modify the lockout settings by editing the XML configuration file that governs the web-server behavior. These three settings are relevant to lockouts:- LockoutFailedAttempts - the number of incorrect passwords that trigger a lockout. Set LockoutFailedAttempts to 0 to disable lockouts.
- LockoutMinutes - the duration of the lockout. The default duration is thirty minutes.
- LockoutTimeCheckPeriod - the period after which the number of failed attempts is reset to 0. The default period is five minutes.
initParameters, as shown below:
Common Issues and Solutions
This section lists common issues that you can encounter when you deploy in a Java environment. The recommended solution for each issue is included. For additional help, contact Technical Support at support@.com.Issue
fails to start, or it starts by using an AppDirectory other than what is expected
This error might indicate that does not have the permissions that are required to accessApplicationDirectory. (ApplicationDirectory is a folder that stores critical information regarding the configuration of jobs, connections, transformations, and so on.) One possible cause for this error is running as a local user before you set it up as a service. In this case, it is possible that certain resources created by the application were created under the local user. As a result, those resources are not available when you run as a service.
Recommended Solution
In a Linux operating environment, the easiest way to ensure that the service account (or any other account that you want to use to run ) can accessApplicationDirectory is to use the chown command. For example, if ApplicationDirectory is in the default Linux location and should run under the service account, the following command should resolve the error: