question

Upvotes
Accepted
16 2 2 4

RFA Api connection going wrong and no debug info

I have a simple java program to connect to Rmds Server using RFA api. When I run the program , I can see the Context getting initialized , Session being acquired and the Client being registered. But I do not see any connection coming into the Server , and I dont get any callback on client . I do not get any errors or logs or exceptions. I dont know how do I debug whats going wrong.

treprfarfa-apijava
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

my config is :

ConfigDb config = new ConfigDb(); config.addVariable("rmdssourcens.Connections.consumerConnection.serverList", "<2 host names here>"); config.addVariable("rmdssourcens.Connections.consumerConnection.portNumber", "8101"); config.addVariable("rmdssourcens.Connections.consumerConnection.connectionType", "SSL"); config.addVariable("rmdssourcens.Sessions.consumerSession.connectionList", "consumerConnection");

Upvotes
Accepted
281 1 3 7

Generally, the application using SSL connection does not require the local entitlement (i.e. checking user permission locally) so the local entitlement should be disabled by setting the parameters dacs_CbeEnabled, dacs_SbeSubEnabled, and dacs_SbePubEnabled to false. Also, by default, the downloadDataDict is false; as a result, the data dictionary are loaded from local files so the parameters masterFidFile and enumTypeFile should specify the path to the dictionary files appendix_a and enumtype.def, respectively. Otherwise, the downloadDataDict parameter should be set to true to make the application download the dictionary from the server instead.

A typical RFA configuration for the SSL connection is shown below. For debugging, the RFA logging can be enabled by setting the parameters mountTrace to true (to log the connection establishing steps) and ipcTraceFlags to 15 (to log in-bound and out-bound messages with hex trace) or 7 (to log only in-bound and out-bound messages). By default, the log file named RFA_SSL.log is generated (the file name as specified with the logFileName parameter). The logging messages can also re-directed to the console by setting logFileName parameter to "console".

ConfigDb config = new ConfigDb(); 
config.addVariable("rmdssourcens.Connections.consumerConnection.serverList", "192.168.27.46, 192.168.27.48"); 
config.addVariable("rmdssourcens.Connections.consumerConnection.portNumber", "8101");
config.addVariable("rmdssourcens.Connections.consumerConnection.dacs_CbeEnabled", "false");
config.addVariable("rmdssourcens.Connections.consumerConnection.dacs_SbeSubEnabled", "false");
config.addVariable("rmdssourcens.Connections.consumerConnection.dacs_SbePubEnabled", "false");
config.addVariable("rmdssourcens.Connections.consumerConnection.downloadDataDict", "false");
config.addVariable("rmdssourcens.Connections.consumerConnection.masterFidFile", "/var/triarch/appendix_a");
config.addVariable("rmdssourcens.Connections.consumerConnection.enumTypeFile", "/var/triarch/enumtype.def");
config.addVariable("rmdssourcens.Connections.consumerConnection.logFileName", "RFA_SSL%u.log");
config.addVariable("rmdssourcens.Connections.consumerConnection.mountTrace", "true");
config.addVariable("rmdssourcens.Connections.consumerConnection.ipcTraceFlags", "15");
config.addVariable("rmdssourcens.Connections.consumerConnection.connectionType", "SSL"); 
config.addVariable("rmdssourcens.Sessions.consumerSession.connectionList", "consumerConnection");
    	
Context.initialize(config);
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1.2k 23 28 42

By default RFA+SSL will create a log file named "RFA_SSL0.log" in the application's current working directory. However you may find the log file to be an empty XML document:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd"><log></log>

It is necessary to set the configuration parameter "ipcTraceFlags" per the RFA/J Configuration and Logging Guide to "15" to enable full tracing. The parameter "logFileName" must not be set to "none". This produces verbose output.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
<date>2016-05-17T09:02:08</date>
<millis>1463490128098</millis>
<sequence>1</sequence>
<logger>com.reuters.ssl.0</logger>
<level>FINER</level>
<class>com.reuters.ipc.TraceLogger</class>
<method>traceData</method>
<thread>11</thread>
<message>
Thread: _Default::Session Session EventQueueGroup
Connection 0
RECEIVE:
msg_type: PT1BE_SERVICE_INFO (11)
eventClass: SSL.EC_DEFAULT_HANDLER (0)
eventType: SSL.ET_SERVICE_INFO (45)
serviceName: PB2
serviceId: 1
statusState: SS_SERVER_UP (1)
statusCode: NONE (0)
text: Service Up
requestId: 1
group: 0
requestType: 2
priorityClass: 0
priorityCount: 0
dataTypeFormat: DF_MARKETFEED_RECORD (2)
dataTypeDescriptor: 0 </message> </record>

It is highly recommended for new apps to use the RSSL protocol which also provides improved logging and debugging services. Please take a look at EMA/Java which requires less than 100 lines of code to consume data.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1.2k 23 28 42

Modify the default J.U.L. logging level of RFA with the following:

java.util.logging.Logger rfa_logger = java.util.logging.Logger.getLogger ("com.reuters.rfa");
rfa_logger.setLevel (java.util.logging.Level.FINE);

This will produce verbose logging on the console,

Sending CONNECTION_STATUS_MSG, connection name = _Default::Connection, status = { state: DOWN, code: NONE, text: "uninitialized"}
Sending CONNECTION_STATUS_MSG, connection name = _Default::Connection, status = { state: UP, code: NONE, text: "nylabads2"}
Sending MARKET_DATA_SERVICE_STATUS_MSG, Service name = PB2, Feed name = PB2, Data format = { MarketFeed }, InfrastructureType = TRIARCH, DataDictInfo[] = { MarketFeed }, Qos = (Unspecified, Unspecified), MarketDataSvcStatus = { state: UP, code: NONE, text: "Service Up"}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea