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 12-15-2007, 12:39 AM
Senior Member
 
Posts: 68
Default [SOLVED] servername change & TOO_MANY_HOPS mountpoint loop

Hi,
I just modified my hostname from mail2.domain.com to mail.domain.com
I want to "move" all the mailboxes (4000+) from mail2.domain.com to mail.domain.com and basically tell the mailboxes that their server is called mail.domain.com.

The reason is that when the user logs in via web interface, the browser is redirecting to the old http://mail2.domain.com and it generates an exception.
also, the following is listed everytime i try to select a mailbox:
ERROR: service.TOO_MANY_HOPS (mountpoint loop detected)

Is there a command line attribute to mass select/change this attribute?

commands executed:
mbox> aa techsupport
mbox> selectmailbox techsupport
ERROR: service.TOO_MANY_HOPS (mountpoint loop detected)

Im using the opensource edition
zcs-4.5.10_GA_1575.RHEL5.tg
on centos 5

Thanks,
Reply With Quote
  #2 (permalink)  
Old 12-15-2007, 07:35 AM
Senior Member
 
Posts: 68
Default TOO_MANY_HOPS(ServiceException.java:220)

Hi there,
While trying to remove a mailbox or changing attributes, the following is displayed in mailbox.log and on the web interface the operation cannot be completed.

I must make mention that I changed my hostname recently from mail2.domain.com to mail.domain.com.

I am trying to find a solution for this too_many_hops and mountpoint loop detected, but no luck so far.

Some guidance is welcomed.

Thanks,

2007-12-15 10:31:07,736 INFO [http-7071-Processor45] [name=techsupport@mail2.goldenpartnership.com;aname =eaperezh@goldenpartnership.com;ip=192.168.1.1;] SoapEngine - handler exception
com.zimbra.common.service.ServiceException: mountpoint loop detected
at com.zimbra.common.service.ServiceException.TOO_MAN Y_HOPS(ServiceException.java:220)
at com.zimbra.soap.ZimbraSoapContext.<init>(ZimbraSoa pContext.java:148)
at com.zimbra.soap.DocumentHandler.proxyRequest(Docum entHandler.java:255)
at com.zimbra.cs.service.admin.AdminDocumentHandler.p roxyIfNecessary(AdminDocumentHandler.java:77)
at com.zimbra.soap.SoapEngine.dispatchRequest(SoapEng ine.java:262)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:163)
at com.zimbra.soap.SoapEngine.dispatch(SoapEngine.jav a:85)
at com.zimbra.soap.SoapServlet.doPost(SoapServlet.jav a:220)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at com.zimbra.cs.servlet.ZimbraServlet.service(Zimbra Servlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:541)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:667)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Reply With Quote
  #3 (permalink)  
Old 12-15-2007, 07:40 AM
Moderator
 
Posts: 6,237
Default

Did you run ZmSetServerName - Zimbra :: Wiki?
-Which is the proper process to change your hostname

See this thread which discusses the TOO_MANY_HOPS (mountpoint loop detected) troubles: Suse10.2 Upgrade problem
-Make sure that the zimbraMailHost and zimbraMailTransport attributes of your accounts match the new name you've applied to your mail server.
-Another thread: Too_many_hops

