Change Hostname Zimbra 7.0

Hello, I have a zimbra server with the name and mail.teste.com.br need to change the name of it to zimbra2.teste.com.br.
I used some of the methods and zmsetservername errors occurred in LDAP.
Any suggestions?

Hello, I have a zimbra server with the name and mail.teste.com.br need to change the name of it to zimbra2.teste.com.br.

You should have changed the domain name when you were asked during the initial otherwise it defaults to the FQDN of the server (as you've now found out).

Originally Posted by gustavocearasc

I used some of the methods and zmsetservername errors occurred in LDAP.
Any suggestions?

Posting 'it doesn't work' really does not give us any information with which to advise you of a solution - you need to give the exact errors you see in the log files.

Using zmsetservername is the correct procedure (if you follow the details in the wiki article) or you can completely remove the install and reinstall ZCS the set the correct domain name as I mentioned above. Details of this installation procedure are in the Quick Start Installation Guide and all over the forums.

That tells us nothing other than a service is not running. You need to look in the log files and see exactly what the errors are when you start Zimbra. When you've got the errors, look in the forums to see what exactly is causing the problem(s).

Error mailbox.log

2011-11-21 13:39:14,212 WARN [main] [] misc - Could not establish a connection to the database. Retrying in 5 seconds.
com.zimbra.common.service.ServiceException: system failure: getting database connection
ExceptionId:main:1321893554212:7935f6e55e23f3d9
Code:service.FAILURE
at com.zimbra.common.service.ServiceException.FAILURE (ServiceException.java:248)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java: 314)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java: 278)
at com.zimbra.cs.db.DbPool.waitForDatabase(DbPool.jav a:200)
at com.zimbra.cs.db.DbPool.startup(DbPool.java:191)
at com.zimbra.cs.util.Zimbra.startup(Zimbra.java:157)
at com.zimbra.cs.util.Zimbra.startup(Zimbra.java:123)
at com.zimbra.soap.SoapServlet.init(SoapServlet.java: 128)
at javax.servlet.GenericServlet.init(GenericServlet.j ava:241)
at org.mortbay.jetty.servlet.ServletHolder.initServle t(ServletHolder.java:440)
at org.mortbay.jetty.servlet.ServletHolder.doStart(Se rvletHolder.java:263)
at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initializ e(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Con text.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContex t(WebAppContext.java:1254)
at org.mortbay.jetty.handler.ContextHandler.doStart(C ontextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(Web AppContext.java:471)
at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStar t(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection .doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStar t(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(H andlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(H andlerWrapper.java:130)
at org.mortbay.jetty.handler.DebugHandler.doStart(Deb ugHandler.java:127)
at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(H andlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.setuid.SetUIDServer.doStart(SetUIDServ er.java:158)
at org.mortbay.component.AbstractLifeCycle.start(Abst ractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfigura tion.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientC onnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at sun.reflect.GeneratedConstructorAccessor16.newInst ance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:40 9)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:1015)
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:989)
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:984)
at com.mysql.jdbc.SQLError.createSQLException(SQLErro r.java:929)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(C onnectionImpl.java:2226)
at com.mysql.jdbc.ConnectionImpl.createNewIO(Connecti onImpl.java:2127)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImp l.java:774)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connect ion.java:49)
at sun.reflect.GeneratedConstructorAccessor14.newInst ance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:40 9)
at com.mysql.jdbc.ConnectionImpl.getInstance(Connecti onImpl.java:375)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:289)
at java.sql.DriverManager.getConnection(DriverManager .java:582)
at java.sql.DriverManager.getConnection(DriverManager .java:154)
at org.apache.commons.dbcp.DriverManagerConnectionFac tory.createConnection(DriverManagerConnectionFacto ry.java:78)
at com.zimbra.cs.db.ZimbraConnectionFactory.createCon nection(ZimbraConnectionFactory.java:64)
at org.apache.commons.dbcp.PoolableConnectionFactory. makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(GenericObjectPool.java:1158)
at org.apache.commons.dbcp.PoolingDataSource.getConne ction(PoolingDataSource.java:106)
at com.zimbra.cs.db.DbPool.getConnection(DbPool.java: 295)
... 39 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ption: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.GeneratedConstructorAccessor12.newInst ance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:40 9)
at com.mysql.jdbc.SQLError.createCommunicationsExcept ion(SQLError.java:1118)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(C onnectionImpl.java:2168)
... 56 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl .java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSoc ketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.j ava:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.j ava:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:218)
at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
... 57 more

[Solved] Change Zimbra Hostname ;)

I think i can help you in this...

First of all...

If you are using local dns then configure DNS for new hostname and make changes in resolv.conf and hosts file... confirm dns is resolving your queries...
use dig,nslookup and host commands...Reboot the system...

Note - Before Processding for next step make sure that your dns server is resolving you hostname A record and MX record.