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 10-04-2010, 07:58 AM
Active Member
 
Posts: 31
Default [SOLVED] IMAPSync problems

Hello,

I'm trying to migrate my old mailserver using postfix/maildir to zimbra, but I'm getting troubles with imapsync :

I have took the script in the wiki which allow you to specify a userlist with passwords.

I works pretty well, but I also have some LOGIN FAILED randomly (Like it's not the same login, sometimes it's login xxx and other time login yyy), and it seems to crash my Zimbra server, as after running it, I get a "???Remote Connection Failure???" or "Network problem", when trying to login to zimbra via gui.

Have to restart zmcontrol, and it's working fine again, but I have some accounts that are not synced at all, or partially synced.

This is very strange, as for the Login Failed I tried to connect to zimbra with user/pass provided in my file, and it works...

Any idea about that ?

Here is a sample of my mailbox log :

Code:
2010-10-04 16:42:49,248 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] mailop - Adding Message: id=604, Message-ID=<20090511120603.7B4F45A0002@$
2010-10-04 16:42:54,129 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] mailop - Adding Message: id=606, Message-ID=<20090825140037.75BC95A0002@$
2010-10-04 16:43:10,180 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] imap - STATUS failed: no such folder: INBOX/Drafts
2010-10-04 16:43:10,213 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] imap - SELECT failed: no such folder: INBOX/Drafts
2010-10-04 16:43:10,237 INFO  [ImapServer-4] [name=debi@xxx.com;ip=192.168.100.220;] mailop - adding folder Drafts: id=607, parentId=2.
2010-10-04 16:43:10,243 INFO  [ImapServer-4] [name=debi@xxx.com;ip=192.168.100.220;] imap - selected folder INBOX/Drafts
2010-10-04 16:43:10,284 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] imap - STATUS failed: no such folder: INBOX/Sent
2010-10-04 16:43:10,290 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] imap - SELECT failed: no such folder: INBOX/Sent
2010-10-04 16:43:10,294 INFO  [ImapServer-4] [name=debi@xxx.com;ip=192.168.100.220;] mailop - adding folder Sent: id=608, parentId=2.
2010-10-04 16:43:10,300 INFO  [ImapServer-4] [name=debi@xxx.com;ip=192.168.100.220;] imap - selected folder INBOX/Sent
2010-10-04 16:43:10,324 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] imap - STATUS failed: no such folder: INBOX/Trash
2010-10-04 16:43:10,331 INFO  [ImapServer-4] [name=debi@xxx.com;mid=40;ip=192.168.100.220;] imap - SELECT failed: no such folder: INBOX/Trash
2010-10-04 16:43:10,335 INFO  [ImapServer-4] [name=debi@xxx.com;ip=192.168.100.220;] mailop - adding folder Trash: id=609, parentId=2.
2010-10-04 16:43:10,341 INFO  [ImapServer-4] [name=debi@xxx.com;ip=192.168.100.220;] imap - selected folder INBOX/Trash
2010-10-04 16:43:10,351 INFO  [ImapServer-4] [] ProtocolHandler - Handler exiting normally
2010-10-04 16:43:10,532 INFO  [ImapServer-5] [] imap - [192.168.100.220] connected
2010-10-04 16:43:10,536 WARN  [ImapServer-5] [ip=192.168.100.220;] imap - LOGIN failed
com.zimbra.common.service.ServiceException: system failure: ZimbraLdapContext
ExceptionId:ImapServer-5:1286203390536:44bda33b62fecf94
Code:service.FAILURE
        at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:248)
        at com.zimbra.cs.account.ldap.ZimbraLdapContext.<init>(ZimbraLdapContext.java:416)
        at com.zimbra.cs.account.ldap.ZimbraLdapContext.<init>(ZimbraLdapContext.java:373)
        at com.zimbra.cs.account.ldap.LdapProvisioning.getAccountByQuery(LdapProvisioning.java:608)
        at com.zimbra.cs.account.ldap.LdapProvisioning.getAccountByNameInternal(LdapProvisioning.java:776)
        at com.zimbra.cs.account.ldap.LdapProvisioning.getAccountByName(LdapProvisioning.java:757)
        at com.zimbra.cs.account.ldap.LdapProvisioning.get(LdapProvisioning.java:668)
        at com.zimbra.cs.account.ldap.LdapProvisioning.get(LdapProvisioning.java:653)
        at com.zimbra.cs.security.sasl.PlainAuthenticator.authenticate(PlainAuthenticator.java:85)
        at com.zimbra.cs.imap.ImapHandler.authenticate(ImapHandler.java:1146)
        at com.zimbra.cs.imap.ImapHandler.doLOGIN(ImapHandler.java:1109)
        at com.zimbra.cs.imap.ImapHandler.executeRequest(ImapHandler.java:443)
        at com.zimbra.cs.imap.TcpImapHandler.processCommand(TcpImapHandler.java:98)
        at com.zimbra.cs.tcpserver.ProtocolHandler.processConnection(ProtocolHandler.java:196)
        at com.zimbra.cs.tcpserver.ProtocolHandler.run(ProtocolHandler.java:139)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:619)

		Caused by: javax.naming.CommunicationException: Bad file descriptor [Root exception is java.net.SocketException: Bad file descriptor]
        at com.sun.jndi.ldap.LdapCtx.extendedOperation(LdapCtx.java:3213)
        at javax.naming.ldap.InitialLdapContext.extendedOperation(InitialLdapContext.java:164)
        at com.zimbra.cs.account.ldap.ZimbraLdapContext.<init>(ZimbraLdapContext.java:406)
        ... 15 more
