Zimbra 6.x - Hostname Change

Wed 22 September 2010

Filed under Email

Tags Geek Lamer Moments

Zimbra Management

Read This Fine Article - it tells you how, almost. I didn't find it that great. It tells you what to do but lends no guidance as to how to fix brokenness.

Changing the name

Ultimately, I got a message which many people have seen:

Unable to contact ldap://mail2.oldname.org:389: Connection refused
Unable to contact ldap://mail2.oldname.org:389: Connection refused

After that, I tried to start Zimbra and everything went to hell. My Zimbra server is in a VMware ESXi host, and I used snapshots. I didn't have to backup, I just snap'd. Then after about 3 restores I found my problems.

How I succeeded

I did all the steps as listed, and I commited a "zmcontrol stop". I did not proceed once I hit the error. I assumed that none of the actual work was complete, and I tried again. Finally, I stared ldap manually then re-executed the name-change with an addition argument.

Short:

  • zmcontrol stop

  • zmsetservername -n mail.newhotness.net

  • insert ldap connection error here

  • as root, start ldap (see below)

  • zmsetservername -o mail.oldname.org -n mail.newhotness.net

  • WIN (see output below)

For detailed output, or what my situation actually appeared like, please see the detailed output.

Details

manually running ldap (done a root)

root@mail2:~# /opt/zimbra/openldap/sbin/slapd -l LOCAL0 -4 -u zimbra -h ldap://mail.oldname.org:389 ldapi:/// -F /opt/zimbra/data/ldap/config

zmserveservername the first attempt which fails.

zimbra@mail2:~$ /opt/zimbra/libexec/zmsetservername -n mail.newhotness.net
Getting local config zimbra_home=/opt/zimbra
Getting local config zimbra_server_hostname=mail2.oldname.org
Getting local config ldap_is_master=true
Getting local config zimbra_ldap_userdn=uid=zimbra,cn=admins,cn=zimbra
Getting local config zimbra_ldap_password=YHCuzoFNIH
Getting local config ldap_master_url=ldap://mail2.oldname.org:389
Getting local config ldap_starttls_supported=1
Getting global config zimbraLogHostname=mail2.oldname.org
Renaming mail2.oldname.org to mail.newhotness.net
Shutting down zimbra...done.
Setting local config ldap_master_url=ldap://mail.newhotness.net:389
Getting local config ldap_url=ldap://mail2.oldname.org:389
Setting local config ldap_url=ldap://mail.newhotness.net:389
Getting local config ldap_host=mail2.oldname.org
Setting local config ldap_host=mail.newhotness.net
Getting local config av_notify_user=admin@mail2.oldname.org
Setting local config av_notify_user=admin@mail.newhotness.net
Getting local config av_notify_domain=mail2.oldname.org
Setting local config av_notify_domain=mail.newhotness.net
Getting local config snmp_trap_host=mail2.oldname.org
Setting local config snmp_trap_host=mail.newhotness.net
Getting local config smtp_source=admin@mail2.oldname.org
Setting local config smtp_source=admin@mail.newhotness.net
Getting local config smtp_destination=admin@mail2.oldname.org
Setting local config smtp_destination=admin@mail.newhotness.net
Setting local config zimbra_server_hostname=mail.newhotness.net
Starting ldap...done.
Unable to contact ldap://mail2.oldname.org:389: Connection refused
Unable to contact ldap://mail2.oldname.org:389: Connection refused
Services: Getting local config ldap_port=389
Reinitializing the mta config...done.
Reinitializing the snmp config...done.

zmserveservername success

zimbra@mail2:~$ /opt/zimbra/libexec/zmsetservername -o mail2.oldname.org  -n mail.newhotness.net
Getting local config zimbra_home=/opt/zimbra
Getting local config ldap_is_master=true
Getting local config zimbra_ldap_userdn=uid=zimbra,cn=admins,cn=zimbra
Getting local config zimbra_ldap_password=YHCuzoFNIH
Getting local config ldap_master_url=ldap://mail.newhotness.net:389
Getting local config ldap_starttls_supported=1
Getting global config zimbraLogHostname=mail2.oldname.org
Renaming mail2.oldname.org to mail.newhotness.net
Shutting down zimbra...done.
Getting local config ldap_url=ldap://mail.newhotness.net:389
Getting local config ldap_host=mail.newhotness.net
Getting local config av_notify_user=admin@mail.newhotness.net
Getting local config av_notify_domain=mail.newhotness.net
Getting local config snmp_trap_host=mail.newhotness.net
Getting local config smtp_source=admin@mail.newhotness.net
Getting local config smtp_destination=admin@mail.newhotness.net
Getting local config zimbra_server_hostname=mail.newhotness.net
Starting ldap...done.Searching for ldap server entry...done.
Renaming cn=mail2.oldname.org,cn=servers,cn=zimbra...done.
Updating zimbraServiceHostname for cn=mail.newhotness.net,cn=servers,cn=zimbra...done.
Updating zimbraMtaAuthHost for cn=mail.newhotness.net,cn=servers,cn=zimbra...
Updating zimbraSpellCheckURL for cn=mail.newhotness.net,cn=servers,cn=zimbra...done.
Updating zimbraSmtpHostname for cn=mail.newhotness.net,cn=servers,cn=zimbra...done.
Updating zimbraLogHostname for cn=config,cn=zimbra...done.
Updating zimbraMailHost for uid=admin,ou=people,dc=mail2,dc=oldname,dc=org...done.
Updating zimbraMailHost for uid=spam.t6_4cyqfe,ou=people,dc=mail2,dc=oldname,dc=org...done.
Updating zimbraMailHost for uid=ham.ova7qhcg,ou=people,dc=mail2,dc=oldname,dc=org...done....[snip]...................
Updating zimbraMailTransport for uid=admin,ou=people,dc=mail2,dc=oldname,dc=org...done.
Updating zimbraMailTransport for uid=spam.t6_4cyqfe,ou=people,dc=mail2,dc=oldname,dc=org...done.
Updating zimbraMailTransport for uid=ham.ova7qhcg,ou=people,dc=mail2,dc=oldname,dc=org...done.
Updating zimbraMailTransport for uid=galsync,ou=people,dc=oldname,dc=org...done.
Updating zimbraMailTransport for uid=backup,ou=people,dc=mail2,dc=oldname,dc=org...done.
Updating zimbraMailTransport for uid=andi,ou=people,dc=oldname,dc=org...done....[snip]...................
Services: Getting local config ldap_port=389Reinitializing the mta config...done.Reinitializing the snmp config...done.


Comments


Up To Something © Joshua M Schmidlkofer Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More