Configuring the wire listener for the first time

You must configure the wire listener by specifying an authorized user and customizing the wire listener configuration file.

Before you begin

The wire listener JAR file is included in the database server installation.

About this task

If you create a server instance as a part of the installation process, the wire listener is configured with default properties and started:
  • A wire listener configuration file, $INFORMIXDIR/etc/jsonListener.properties, is created.
  • The ifxjson user, which has REPLICATION privilege group access, is created and added to the url parameter in the wire listener configuration file. This user ID is used by the wire listener to connect to .
  • The wire listener is started and connected to the MongoDB API and the database server.

If you want to use the REST API or MQTT protocol, or make other changes, edit the wire listener configuration file and restart the wire listener.

Procedure

To configure the wire listener for the first time:

  1. Choose an authorized user. An authorized user is required in wire listener connections to the database server. The authorized user must have access to the databases and tables that are accessed through the wire listener.
    • Windows: Specify an operating system user.
    • UNIX or Linux: Specify an operating system user or a database user. For example, here is the argument to create a database user in UNIX or Linux:
      CREATE USER userID WITH PASSWORD 'password' ACCOUNT unlock PROPERTIES
       USER daemon;
  2. Optional: If you want to shard data, grant the user REPLICATION privilege by running the admin or task SQL administration API command with the grant admin argument. The ifxjson user has REPLICATION privilege. For example:
    EXECUTE FUNCTION task('grant admin','userID','replication');
  3. Create a wire listener configuration file in $INFORMIXDIR/etc with the .properties file extension. You can use the $INFORMIXDIR/etc/jsonListener-example.properties file as a template. For more information, see The wire listener configuration file.
  4. Customize the wire listener configuration file to your needs. To include parameters in the wire listener, uncomment the row and customize the parameter. The url parameter is required. All other parameters are optional.
    Tip: Review the defaults for the following parameters and verify that they are appropriate for your environment: mongo.api.verion,authentication.enable, listener.type, listener.port, and listener.hostName.
  5. If you are using a Dynamic Host Configuration Protocol (DHCP) on your IPv6 host, you must verify that the connection information between JDBC and Informix® is compatible.

    For example, you can connect from the IPv6 host through an IPv4 connection by using the following steps:

    1. Add a server alias to the DBSERVERALIASES configuration parameter for the wire listener on the local host. For example: lo_informix1210.
    2. Add an entry to the sqlhosts file for the database server alias to the loopback address 127.0.0.1. For example:
      ol_informix1210 onsoctcp 127.0.0.1 9090
    3. In the wire listener configuration file, update the url entry with the wire listener alias. For example:
      url=jdbc:informix-sqli://localhost:9090/sysmaster:
      INFORMIXSERVER=ol_informix1210;

What to do next

Start the wire listener.

Copyright© 2018 HCL Technologies Limited