informix rest api not startable I am currently trying to configure the informix REST API, as specified here.

Overall, I came across two error messages:


Unsupported listener type of rest specified
OP Code is not valid: Check Message format


Can anybody help me understand the following error messages, or point me to a website or documentation for further research? Any help is greatly appreciated.

Current Progress

I have configured the INFORMIXDIR/etc/jsonListener.properties

#wire listener port
listener.port=27017

#wire listener type
listener.type=rest

#connection string for the wire listener
url=jdbc:informix-sqli://localhost:9088/sysmaster:INFORMIXSERVER=&lt;servername&gt;;USER=&lt;username&gt;;PASSWORD=&lt;password&gt;

#anybody can connect
listener.hostName=*


Upon starting the service with a script, I am told, the type of wire listener is unsupported.

2018-05-03 17:19:59 [main] ERROR com.ibm.nosql.informix.server.JsonListenerCLI - NOSQL_LISTENER_TERMINATED_UNEXPECTED
java.lang.Exception : java.lang.RuntimeException: Unsupported listener type of rest specified
at com.ibm.nosql.informix.server.JsonListenerCLI.start(JsonListenerCLI.java:116)
at com.ibm.nosql.informix.server.JsonListenerCLI.run(JsonListenerCLI.java:76)
at com.ibm.nosql.informix.server.JsonListenerCLI.main(JsonListenerCLI.java:34)
Caused by: java.lang.RuntimeException : Unsupported listener type of rest specified
at com.ibm.nosql.informix.server.JsonListenerCLI.start(JsonListenerCLI.java:108)
at com.ibm.nosql.informix.server.JsonListenerCLI.run(JsonListenerCLI.java:76)
at com.ibm.nosql.informix.server.JsonListenerCLI.main(JsonListenerCLI.java:34)


This did strike me as odd, as  it clearly states rest is a valid value for the property listener.type (as can be seen here).

If I remove the listerner.type=rest property, the default value (mongo) will be used and I can start the wire listener.

If I now try to curl the url http://localhost:27017/, I recieve an empty reply from the server. The corresponding error message in my log file goes as follows:

2018-05-03 18:19:19 [JsonListener-1-thread-1] ERROR com.ibm.nosql.informix.server.LwfMessageHandler - NOSQL_GENERIC_EXCEPTION
Error processing message;
java.lang.RuntimeException : OP Code is not valid: Check Message format
at com.ibm.nosql.informix.internal.request.MessageHeader.&lt;init&gt;(MessageHeader.java:119)
at com.ibm.nosql.informix.server.LwfMessageHandler.handleMessage(LwfMessageHandler.java:283)
at com.ibm.nosql.informix.server.LwfMessageHandler.run(LwfMessageHandler.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:736)


The bash script to start the wire listener:

#!/bin/sh

${INFORMIXDIR}/extend/krakatoa/jre/bin/java -jar ${INFORMIXDIR}/bin/jsonListener.jar -config ${INFORMIXDIR}/etc/jsonListener.properties -logfile ${INFORMIXDIR}/jsonListener.log -start &amp; sleep 2
exit
Sorry for the delay answer.

“OP Code is not valid: Check Message format” will happen if you are trying to connect a REST client to the Mongo wire listener. 

You need to start the listener with listener.type=rest set in your listener properties file. 

As for the same question above, there is clearly an old version of the listener being used. 

The listener is giving a very clear error message saying that the REST listener type is not supported. The REST listener was introduced in 12.10.xC4. But from the presence of the JsonListenerCLI class in the exception stack, I can determine that the installation is using a listener from either 12.10.xC2 or xC3.  The JsonListenerCLI class was renamed to ListenerCLI in 12.10.xC4 which is also the first version that include REST listener support.