Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Changing server name

  1. #1
    lilwong is offline Intermediate Member
    Join Date
    Jun 2006
    Posts
    22
    Rep Power
    9

    Default Changing server name

    I've set up several mail domains on my Zimbra server successfully and everything's about to go live when one of the decision makers stumbled on something really stupid and needless (IMHO) that he just can't live with.

    Our company domain name is mycompany.com (actual names have been changed) but while I was setting up the server I didn't have access to the DNS records of the mycompany.com so I set up the server with a sub-hostname under my personal domain name "zimbra.mypersonal.com". So right now when I log into the admin panel, the server list would be displayed as zimbra.mypersonal.com. That's fine, but the pointy-haired guy in question noticed that in all mails sent through the Zimbra MTA had "zimbra.mypersonal.com" in the mail headers, he flipped, saying that it was unprofessional to have a personal domain name in corporate emails etc.

    I tried to change the server hostname to zimbra.mycompany.com but logging in via webmail just throws an exception and I can't fetch any mailbox via webmail. Changing the webmail MTA hostname doesn't give any effect either.

    I read through the posting here explaining how to migrate users to different hostnames but that's not what I'm trying to achieve. The domain names of each user is correct, it's just the SMTP server hostname that I'm trying to change. Changing the server hostname in /etc/sysconfig/network doesn't seem to do anything. Anyway, I tried to do some of the stuff advised in the article above and I seem to have screwed up something worse. Now, I see TWO servers in my server list: zimbra.mypersonal.com and zimbra.mycompany.com. Mails seem to still work ok but I'm rather concerned about what's going on behind the scenes here. Can anybody help? I would like to avoid having to reinstall anything as a couple of the domains create are already live and in use. It's just the main holding company's one that's holding out now.

    Thanks!

  2. #2
    bobby is offline Zimbra Employee
    Join Date
    Nov 2005
    Posts
    518
    Rep Power
    10

    Default

    there is a command "zmsetservername <new-zmhostname>" which changes hostname settings in zimbra. it may not catch everything, but you can check manually. use zmlocalconfig and zmprov to check the global config, server configs, user settings, etc.

    zmprov gacf | grep zimbra.personal.com
    etc...

    these are changes i made manually after zmsetservername:

    zmprov mcf zimbraLogHostname zimbra.company.com
    zmlocalconfig -e zimbra_server_hostname=zimbra.company.com
    zmlocalconfig -e ldap_master_url=ldap://zimbra.company.com:389
    zmlocalconfig -e ldap_url=ldap://zimbra.company.com
    zmlocalconfig -e snmp_trap_host=zimbra.company.com
    zmlocalconfig -e av_notify_user=admin@company.com
    zmlocalconfig -e smtp_destination=admin@company.com
    zmlocalconfig -e smtp_source=admin@company.com

    also regenerate the certs

    it doesn't hurt to back everything up before starting this process

  3. #3
    Shurik is offline Member
    Join Date
    Aug 2006
    Posts
    12
    Rep Power
    9

    Default Same issue on 3.2

    I have this very same issue on a 3.2 demo. but the command you mentioned is not there "zmsetservername ". Furthermore.. may i just change the server host name in the MTA and nothing else?

  4. #4
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    It should be in libexec.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  5. #5
    jml75 is offline Loyal Member
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default Zimbra does not restart after servername change.

    Hello,

    I'm struggling with a server name change here.

    What I'm trying to do is to get a copy of my running install working under test.mydomain.com instead of courriel.mydomain.com to test the upgrade process from 3.1.4 to 4.0.4.

    So I installed a new fresh Debian 3.1 install, I installed 3.1.4 on it and then I restored the backup of my main server wich runs the same os and the same zimbra version.

    Then I tried to make the name change with zmsetservername.

    Then I started having problems.

    When I did as zimbra : zmcontrol start, I only was getting,

    Host test.mydomain.com
    Starting ldap...Done.

    And nothing else.

    I searched this forums for ints and I found this thread.

    I read it andthe other one mentionned in here and after doing all of what bobby suggested, I'm still unable to restart the server still getting the same behavior.

    In zimbra.log I get:

    Attempted reconnect 3 times. Giving up.
    at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2749)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1 485)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:266)
    at java.sql.DriverManager.getConnection(DriverManager .java:525)
    at java.sql.DriverManager.getConnection(DriverManager .java:140)
    at org.apache.commons.dbcp.DriverManagerConnectionFac tory.createConnection(DriverManagerConnectionFacto ry.java:97)
    at org.apache.commons.dbcp.PoolableConnectionFactory. makeObject(PoolableConnectionFactory.java:300)
    at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(GenericObjectPool.java:816)
    at org.apache.commons.dbcp.PoolingDriver.connect(Pool ingDriver.java:171)
    at java.sql.DriverManager.getConnection(DriverManager .java:525)
    at java.sql.DriverManager.getConnection(DriverManager .java:193)
    at com.zimbra.cs.db.DbPool.getConnection(DbPool.java: 274)
    ... 8 more
    2006-11-28 09:54:59,914 WARN [Timer-0] [] DbStats - An error occurred while getting current database stats
    com.zimbra.cs.service.ServiceException: system failure: getting database connection
    at com.zimbra.cs.service.ServiceException.FAILURE(Ser viceException.java:131)
    at com.zimbra.cs.db.DbPool.getConnection(DbPool.java: 283)
    at com.zimbra.cs.db.DbUtil.executeQuery(DbUtil.java:1 69)
    at com.zimbra.cs.db.DbUtil.executeQuery(DbUtil.java:1 96)
    at com.zimbra.cs.db.DbStats.getStatus(DbStats.java:87 )
    at com.zimbra.cs.db.DbStats.getStatData(DbStats.java: 58)
    at com.zimbra.cs.stats.RealtimeStats.getData(Realtime Stats.java:75)
    at com.zimbra.cs.stats.ZimbraPerf$ZimbraStatsDumper.r un(ZimbraPerf.java:534)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.SocketException: java.net.ConnectException: Connection refused'.

    ** BEGIN NESTED EXCEPTION **

    java.net.SocketException
    MESSAGE: java.net.ConnectException: Connection refused

    STACKTRACE:

    java.net.SocketException: java.net.ConnectException: Connection refused
    at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:156)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
    at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2680)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1 485)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:266)
    at java.sql.DriverManager.getConnection(DriverManager .java:525)
    at java.sql.DriverManager.getConnection(DriverManager .java:140)
    at org.apache.commons.dbcp.DriverManagerConnectionFac tory.createConnection(DriverManagerConnectionFacto ry.java:97)
    at org.apache.commons.dbcp.PoolableConnectionFactory. makeObject(PoolableConnectionFactory.java:300)
    at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(GenericObjectPool.java:816)
    at org.apache.commons.dbcp.PoolingDriver.connect(Pool ingDriver.java:171)
    at java.sql.DriverManager.getConnection(DriverManager .java:525)
    at java.sql.DriverManager.getConnection(DriverManager .java:193)
    at com.zimbra.cs.db.DbPool.getConnection(DbPool.java: 274)
    at com.zimbra.cs.db.DbUtil.executeQuery(DbUtil.java:1 69)
    at com.zimbra.cs.db.DbUtil.executeQuery(DbUtil.java:1 96)
    at com.zimbra.cs.db.DbStats.getStatus(DbStats.java:87 )
    at com.zimbra.cs.db.DbStats.getStatData(DbStats.java: 58)
    at com.zimbra.cs.stats.RealtimeStats.getData(Realtime Stats.java:75)
    at com.zimbra.cs.stats.ZimbraPerf$ZimbraStatsDumper.r un(ZimbraPerf.java:534)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)


    ** END NESTED EXCEPTION **


    Attempted reconnect 3 times. Giving up.
    at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2749)
    at com.mysql.jdbc.Connection.<init>(Connection.java:1 485)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:266)
    at java.sql.DriverManager.getConnection(DriverManager .java:525)
    at java.sql.DriverManager.getConnection(DriverManager .java:140)
    at org.apache.commons.dbcp.DriverManagerConnectionFac tory.createConnection(DriverManagerConnectionFacto ry.java:97)
    at org.apache.commons.dbcp.PoolableConnectionFactory. makeObject(PoolableConnectionFactory.java:300)
    at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(GenericObjectPool.java:816)
    at org.apache.commons.dbcp.PoolingDriver.connect(Pool ingDriver.java:171)
    at java.sql.DriverManager.getConnection(DriverManager .java:525)
    at java.sql.DriverManager.getConnection(DriverManager .java:193)
    at com.zimbra.cs.db.DbPool.getConnection(DbPool.java: 274)
    ... 8 more

    Any clues?

    Thanx!

  6. #6
    eintel is offline Partner (VAR/HSP)
    Join Date
    Nov 2006
    Posts
    12
    Rep Power
    8

    Default

    We went thru a similar process recently & had the same problem. The way I solved was:
    - setup fresh machine
    - give it the same hostname as backed up install
    - install zimbra
    - restore backup
    - check that restore worked
    - change zimbra servername using zmsetservername
    - set hostname of machine to correct name
    - (re)start zimbra

    You may also be able to get it to work by inserting an entry in /etc/hosts that points the old name (courriel..) to the test machine.

    I think that doing an restore to a differently named host is not a good idea. Entries in ldap, etc that zimbra relies on seem to get out of whack.

    The above procedure worked pretty well from memory. There were a couple of minor things that had to be fixed but overall it was fairly painless.

  7. #7
    jml75 is offline Loyal Member
    Join Date
    Mar 2006
    Posts
    79
    Rep Power
    9

    Default

    Allright, thanx eintel. I'l give this a try.

    I'll keep you posted with the results.

  8. #8
    Eric is offline Intermediate Member
    Join Date
    Nov 2006
    Posts
    16
    Rep Power
    8

    Default A successful Hostname change!

    First of all Thanks to bobby. His instructions were very helpful.
    Here is what I did step-by-step to successfully change the Hostname.
    (I do not guarantee the process and did not repeat it since once I finally got it I did not want to touch it anymore...)

    1. su - zimbra
    2. I ran the following commands:
    zmprov mcf zimbraLogHostname my-host.my-company.com

    zmlocalconfig -e zimbra_server_hostname=my-host.my-company.com
    zmlocalconfig -e ldap_master_url=ldap://my-host.my-company.com:389
    zmlocalconfig -e ldap_url=ldap://my-host.my-company.com
    zmlocalconfig -e snmp_trap_host=my-host.my-company.com
    zmlocalconfig -e av_notify_user=admin@my-company.com
    zmlocalconfig -e smtp_destination=admin@my-company.com
    zmlocalconfig -e smtp_source=admin@my-company.com
    zmlocalconfig -e ldap_host=my-host.my-company.com


    3. I edited /etc/hosts file and change the old host with my-host.my-company.com. Without this LDAP will not start!

    4. Added my host to a DNS server that my zimbra server can read. tested with
    nslookup my-host.my-company.com.
    If you do not get your server's IP then change DNS settings so you do.

    5. Next I carfully followed instructions for regenerating the certs.
    Note that "keytool" is located under: zimbra/java/jre/bin. I had to specify the full path or cd there to run the command.

    6. There are several files in which I found the old host name after making all the above changes. I edited these files and replaced the old name with the new one (root user):
    Under zimbra/conf:
    ldap-vmd.cf
    ldap-vam.cf
    amavisd.con
    ldap-vad.cf
    ldap-scm.cf
    ldap-transport.cf
    ldap-vmm.cf
    perdition.conf
    swatchrc
    I also had an entry in: zimbra/postfix/conf/main.cf (myhostname)

    7. I now stopped Zimbra and started only ldap with the following command: sh -x bin/ldap start (zimbra user)

    8. Now I ran zmsetservername my-host.my-company.com. You should see a long output of entries being updated that look like the following:

    replace zimbraMailHost:
    mail.my-company.com
    replace zimbraMailTransport:
    lmtp:mail.my-company.com:7025
    modifying entry "uid=a_user,ou=people,dc=a domain,dc=com"
    modify complete

    9. Now restart Zimbra. Everything should work as before only with the Hostname you really want.

    It would be nice to have one short command to do it all...

    Good luck!

  9. #9
    bobby is offline Zimbra Employee
    Join Date
    Nov 2005
    Posts
    518
    Rep Power
    10

    Default

    eric, what version of zcs are you running? ideally zmsetservername will handle everything. obviously you've already made the change, but for anybody else working on this, it would be useful to run zmsetservername first, and then check to see if anything needs to be changed manually. if so, file a bug and we'll get it in there

    btw running ~/libexec/zmmtainit will update the ~/conf/ldap-* files

  10. #10
    dagar is offline Special Member
    Join Date
    Feb 2006
    Location
    middle of a corn field, IL
    Posts
    111
    Rep Power
    9

    Default Domain name change

    How will zmsetservername handle changing the domain name? We have 3 domain names. I want to change the main domain name of the Zimbra server. Currently it is setup as mcleodtrucking.com is our main domain with mcleodexpress.com and mcleod-express.com being the virtual domain names such that mail going to "user AT mcleodexpress.com" goes to "user AT mcleodtrucking.com". I want to change the main domain name to mcleodexpress.com
    (why we did not go with it to begin with has to do with me getting the domain name which I won't get into)
    Thanks

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. initializing ldap...FAILED(256)ERROR
    By manjunath in forum Installation
    Replies: 39
    Last Post: 06-07-2013, 10:27 AM
  2. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 12:42 AM
  3. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  4. Error 256 on Installation
    By RuinExplorer in forum Installation
    Replies: 5
    Last Post: 10-19-2006, 09:19 AM
  5. MTA is Dying after yum update
    By tonyawbrey in forum Administrators
    Replies: 27
    Last Post: 04-02-2006, 06:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •