Endpoint Security Complete

 View Only

RabbitMQ Master & Slave Configurations Fail to Complete 

Oct 27, 2015 12:37 PM

If the below errors are displayed in the '/var/log/nukona/load_settings.log' file upon trying to configure the Master and Slave installations of RabbitMQ from the Mobility Suite .iso file, then the '/usr/local/nukona/python/lib/python2.7/site-packages/load_settings/processors/rabbitmq.py' file needs to be modified:

timestamp=2015-10-27 00:25:22.334 +0000,logname=load-settings,level=INFO,msg=Already in /etc/hosts: "127.0.0.1   ffxrabbitmaster"
timestamp=2015-10-27 00:25:22.334 +0000,logname=load-settings,level=ERROR,msg=module rabbitmq had an exception: need more than 1 value to unpack
timestamp=2015-10-27 00:25:22.337 +0000,logname=load-settings,level=ERROR,Traceback (most recent call last):
  File "/usr/local/nukona/python/lib/python2.7/site-packages/load_settings/api.py", line 414, in run_load_settings
    if not self.processors[section.name].process(section.settings, self.args, all_settings):
  File "/usr/local/nukona/python/lib/python2.7/site-packages/load_settings/processors/rabbitmq.py", line 401, in process
    if not self.handle_rabbit_conf(settings, other_args, all_settings):
  File "/usr/local/nukona/python/lib/python2.7/site-packages/load_settings/processors/rabbitmq.py", line 569, in handle_rabbit_conf
    node_name, node_hostname = rabbit_node.split('@')
ValueError: need more than 1 value to unpack

timestamp=2015-10-27 00:30:32.999 +0000,logname=load-settings,level=INFO,msg=-------- Attemping to stop all services --------
timestamp=2015-10-27 00:30:32.999 +0000,logname=load-settings,level=INFO,msg=STOPing service: (99, 1, /etc/init.d/monit)
timestamp=2015-10-27 00:30:33.99 +0000,logname=load-settings,level=INFO,msg=STOPing service: (2, 2, /etc/init.d/postfix)
timestamp=2015-10-27 00:30:33.155 +0000,logname=load-settings,level=INFO,msg=STOPing service: (3, 56, /etc/init.d/rabbitmq-server)
timestamp=2015-10-27 00:30:34.200 +0000,logname=load-settings,level=ERROR,msg=!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
timestamp=2015-10-27 00:30:34.201 +0000,logname=load-settings,level=ERROR,msg=Load settings failed to complete!
timestamp=2015-10-27 00:30:34.201 +0000,logname=load-settings,level=ERROR,msg=!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
timestamp=2015-10-27 00:30:34.242 +0000,logname=load-settings,level=ERROR,msg=output: Warning: appstore_cu not detected. Using default prefixes.

timestamp=2015-10-27 00:30:34.243 +0000,logname=load-settings,level=ERROR,msg=errors:
timestamp=2015-10-27 00:33:33.548 +0000,logname=load-settings,level=INFO,msg=Creating bootstrap config and writing to /usr/local/nukona/etc/settings.cfg

The 'rabbitmq.py' file can be modified by using the following command from the Terminal on the RabbitMQ Master and Slave servers:

vi /usr/local/nukona/python/lib/python2.7/site-packages/load_settings/processors/rabbitmq.py

Once you are editing the 'rabbitmq.py' file, type in the following command, press <Enter>, and press the <Page Down> key until you arrive at lines 567-572:

:set number

Lines 567-572 should look like the below code snippet:

567        # Now we have to set the node names in /etc/hosts
568         for rabbit_node, address in settings['other_nodes']:
569             node_name, node_hostname = rabbit_node.split('@')
570             if not self.add_etc_hosts_entry(address, node_hostname):
571                 self.logger.error('Failed to add %s %s to /etc/hosts',       address, node_hostname)
572                 return False

These lines need to be 'Commented Out' by pressing 'i' and typing in a hash symbol (#) in front of the text on lines 568-572 as shown below:

567        # Now we have to set the node names in /etc/hosts
568        # for rabbit_node, address in settings['other_nodes']:
569        #    node_name, node_hostname = rabbit_node.split('@')
570        #     if not self.add_etc_hosts_entry(address, node_hostname):
571        #         self.logger.error('Failed to add %s %s to /etc/hosts',       address, node_hostname)
572        #         return False

Once these changes have been made, you may proceed to press the <Esc> key, type ':wq', and press the <Enter> key.

Now that this peice of code has been 'Commented Out', you may proceed to press the 'Ok' button on the Configurator screen where the failure is shown and resume the configuration again. This time, the below image should be seen in the Configurator screen after a few moments:

RabbitMQ-Success.png

*Note* - The peice of code that we 'Commented Out' is important if you do not already have your /etc/hosts file properly formatted with your RabbitMQ Master and Slave's hostnames included in the IPv4 loopback.

In order to perform this process manually, type in the following command into the Terminal on your RabbitMQ Master and Slave servers:

vi /etc/hosts

The contents of your /etc/hosts file should look similar to the below example with the important difference being that the 'HostNameGoesHere' entry should be the hostname of your RabbitMQ Master or Slave server:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 HostNameGoesHere
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 HostNameGoesHere

 

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.