Results 1 to 6 of 6

Thread: [SOLVED] IMAPSync problems

  1. #1
    Join Date
    Aug 2010
    Posts
    40
    Rep Power
    5

    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 ?

  2. #2
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    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

  3. #3
    Join Date
    Aug 2010
    Posts
    40
    Rep Power
    5

    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

  4. #4
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    how much ram do you have assigned to hte zimbra vm?

  5. #5
    Join Date
    Aug 2010
    Posts
    40
    Rep Power
    5

    Default

    8GB, my ESXI server has 16GB of RAM

  6. #6
    Join Date
    Aug 2010
    Posts
    40
    Rep Power
    5

    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

Similar Threads

  1. CentOS 4.4 imapsync problems
    By timschmidt in forum Migration
    Replies: 19
    Last Post: 08-01-2007, 08:29 AM
  2. problems with imapsync from cyus
    By g8se in forum Migration
    Replies: 3
    Last Post: 02-22-2007, 06:52 PM
  3. imapsync & dovecot
    By PenguinWrangler in forum Migration
    Replies: 3
    Last Post: 01-18-2007, 02:36 PM
  4. imapsync "out of memory"
    By EFSNetworks in forum Administrators
    Replies: 9
    Last Post: 10-13-2006, 01:51 PM
  5. imapsync and mail filters
    By Coilcore in forum Administrators
    Replies: 5
    Last Post: 08-10-2006, 08:21 AM

Posting Permissions

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