MailCleaner Cluster Configuration

Posted at 7:27:38 PM in Spam Management Gateways (6) | Read count: 2898

I had a frustrating problem (besides getting access to post in the forums), creating a cluster.

I finally got my master up and running like I wanted it to and was ready to create a cluster so I could off load some of my firewall issues. I followed the procedures here:

how to set up more than one filter (master-slave cluster)

First, install each host independently. 
Once installed you will have to get the password created by the mailcleaner installation process. This password is located in the file /etc/mailcleaner.conf. Use this command: 

cat /etc/mailcleaner.conf | grep MYMAILCLEANERPWD

Then:

  1. On the master: 
    Use the script located in /usr/mailcleaner/scripts/configuration/slaves.pl. The first time, you will have to set the real hostname of the master, with option 1) (fully qualified hostname or ip). (by default it is 127.0.0.1). 
    Then select option 4) to add a slave and enter the hostname or ip and the password of the host. 
    Back in the main menu, hit “q” to apply changes.
  2. On the slave: 
    Use the script located in /usr/mailcleaner/scripts/configuration/slaves.pl. The first time, you will have to set the real hostname, with option 1) (fully qualified hostname or ip). (by default it is 127.0.0.1). 
    Then select option 5) to set this host as a slave. Enter master hostname or ip and password. 
    Back in the main menu, hit “q” to apply changes.

You can now reach the admin interface of any host, but only the master will let you configure the system. 
It also is the only one that users can reach in order to access their quarantine.

 

In step one, I was a little confused about which password to use in option 4. The description for getting the password doesn't say which password you are getting, the master or the slave. Naturally, since we are linking both, we need both passwords and I assume we need the password for the slave on the master. It just doesn't say that. I thought the instructions should read: "to add a slave and enter the hostname or IP and the password of the slave." 

Which I did. Then I went to the slave and followed the instructions there, which kept giving me this error:

Syncing to master host (this may take a few minutes)...
** ERROR ** Unknown error !
Check the master hostname or IP address, DNS resolution and that this script has been run on the master first.

Since my slave was just installed, I had forgotten to do an aptitude update and then safe-upgrade, so I tried that and still got the same error. Researching the cause, I found this:

 

olivier wrote:
Jeff Slone wrote:
I get the following error when trying to put 2012.6 to slave to an existing cluster. The cluster upgraded from 2012.5 to 2012.6 with no issues. 


Syncing to master host (this may take a few minutes)... 
** ERROR ** Unknown error !
Check the master hostname or IP address, DNS resolution and that this script has been run on the master first.



I would say.. mmhh... "Check the master hostname or IP address, DNS resolution and that this script has been run on the master first"
You really really need to add the slave in the master first. That's not a joke.



No! I had such a problem and was helped by the decision of "theun":

I just ran into this problem.
The permissions on the script are wrong.
just type:
cd /usr/mailcleaner/bin/
chmod 755 resync_db.sh
They seem to be 644 for some reason on resync_db.sh
rerun the slave script on the slave and resync.
Try using ipadresses if hostnames don't work.
I got it working with ipadresses, haven't tried hostnames yet.

Olivier, check this please. Thank you.

The script is still not executable and doing that chmod did fix the problem. Since this only synchronizes the databases, I'm sure I will still have to apply all the updates and crontab changes manually. More on that later.

Written by Leonard Rogers on Tuesday, February 3, 2015 | Comments (0)


    Name
    URL
    Email
    Email address is not published
    Remember Me
    Comments

    CAPTCHA Reload
    Write the characters in the image above