It is very important to understand the messaging architecture and logical layout of the system. LOUI and LOIS are decoupled and only communicate via the broker. They are not aware of each other and therefore do not depend on each other.

LOUI-LOIS-Communication

In order to launch both applications successfully, they must be able to communicate with an ActiveMQ broker. This does not guarantee that the two applications are configured correctly for proper communication. Both applications also need to specify a machine name that is used as part of the topic names that the applications use for communication.

On LOUI, the configuration information resides in /opt/LOUI/INSTRUMENT_NAME/jndi.properties:

 
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory 

# use the following property to configure the default connector 
java.naming.provider.url=tcp://jumar.lowell.edu:61616 

# use the following property to embed a broker inside this JVM 
useEmbeddedBroker=true 

# use the following property to specify the JNDI name the connection factory 
# should appear as. 
connectionFactoryNames=connectionFactory, queueConnectionFactory, topicConnectionFactry 

#my property to disable persistence 
disablePersistence=true 

# machine name where lois is running. 
loisMachineName=rc1.lowell.edu 

There are 2 entries in the jndi.properties file that are environmentally dependent; java.naming.provider.url and loisMachineName.

The first one is the URI for the broker. If this value is incorrect or if the broker is not running, LOUI will display a dialog box complaining about the problem with the broker. Dismissing the dialog box will also exit LOUI. In other words, LOUI will not launch if it cannot connect to a broker. This URI is a network address that can be either as an IP address or any resolvable name (fully qualified or not).

The second one, loisMachineName, is used for generating and identifying topic names. This value has to be identical in the LOUI and LOIS that are meant to talk to each other. In LOUI it is read from the file above. LOIS first looks in the ActiveMQ.cfg for a field called machqueue. If this is not defined it uses the uname output.

In order to make sure that one has the correct machine name, one can look at the output from LOIS when it is initially launched:

 
obsrc1:~>Lois Home directory set as: /opt/LOIS.test 

LOISDIR environment variable not set ..... using HOME environment variable. 

/LOIS_queue: flags 2048, maxmsgs 10 maxlen 1024 current 0 


Unable to get Active MQ authentication config file! 
Assuming unauthenticated ActiveMQ broker topics 

LOIS Signal Thread Waiting 
Adding LOIS Exit Event Handler.... 
LOIS Command interpreter initialized.... 
Loading the LOIS Console Module...... 
Creating Console command!! 
Clearing command_removed_flagcommand_removed_flag addr = 0x8058844 
Adding LOIS Queue Event Handler.... 
Start connection to Act. MQ broker localhost on port 61616 with machine rc1.lowell.edu 
the broker URI is tcp://localhost:61616?wireFormat=openwire&transport.useAsyncSend=true 
Consumer ActiveMQ connection for LOUI.rc1.lowell.edu.loisCommand, no authentication 
Producer ActiveMQ connection for LOUI.rc1.lowell.edu.loisCommandResult, no authentication 
Producer ActiveMQ connection for LOUI.rc1.lowell.edu.loisLog, no authentication 
Logging Module Loaded 
Producer ActiveMQ connection for LOUI.rc1.lowell.edu.loisLog, no authentication 
Producer ActiveMQ connection for LOUI.rc1.lowell.edu.loisImage, no authentication 
Producer ActiveMQ connection for LOUI.rc1.lowell.edu.loisAnalysis, no authentication 
Producer ActiveMQ connection for LOUI.rc1.lowell.edu.loisTelemetry, no authentication 
Starting the LOIS Console....... 

As we can see, the topics have a prefix of LOUI and they end with the functional name of the topic. These 2 parts are the same for all instruments and the unique machine name is the part that connects a specific LOUI and LOIS together. In this case it is rc1.lowell.edu so this is the value that has to be entered in the jndi.properties file for LOUI.

If this entry is not correct, LOUI and LOIS can both be launched but there will be NO communication between them. They will just be publishing and subscribing to different topic names.

  • No labels