Caused by: java.net.SocketException: Bad file descriptor
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:396)
        at com.sun.jndi.ldap.LdapClient.extendedOp(LdapClient.java:1172)
        at com.sun.jndi.ldap.LdapCtx.extendedOperation(LdapCtx.java:3160)
        ... 17 more
2010-10-04 16:43:10,542 INFO  [ImapServer-5] [] ProtocolHandler - Handler exiting normally
2010-10-04 16:43:10,788 INFO  [ImapServer-6] [] imap - [192.168.100.220] connected
2010-10-04 16:43:10,793 WARN  [ImapServer-6] [ip=192.168.100.220;] imap - LOGIN failed

Caused by: javax.naming.CommunicationException: Bad file descriptor [Root exception is java.net.SocketException: Bad file descriptor]
        at com.sun.jndi.ldap.LdapCtx.extendedOperation(LdapCtx.java:3213)
        at javax.naming.ldap.InitialLdapContext.extendedOperation(InitialLdapContext.java:164)
        at com.zimbra.cs.account.ldap.ZimbraLdapContext.<init>(ZimbraLdapContext.java:406)
        ... 15 more
Caused by: java.net.SocketException: Bad file descriptor
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:396)
        at com.sun.jndi.ldap.LdapClient.extendedOp(LdapClient.java:1172)
        at com.sun.jndi.ldap.LdapCtx.extendedOperation(LdapCtx.java:3160)
        ... 17 more
2010-10-04 16:43:10,803 INFO  [ImapServer-6] [] ProtocolHandler - Handler exiting normally
2010-10-04 16:43:10,971 INFO  [ImapServer-7] [] imap - [192.168.100.220] connected
2010-10-04 16:43:10,976 WARN  [ImapServer-7] [ip=192.168.100.220;] imap - LOGIN failed
com.zimbra.common.service.ServiceException: system failure: ZimbraLdapContext
ExceptionId:ImapServer-7:1286203390976:44bda33b62fecf94
Code:service.FAILURE
etc.... My log is full of errors like this

Any idea ?
Reply With Quote
  #2 (permalink)  
Old 10-04-2010, 09:36 AM
Moderator
 
Posts: 1,554
Default

bad file descriptor errors usually indicate filesystem problems, and possibly bad disk. i'd run a full fsck on the server including the root partition and see if theres any problems
Reply With Quote
  #3 (permalink)  
Old 10-05-2010, 03:32 AM
Active Member
 
Posts: 31
Default

Well, I tried running fsck, and it didn't encoutered any errors.

Btw, I'm running Zimbra in Virtual Machine under ESXI.

It seems that imapsync make the server hang, but it's very strange as it's running on 2 Xeon 5600 (8 cores), and 8GB of RAM.

If anyone have any other idea it would be nice
Reply With Quote
  #4 (permalink)  
Old 10-05-2010, 05:26 AM
Moderator
 
Posts: 1,554
Default

how much ram do you have assigned to hte zimbra vm?
Reply With Quote
  #5 (permalink)  
Old 10-05-2010, 06:46 AM
Active Member
 
Posts: 31
Default

8GB, my ESXI server has 16GB of RAM
Reply With Quote
  #6 (permalink)  
Old 10-06-2010, 08:21 AM
Active Member
 
Posts: 31
Default

Problem seems to be solved.

I tried changing a lot of settings, so I don't really know which one did the trick :

- First, I upgraded my imapsync version to 1.99

- Secondly, I modified the "ulimit" of root with the command : "ulimit -n 524288" (Default is 1024 if I remember well).

- I also tweaked some LDAP settings recommended on the wiki, according to my VM specifications :

Code:
zmlocalconfig -e ldap_common_threads=16  (4 for each core, I'm running 4)
Code:
zmlocalconfig -e ldap_common_toolthreads=4
Code:
zmlocalconfig -e ldap_db_cachesize=50000
Code:
zmlocalconfig -e ldap_db_dncachesize=0
Finally, I also modified some settings in AdminUI :

- Session TimeOut : 2min (In case imapsync doesn't close session properly, I'll increase it when my migration will finish)

- IMAP Simultaneous tasks : 500

Hope this will help for some guys having the same troubles
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.