Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-2011, 03:32 AM
Intermediate Member
 
Posts: 16
Default 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?
Reply With Quote
  #2 (permalink)  
Old 11-21-2011, 03:52 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
Default

Quote:
Originally Posted by gustavocearasc View Post
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).

Quote:
Originally Posted by gustavocearasc View Post
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.
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 11-21-2011, 04:54 AM
Intermediate Member
 
Posts: 16
Default

when I run the zmsetservername -n zimbra2.teste.com.br the following error occurs:

Starting ldap ... done.

Unable to contact ldap: / / mail.teste.com.br: 389: Invalid argument
Unable to contact ldap: / / mail.teste.com.br: 389: Invalid argument
Services:
Getting local config = 389 LDAP_PORT
Reinitializing the mta config ... done.
Reinitializing the snmp config ... done.
Reply With Quote
  #4 (permalink)  
Old 11-21-2011, 04:58 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
Default

site:zimbra.com +"Unable to contact ldap" +invalid argument" - Yahoo! Search Results
__________________
Regards


Bill
Reply With Quote
  #5 (permalink)  
Old 11-21-2011, 05:49 AM
Intermediate Member
 
Posts: 16
Default

Now the following error occurs:

antispam Running
Running antivirus
Running ldap
Running logger
mailbox Stopped
mysql.server is not running.
Running mta
Running snmp
Running spell
stats Stopped
Reply With Quote
  #6 (permalink)  
Old 11-21-2011, 08:19 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
Default

Quote:
Originally Posted by gustavocearasc View Post
Now the following error occurs:

antispam Running
Running antivirus
Running ldap
Running logger
mailbox Stopped
mysql.server is not running.
Running mta
Running snmp
Running spell
stats Stopped
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).
__________________
Regards


Bill
Reply With Quote
  #7 (permalink)  
Old 11-21-2011, 08:44 AM
Intermediate Member
 
Posts: 16
Default 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
Reply With Quote
  #8 (permalink)  
Old 11-21-2011, 09:03 AM
Zimbra Consultant & Moderator
 
Posts: 20,315
Default

That just tells us that it can't connect to the MySQL server, you need to look in the other log files for the reason the mailbox isn't starting.
__________________
Regards


Bill
Reply With Quote
  #9 (permalink)  
Old 11-21-2011, 09:48 AM
Intermediate Member
 
Posts: 16
Default

I stopped the zimbra service and restored the backup to start again from scratch.
when I run zmsetservername-n error follows below:

./zmsetservername -n zimbra2.teste.com.br
Getting local config zimbra_home=/opt/zimbra
Getting local config zimbra_server_hostname=mail.teste.com.br
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=YU5ObJ6j8
Getting local config ldap_master_url=ldap://mail.teste.com.br:389
Getting local config ldap_starttls_supported=1
Getting global config zimbraLogHostname=ERROR: service.FAILURE (system failure: ZimbraLdapContext) (cause: javax.naming.CommunicationException mail.teste.com.br:389)

Renaming mail.teste.com.br to zimbra2.teste.com.br
Shutting down zimbra...done.
Setting local config ldap_master_url=ldap://zimbra2.teste.com.br:389
Getting local config ldap_url=ldap://mail.teste.com.br:389
Setting local config ldap_url=ldap://zimbra2.teste.com.br:389
Getting local config ldap_host=mail.teste.com.br
Setting local config ldap_host=zimbra2.teste.com.br
Getting local config av_notify_user=admin@mail.teste.com.br
Setting local config av_notify_user=admin@zimbra2.teste.com.br
Getting local config av_notify_domain=mail.teste.com.br
Setting local config av_notify_domain=zimbra2.teste.com.br
Getting local config snmp_trap_host=mail.teste.com.br
Setting local config snmp_trap_host=zimbra2.teste.com.br
Getting local config smtp_source=admin@mail.teste.com.br
Setting local config smtp_source=admin@zimbra2.teste.com.br
Getting local config smtp_destination=admin@mail.teste.com.br
Setting local config smtp_destination=admin@zimbra2.teste.com.br
Setting local config zimbra_server_hostname=zimbra2.teste.com.br
Starting ldap...done.

Unable to contact ldap://mail.teste.com.br:389: Connection timed out
Unable to contact ldap://mail.teste.com.br:389: Connection timed out
Services:
Getting local config ldap_port=389
Reinitializing the mta config...done.
Reinitializing the snmp config...done.
Reply With Quote
  #10 (permalink)  
Old 03-29-2012, 10:13 AM
Junior Member
 
Posts: 7
Lightbulb [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.

Login with root.
follow the below instructions.

# su - zimbra

$ zmcontrol stop

$ /opt/zimbra/libexec/zmsetservername -force -n new.hostname.com
(you will receive some errors but ignore them)

$ /opt/zimbra/libexec/zmsetservername -o old.hostname.com -n new.hostname.com

(it will not show any error and work fine)


Set Default Domain-
$ zmprov -l mcf zimbraDefaultDomainName newdomain.com


Generate New ssh key for zimbra and update it

$ zmsshkeygen

$ zmupdateauthkeys

$ zmcontrol start


(it should start your zimbra successfully)


Now if you are using self signed certificate so you have to create new certificate following below instruction...but before that make sure you system
timezone and you zimbra server timezones are same.

$ exit

# su - zimbra -c 'zmcontrol stop'

# rm -rf /opt/zimbra/ssl/*

# rm -rf /opt/zimbra/ssl/.rnd

# /opt/zimbra/java/bin/keytool -delete -alias my_ca -keystore /opt/zimbra/java/jre/lib/security/cacerts -storepass changeit

# /opt/zimbra/java/bin/keytool -delete -alias jetty -keystore /opt/zimbra/mailboxd/etc/keystore -storepass `su - zimbra -c 'zmlocalconfig -s -m nokey mailboxd_keystore_password'`

# vim /opt/zimbra/bin/zmcertmgr

Find line
SUBJECT="/C=US/ST=N\/A/L=N\/A/O=Zimbra Collaboration Suite/OU=Zimbra Collaboration Suite/CN=${zimbra_server_hostname}"
and change to your company name

then find and change you want value days expire cert validation_days=365 to validation_days=3650

(save & exit)

# /opt/zimbra/bin/zmcertmgr createca -new

# /opt/zimbra/bin/zmcertmgr deployca -localonly

# /opt/zimbra/bin/zmcertmgr createcrt self -new

# /opt/zimbra/bin/zmcertmgr deploycrt self

# su - zimbra -c 'zmcontrol start'

It should start all the services successfully without any error.



# /opt/zimbra/bin/zmcertmgr deploycrt self

# /opt/zimbra/bin/zmcertmgr deployca

# su - zimbra -c 'zmupdateauthkeys'

# /opt/zimbra/bin/zmcertmgr viewdeployedcrt


Login to Web link and check whether everything is working well or not.
Check newly installed certificates and running services.


https://<ip address> >>> web mail login

https://<ip address>:7071/zimbraAdmin >>> Admin console login


Enjoy...
Cheers

------
Neo
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.