Edit1:
Are the actual account names user@domain.com? (you won't have to do anything)
Or user@mail2.domain.com and you want to change that to user@mail1.domain.com? (for that you can script zmprov rename account or v5 has a rename domain command, but domains are pretty much independent, so you could technically leave those for now, your server hostname change is the root of your problem.

Edit2: Merged your 2 threads because otherwise we're gonna miss info.

Last edited by mmorse; 12-15-2007 at 08:03 AM..
Reply With Quote
  #4 (permalink)  
Old 12-15-2007, 12:18 PM
Senior Member
 
Posts: 68
Default

I ran zmSetServerNAme succesfully and changed from mail2.domain.com to mail.domain.com.
updated dns,hosts file, mx records, etc.

output example:
ldapsearch -x -h 192.168.1.4 | more

# martin, people, goldenpartners.com
dn: uid=martin,ou=people,dc=goldenpartners,dc=com
zimbraMailTransport: lmtp:mail2.goldenpartners.com:7025
zimbraMailDeliveryAddress: martin@goldenpartners.com
sn: martin
zimbraMailStatus: enabled
zimbraId: b9f4001b-04aa-4e40-85c0-5b59c92036f7
mail: martin@goldenpartners.com
displayName: martin
uid: martin
objectClass: organizationalPerson
objectClass: zimbraAccount
objectClass: amavisAccount
cn: martin
zimbraMailHost: mail2.goldenpartners.com

I need to modify zimbraMailHost and zimbraMailHost for every user that has mail2.goldenpartners.com and change it to mail.goldenpartners.com.
Then I need to delete the mail2. domain. However to be able to delete the accounts I need to move them out of mail2 domain and into mail

The thing is that zmprov always return too many hops. So im kind of clueless here.
Reply With Quote
  #5 (permalink)  
Old 12-15-2007, 02:42 PM
Moderator
 
Posts: 6,237
Default

Do you get a different result if you go zmprov -l on each command (small L)?
Reply With Quote
  #6 (permalink)  
Old 12-15-2007, 04:52 PM
Senior Member
 
Posts: 68
Default

Quote:
Originally Posted by mmorse View Post
Do you get a different result if you go zmprov -l on each command (small L)?
Interesting. It did work. if my SOAP is messed up, does it means the tomcat is messed up? I mean, if it worked via ldap but not soap......

I do changed using:
[zimbra@mail ~]$ zmprov -l -v ma techsupport zimbraMailHost mail.goldenpartners.com
[zimbra@mail ~]$ zmprov -l -v ma techsupport zimbraMailTransport mail.goldenpartners.com

However
[zimbra@mail ~]$ zmprov ga techsupport
ERROR: service.TOO_MANY_HOPS (mountpoint loop detected)


Also,
what will be the best way to change the following paramters massively:
zimbraMailTransport
zimbraMailDeliveryAddress
mail: xx@goldenpartners.com
zimbraMailHost

will this work without messing my LDAP ?
zmprov -l -v ma * zimbraMailHost mail.goldenpartners.com
zmprov -l -v ma * zimbraMailTransport mail.goldenpartners.com

Thanks mmorse, you have been a great help. I just got this zimbra install from another admin that left the office so that's why some things may not be familiar to me.

thanks again, really.

Last edited by eaperezh; 12-15-2007 at 05:07 PM..
Reply With Quote
  #7 (permalink)  
Old 12-16-2007, 02:00 AM
Project Contributor
 
Posts: 136
Default

Quote:
Originally Posted by eaperezh View Post
Interesting. It did work. if my SOAP is messed up, does it means the tomcat is messed up? I mean, if it worked via ldap but not soap......
Probably the local config still points to the old address. You are in a vicious circle, you need the old address to update LDAP references. The easiest thing to do is to add the old address to your /etc/hosts in the server running LDAP. Something like:
Code:
192.168.1.4       mail2.domain.com mail2 mail.domain.com
This will allow connections to the old name, but only for this host. If you have only 1 server, this should be simple enough.

Quote:
Originally Posted by eaperezh View Post
I do changed using:
[zimbra@mail ~]$ zmprov -l -v ma techsupport zimbraMailHost mail.goldenpartners.com
[zimbra@mail ~]$ zmprov -l -v ma techsupport zimbraMailTransport mail.goldenpartners.com

However
[zimbra@mail ~]$ zmprov ga techsupport
ERROR: service.TOO_MANY_HOPS (mountpoint loop detected)

Also,
what will be the best way to change the following paramters massively:
zimbraMailTransport
zimbraMailDeliveryAddress
mail: xx@goldenpartners.com
zimbraMailHost

will this work without messing my LDAP ?
zmprov -l -v ma * zimbraMailHost mail.goldenpartners.com
zmprov -l -v ma * zimbraMailTransport mail.goldenpartners.com
I don't think so. The easiest is a little "vi" or scripting exercise. You can do:

Code:
su - zimbra
zmprov gaa > change.zm
Then edit change.zm and add "ma" before and "zimbraMailHost mail.goldenpartners.com" after each email address. In "vi" you type:

Code:
:1,$s/^\(.*\)$/ma \1 zimbraMailHost mail.goldenpartners.com/
Then you pass this through zmprov with "zmprov < change.zm". Finally you replace "zimbraMailHost mail.goldenpartners.com" by "zimbraMailTransport mail.goldenpartners.com" and pass it through zmprov again.

Of course, if you add the old host name in /etc/hosts you don' t need this :-)

Carlos
Reply With Quote
  #8 (permalink)  
Old 12-16-2007, 07:43 AM
Senior Member
 
Posts: 68
Default

This may not be kosher, but it worked for me.

zimbra--4.5.10_GA_1575.RHEL5-20071117121632
Centos 5.

First I exported all the LDAP with this command:
/opt/zimbra/openldap-2.3.39.5z/sbin/slapcat -f /opt/zimbra/conf/slapd.conf -l /tmp/ldapbrad.ldif
(took about 3 minutes)

Then I open ldapbrad.ldif and replaced the entries that had "mail2" with "mail"

Example:
zimbraMailHost: mail2.goldenpartners.com
zimbraMailTransport: lmtp:mail2.goldenpartners.com:7025

Replace to
zimbraMailHost: mail.goldenpartners.com
zimbraMailTransport: lmtp:mail.goldenpartners.com:7025

This was done for over 4k accounts.

The I erased the LDAP on my server
su - zimbra
zmcontrol stop
ps auxx | grep slapd
(If ldap is still running, kill it)
rm -f openldap-data/*

Then I reimported the LDAP
/opt/zimbra/openldap-2.3.39.5z/sbin/slapadd -f /opt/zimbra/conf/slapd.conf -l /tmp/ldapbrad.ldif
(this reimport process took over 4 hours, not sure why)

Then I started zimbra and then a "zmprov gaa" just to make sure everybody had the new address.

My initial problem was that the original hostname "mail2.goldepartners.com" was changed to "mail.goldenpartners.com" without the correct procedures
So, now that everybody is pointing to the new server I can:
zmprov ds mail2.goldenpartners.com (the original server with problems)

So the error went away for both web admin interface and user interface. Now I only need to see why i have the "mail loops back to myself" issue.

But again Thanks to all, your comments and guides were all helpful to troubleshoot this weird error. And I will never ever try to change zimbra hostname, it's just no-no.
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.