Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Zimbra Hosting Provider not working

Ximo Mira
2013-02-19
2013-06-12
  • Ximo Mira
    Ximo Mira
    2013-02-19

    Hi,

    Im trying to configure Zimbra Hosting Provider module in MXHero Zimbra SP Edition 1.9.1 64bit under CentOS 6.3. as a relay on antoher box (not installed in Zimbra server). Zimbra server is one server installation version 8.0.2. All other features are working. These are the steps i followed guided by this document http://wiki.mxhero.com:8080/display/docs/Zimbra+SP+Edition

    - Host name input in system properties
    - Pasted dsa key
    - Storage GB cost
    - Bandwith GB cost
    - Currency symbol.

    Then, modified file  /opt/zimbra/.ssh/authorized_keys as the document says.
    After that configuation, the module still has no data in the "Domain list" or in the "Storage Usage" tabs.

    I tried to run manually the perl script that is mentioned in the documentation:

    We have a 'scan' script which explores all your Zimbra deployment and register all information on mxHero database. It's scheduled through /etc/cron.d/mxhero-cron-jobs (the script is: /opt/mxhero/libexec/zimbraCollect.pl)

    So I tried running:

    #perl /opt/mxhero/libexec/zimbraCollect.pl
    

    And i got the following output:

    mxHero Zimbra SP Edition - collecting Zimbra data...
    Connecting to mxHero database.
    Creating Zimbra private key temporary file.
    Getting mailbox servers (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@my.zimbra.host zmprov getAllServers mailbox).
    Getting Zimbra LDAP properties (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@my.zimbra.host zmlocalconfig -s | grep ldap).
    Getting COS list (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@my.zimbra.host zmprov getAllCos).
    Getting COS and Type information.
    IO::Socket::INET: Bad hostname '' at zimbraCollect.pl line 358.
    

    I dont know a word about Perl, but i checked line 358 and hardcoded my server hostname just for testing.

    original line

    my $ldap = Net::LDAP->new($ldapProp->{ldap_host}) || die "$@";
    

    modified line

    my $ldap = Net::LDAP->new('my.zimbra.host') || die "$@";
    

    The i ran again the Perl script and got this output:

    mxHero Zimbra SP Edition - collecting Zimbra data...
    Connecting to mxHero database.
    Creating Zimbra private key temporary file.
    Getting mailbox servers (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@my.zimbra.host zmprov getAllServers mailbox).
    Getting Zimbra LDAP properties (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@my.zimbra.host zmlocalconfig -s | grep ldap).
    Getting COS list (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@my.zimbra.host zmprov getAllCos).
    Getting COS and Type information.
    Saving information on mxHero database.
    Deleting Zimbra private key temporary file.
    Finished!
    

    But still no data on module panel! What am I doing wrong?

     
  • Ximo Mira
    Ximo Mira
    2013-02-19

    I got it working but had to change a couple of things.

    First, hardcoded my zimbra host name as said before.
    Second, removing or commeting the following content from the first line in authorized_keys in my zimbra host for not forcing executing zmrcd command

    command="/opt/zimbra/libexec/zmrcd"
    

    If this is necessary, I will add extra security to my ssh communications between MXHero and Zimbra machines.

    After that, i manually ran the perl script and started to see the info dump from my Zimbra server. Then I saw all the info corretly displayed in MXHero module.

    Hope this helps someone too or makes mxhero team to develop any patch or update.

     
  • Ximo Mira
    Ximo Mira
    2013-02-19

    Hi,
    Yes. I followed step by step the documentation. Is that tutorial checked against my configuration?

    - Zimbra 8.0.2 under CentOS 6.3
    - MXHero Zimbra SP Edition 1.9.1 installer under CentOS 6.3

    In that case, I cant guess why the perl script fails out of the box and why it doesnt work without removing the forced command execute via SSH.

     
  • catindy
    catindy
    2013-05-03

    Hi all,

    I have the same trouble.
    So:
    1- i replaced the line my $ldap = Net::LDAP->new('zimbra.xxx.xxx') || die "$@"; with my ZCS server (hardcoded)
    2- i modified my /opt/zimbra/.ssh/authorized_keys and comment line #command="/opt/zimbra/libexec/zmrcd"
    3- i ran zimbraCollect.pl

    # ./zimbraCollect.pl
    mxHero Zimbra SP Edition - collecting Zimbra data…
    Connecting to mxHero database.
    Creating Zimbra private key temporary file.
    Getting mailbox servers (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@zimbra.xxx.xxx zmprov getAllServers mailbox).
    Getting Zimbra LDAP properties (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@zimbra.xxx.xxx zmlocalconfig -s | grep ldap).
    Getting COS list (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@zimbra.xxx.xxx zmprov getAllCos).
    Getting COS and Type information.
    Saving information on mxHero database.
    Deleting Zimbra private key temporary file.
    Finished!
    #

    All is OK ….
    But, fields in "'Zimbra Hosting Provider" are empty …

    I modified #command="/opt/zimbra/libexec/zmrcd" by deleting '#'. I ran again ./zimbraCollect.pl and now, mxHero shows me a zimbra password prompt to continue …

    # ./zimbraCollect.pl
    mxHero Zimbra SP Edition - collecting Zimbra data…
    Connecting to mxHero database.
    Creating Zimbra private key temporary file.
    Getting mailbox servers (ssh -o StrictHostKeyChecking=no -n -i /tmp/mxhero.zk zimbra@zimbra.xxx.xxx zmprov getAllServers mailbox).
    zimbra@zimbra.xxx.xxx's password:
    Permission denied, please try again.

    What's wrong ??
    zimbra is my ZCS (803) Server.
    zimbra1 is my mxHero Red Hat Server.

    Thanks a lot for a little help !
    Cat'

     
  • Bruno Santos
    Bruno Santos
    2013-05-20

    Hello,

    Actually no changes on the script are necessary.

    The first step is to fill in all the form fields about your Zimbra deployment using mxHero web console. The place to do that is logging in as Admin onto your mxHero web console, click Management > System Properies > Zimbra Hosting Provider Setup.

    About the SSH/remote access configuration, please follow the instructions of the green box in the following document:

    http://wiki.mxhero.com/display/docs/Zimbra+SP+Edition

    It's important for you to know that the 'ldap_host' is picked from your 'zmlocalconfig', so the hostname returned by that command must be valid for the mxHero host.