Connection Parameters

The tcsadmin command-line interface must connect to an HQ Server to perform the work associated with a particular command. This means that each time you use the CLI, you must specify connection parameters that indicate the particular HQ Server to which you want to connect.

Specify these parameters on the command-line, or create a user.home/.hq/client.properties file that lists the parameters and their values to avoid having to specify the connection parameters with every command. The variable user.home refers to the home directory of the user running the command-line interface.

Note

The .hq directory name starts with a dot. On Windows, the home directory of a user is c:\Documents and Settings\<user_name>.

Parameters specified at the command-line override the client properties file. If the CLI does not find any value for a parameter, either at the command-line or in the client properties file, it uses the default value.

The following table lists these connection parameters and their default values:

Table 12. tcsadmin Connection Parameters

Connection ParameterDescriptionDefault Value
--host=hostnameHost name of the computer that hosts the HQ Server. If you execute the tc Server CLI on the same computer on which the HQ server is running, you can specify localhost.localhost
--port=portnumberTCP/IP port number to which the HQ Server listens.7080
--user=usernameName of the user that the CLI uses to connect to the HQ Server. This user must be configured to use the HQ user interface. All role-based access is honored.hqadmin
--password=passwordThe password of the user that the CLI uses to connect to the HQ Server.hqadmin
--secureSpecifies that the CLI connects to the HQ Server over a secure connection (SSL).Parameter does not take a value when specified at the command-line. If you do not specify the parameter, the CLI connects using a non-secure connection.

The following example uses these parameters on the command-line:

prompt$ ./tcsadmin.sh list-servers --host=localhost --port=7081 \
         --user=tc_user --password=super_secret --secure 

In the example, the CLI connects to an HQ Server on the same computer on which the CLI is running. The HQ Server listens at the TCP/IP port 7081. The username and password of the user connecting to the HQ Server are tc_user and super_secret, respectively. The CLI connects to the HQ Server through SSL.

If you want to specify the same parameters in a file to avoid specifying them at the command line, create a file called client.properties in the .hq sub-directory of the home directory of the user running the CLI. The following example shows the content of this file using the parameter values specified above:

host=localhost
port=7081
user=tc_user
password=super_secret 
secure=true

Note

Even though the --secure parameter does not take a value at the command line, it does take a Boolean value in the client.properties file: true to enable a secure connection, false otherwise.

The following example shows the previous command line example, but without the connection parameters; the CLI reads the values from the user.home/.hq/client.properties file:

prompt$ ./tcsadmin.sh list-servers 

Note

In the remainder of the documentation, it is assumed that you have created a client.properties file that contains the connection parameters; this is so sample usage of the server configuration and application management commands is easier to read.