Batch Server

iKnowBase comes with a batch server used for processing certain off-line and near-line tasks, such as email processing and file format conversion. The batch server is implemented as a java web application, and is typically installed as /ikbBatch.

Currently, the Batch Server handles two sets of services:

Note that the Batch server is only available for 64-bit Linux (the “x86_64” architecture).

Installation

The Batch Server is installed the same way as all other iKnowBase web applications. Note that parts of the BatchServer require java version 6.

The EmailReader

Most of the EmailReader conifguration is performed in the Development Studio, where you define the various email accounts that you want to process, along with the pl/sql packages you want to use for processing the actual messages. However, there is one configuration you may want to make on the EmailReader batch server.

Enable or disable the EmailReader

By default, any running iKnowBase batch server will process email messages. This is nice, unless you happen to have multiple BatchServers installed and running in parallel, which might lead to multiple batch servers accessing the same email account at the same time. This is a potential source of trouble on the email server side, which might not be built for this kind of activity. Therefore, remember to configure the emailreader as shown in the chapter “Configuration”, so that only one BatchServer instance is active.

The FileConverter

The FileConverter is a service that converts documents from a number of file formats, to PDF, HTML or a number of image formats.

Note that the FileConverter service is licensed separately from the core iKnowBase product.

Understanding the FileConverter

The FileConverter installs as a service

Usage of the FileConverter works like this:

The process above implies that for the FileConverter to work, you also need to install a separate Outside In program to the server.

Installing Outside In technology

The Outside In programs are delivered separately from iKnowBase, in a zip-file that will typically be named something like fileConverter-linux-x86-64-outsidein-835.zip. Install this file using the following steps:

$ cd /opt/iknowbase
$ unzip fileConverter-linux-x86-64-outsidein-835.zip

Configuring the FileConverter

The FileConverter must be configured as shown in the chapter “Configuration”.

Testing and troubleshooting

Running tests

The first step is to verify that the converstion program itself runs. Go to the installation directory, and verify that you may run document conversion from the command line:

$ ./exsimple Test.docx Test.pdf pdf.cfg
EX_CALLBACK_ID_PAGECOUNT: The File had 5 pages.
Export successful: 1 output file(s) created.

The second step is to run a “local” conversion from the web-application. Using a browser, open the “/ikbBatch” application. In the tab named “fileconverter”, you will find a number of links for test conversions. They will convert from a Microsoft Word document and a Microsoft PowerPoint presentation, to a number of export formats. Clicking on these will run the server-side conversion, and return the converted document. Using the tests named “Test.docx (local)” and “Test.pptx (local)” will run the test locally, without any database involvment.

The third step is to run a “queue based” conversion. The procedure is the same as above. Using the tests named “Test.docx (queue)” and “Test.pptx (queue)” will send the document through the database for conversion, the same way as most production usage will work.

Missing libraries

A common problem is for conversion to image formats to fail under Linux, due to missing libraries:

$ ./exsimple Test.docx Test.pdf pdf.cfg
./exsimple: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
./exsimple: error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory

Search for the missing file using the “locate”-command, as shown below. If the file is missing, or only available as a stub, the proper library must be installed.

Missing fonts

Another common problem is missing fonts:

[root@ip-10-53-107-93 fileConverter]# ./exsimple Test.docx Test.pdf pdf.cfg
EX_CALLBACK_ID_PAGECOUNT: The File had 1 page.
EXRunExport() failed: The font directory does not contain any font files or the directory is invalid (0x0B02)

This can often be fixed by installing the liberation fonts:

$ yum install liberation-fonts-common liberation-mono-fonts liberation-sans-fonts liberation-serif-fonts libreoffice-opensymbol-fonts