April 23, 2015

Server Setup

Setting up the License Key

For obtaining a valid Cyc license key, see above. For the the Routine Maintenance task of configuring your Cyc license key, see below.

Logger Configuration

Cyc and slf4j

Cyc uses the simple logging facade slf4j to make logging in the Cyc server compatible with the logging framework, such as log4j, that administrators already deploy at their site.

Cyc ships with a slf4j version 1.6 or higher, which automatically configures a no-op logger, should no logging back-end be required.

Logging is currently not available under Windows 7.

Logging is configured in the ${CYC_BASE_DIR}/bin/cyc-runner.sh file, using the following environment variables:

  1. LOG_FRAMEWORK_JARS controls the Jar files for the chosen logging framework that need to be included in the Java class path. This variable is empty by default, causing slf4j to configure a no-op logger. When specified, this variable should mention at least two Jar files, the appropriate slf4j binding implementation and the one or more Jars that make up the chosen logging framework.
  2. LOG_FLAG specifies any optional flags that need to be passed on to the logging infrastructure to configure the facade or the logging framework. By default, this environment variable is empty.

Binding Cyc with a specific Logging Framework

The following steps are necessary to bind Cyc with a specific logging framework. For purposes of illustration, the discussion will assume that the chosen logging framework is log4j.

  1. Put the JAR file for the logging framework (e.g. log4j-1.2.14.jar) into the ${CYC_BASE_DIR}/lib directory.
  2. Put the JAR file for the appropriate slf4j binding implementation (e.g. slf4j-log4j12-1.6.1.jar) into the ${CYC_BASE_DIR}/lib directory.
  3. Open the ${CYC_BASE_DIR}/bin/cyc-runner.sh file in a text editor.
  4. Edit the LOG_FRAMEWORK_JARS variable to include the logging framework and the slf4j binding JAR files (e.g. add lib/slf4j-log4j12-1.6.1.jar lib/log4j-1.2.14.jar to the string value).
  5. Edit the LOG_FLAG variable to customize the logging framework. An example customization for log4j might specify a configuration file (using -Dlog4j.configuration=file:bin/cyc.log4j.properties -Dconfig.location=file) and enable logging framework debugging (using -Dlog4j.debug=true).

${CYC_BASE_DIR}/bin/cyc.log4j.properties is an example configuration file for log4j that can server, mutatis mutandis, to configure other logging frameworks. Notice esp the section on turning off logging for specific modules of the core KB storage system, whose API methods are used pervasively and can swamp other logging information.

Password Authentication

Cyc supports password authentication of Cyclists in the Cyc Browser. This support is turned off by default but can be enabled in a straightforward fashion.

Specifying a Password for a Cyclist

Currently, any authenticated user can provide a password for any other Cyclist. In order to bootstrap this process, one has to first specify the password for the Cyc Administrator, and then enable password authentication. Cyc securely hashes the user name and the password and stores the result in plain-text in the KB. Since the authentication information is stored in the KB, the KB has to be persisted.

In the Cyc Browser, use Tools | Set Password to specify a password for a Cyclist. The tool will assert the hashed password, but the KB still needs to be persisted.

Enabling Password Authentication in the Cyc Server

In the configuration file ${CYC_BASE_DIR}/init/release-specific-init.lisp, add the following line:

(noting-progress “Enabling password authentication”   (csetq *image-requires-authentication?* T))

Once the setting is enabled, all Cyc browser users need to authenticate themselves by password before they can proceed.

Home Server Operation