suche 36x36

Setting up the NoSQL functionality on an existing instance


nosql-leafs-200x133sWith the Version 12.10.xC2 IBM created the opportunity to access the Informix database with MongoDB-clients and to use the Informix NoSQL functionality.

Unfortunately getting this fantastic feature requires to build up a new instance. All descritptions of the IBM proclaim, that the installer of the xC2 version has to create a new instance. Then the functionality, based on the copiyng and adjusting of 2 files, can be transferred to further new instances which are created manually.

How do I install and configure NoSQL?

How do I configure an additional instance of IDS with NoSQL support?

Unfortunately there is no description of how I can enable the functionality on an existing instance.

Technically the NoSQL functionality is carried out as UDR. The necessary functions, Cast etc. are contained in the bootstrap-Script of the version 12.10xC2. The listener of MongoDB-clients is not contained by the oninit, but is implemented as extra Java-Service.

The listener is started  by the Informix internal scheduler which checks the existence of the file $INFORMIXDIR/etc/jsonListener.properties and starts it, if the file exists.

The name of the file jsonListener.properties will be deposited during the initialization of the instance in the Start-Task. Therefor also multiple instances can us the Json-functionality within a single installation.

This article is meant to be a manual of how one enables the NoSQL functionality in an existing instance.

First of all you should save your instance of course.

Then an update to the respective 12.10.xC2 version occurs. Thereby you specify the path of your former installation and takes care of, that the option "Json Client Support" is ticked.

Installer

After the installation is done, you will need a few more files. We assembled here a package icon Informix-NoSQL-Update-Files of the necessary files for you.

All following actions have to be conducted under the account informix!

First of all you have to create the UDR functions. Therefor you start a Shell with an Informix-environment. Then you go to the directory $INFORMIXDIR/etc and conduct the following command:

dbaccess sysadmin boot1210.sql

The script should run through without an error.

Now you need the file $INFORMIXDIR/etc/jsonListener.properties . This one is contained by the package, but needs to be edited appropriately.

Here an example:

Windows:

listener.port=27017
url=jdbc:informix-sqli://<hostname/IP des DB-Servers>:<Port des Informix SQLI
Listeners>/sysmaster:INFORMIXSERVER=<INFORMIXSERVER-Name>

Unix/Linux:

listener.port=27017
url=jdbc:informix-sqli:/<hostname/IP des DB-Servers>:<Port des Informix SQLI
Listeners>/sysmaster:INFORMIXSERVER=<INFORMIXSERVER-Name>;USER=<Username
Default: ifxjson>;PASSWORD=<Passwort>

And another example:

listener.port=27017
url=jdbc:informix-sqli:/dbserver.cursor.de:9088/sysmaster:INFORMIXSERVER=ol_informix1210;USER=ifxjson;PASSWORD=extremgeheim

Here you can find the complete documentation of the jsonListener.properties file.

After this file has been created correctly, the Scheduler-entry that starts the service has to be created. Furthermore a special user for the listener has to be created on the Unix-platforms.

Only Linux/Unix:

Therefor the user daemon has to be registered in the surrogates cache. A file has to be created in /etc/informix. The rights have to be:

-rw-r--r-- 1 root root 14 Oct 31 13:35 allowed.surrogates

At least this file has to contain:

USERS: daemon

You can check if this file has been created correctly by calling up:

onmode -cache surrogates

This command has to run through without an error. If an error occurs, you can find the cause in the online.log (onstat -m).

Now, depending on the platform, the by the package contained file sch_init_<plattform>.sql has to be executed.

The characteristic of Unix/Linux is, that here the user ifxjson will be created. Of course the corresponding passwort 'extremgeheim' has to be substituted with an appropriate one, that has to be the same as the one in the jsonListener.properties .

If multiple instances of an installation shall start the Listener you have to specify in this file, in the line:

LET json_listener = 'jsonListener.properties';

for each instance another filename. According to this the files have to be created and attached with the correct values.

dbaccess sysadmin sch_init_<Plattform>.sql

Now you can restart the instanz. If the Listener does not start, you should check again, if the task "json listener" is listed as enabled = 't' in the sysadmin.ph_task .

When the Listener has started, you can access the NoSQL-functionality of the Informix database with MongoDB-clients. My test-client was Robomongo.

Troubleshooting:

My Linux-installation worked with this manual without a problem. I struggled a little more with Windows. Here the firewall must not block the Java-process. So you have to allow $INFORMIXDIR/etc/extend/krakatoa/jre/bin/java.exe as programm.

The Listener writes a file jsonListener.log in the $INFORMIXDIR. There you can find helpful information, respectively Java-stacktraces from which you can get the cause, why the process does not start quite easily.

But here you can start the Listener manually. Therefor you use the following command as Informix from the $INFORMIXDIR:

extendkrakatoajreinjava.exe -Dcom.ibm.tools.attach.enable=no -jar %INFORMIXDIR%injsonListener.jar -config %INFORMIXDIR%etcjsonListener.properties -logfile %INFORMIXDIR%jsonListener.log -start

or under Linux:

extend/krakatoa/jre/bin/java -Dcom.ibm.tools.attach.enable=no -jar $INFORMIXDIR/bin/jsonListener.jar -config $INFORMIXDIR/etc/jsonListener.properties -logfile $INFORMIXDIR/jsonListener.log -start

Then you will get the respective logile written. If the Listener starts correctly this way, you can also test the NoSQL functionality with it.

For further outputs you can enable the trace-function when starting it. Therefor you have to add to the command the option

-loglevel trace

The possible levels are error, warn, info, debug and trace.

 icon Informix-NoSQL-Update-Dateien

Dipl. Wirtschaftsinformatiker Andreas Seifert
(business division IBM Distribution)
 
CURSOR Software AG  
Friedrich-List-Straße 31  
D-35398 Gießen  
This email address is being protected from spambots. You need JavaScript enabled to view it.

News OverviewNews Overview
News Overview
Informix NewsInformix News
Informix News
Scout NewsblogScout Newsblog
Scout Newsblog
Our NewsletterOur Newsletter
Our Newsletter
News ArchiveNews Archive
News Archive