Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: java.net.SocketException: Socket closed (dropping IMAP connections)

  1. #1
    Join Date
    Oct 2007
    Posts
    88
    Rep Power
    8

    Default java.net.SocketException: Socket closed (dropping IMAP connections)

    Hi:

    I've been having problems with my home Zimbra server dropping connections to clients (both Apple Mail and Mutt, where it's really noticeable). I've used the same mutt client to connect to both my work (NE on RH) and home (FOSS on Ubuntu), and the client always has disconnect problems talking to my home server.

    It's really annoying in that the connection is almost always dropped when I'm responding to a message in vi. When I go to send the message, mutt no longer has a connection and can't save the message into Sent via IMAP.

    I'm not 100% sure, but this may be a new problem in 5.x. I don't recall it doing it in 4.5, but I could be wrong.

    mailbox.log shows this logged every time a connection is dropped:

    2008-02-17 16:08:16,314 INFO [ImapSSLServer-306] [] ProtocolHandler - Exception occurred while handling connection
    java.net.SocketException: Socket closed
    at java.net.SocketInputStream.read(SocketInputStream. java:162)
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully (InputRecord.java:293)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Inpu tRecord.java:331)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRec ord(SSLSocketImpl.java:789)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDat aRecord(SSLSocketImpl.java:746)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(A ppInputStream.java:75)
    at java.io.BufferedInputStream.fill(BufferedInputStre am.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStre am.java:237)
    at com.zimbra.cs.tcpserver.TcpServerInputStream.readL ine(TcpServerInputStream.java:73)
    at com.zimbra.cs.imap.TcpImapRequest.continuation(Tcp ImapRequest.java:54)
    at com.zimbra.cs.imap.TcpImapHandler.processCommand(T cpImapHandler.java:109)
    at com.zimbra.cs.tcpserver.ProtocolHandler.processCon nection(ProtocolHandler.java:160)
    at com.zimbra.cs.tcpserver.ProtocolHandler.run(Protoc olHandler.java:128)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:619)

  2. #2
    Join Date
    Oct 2007
    Posts
    88
    Rep Power
    8

    Default

    I turned on debugging, and noticed this:

    2008-02-17 22:17:33,192 DEBUG [ImapSSLServer-710] [name=jeffw@fs1.rfc1918.smoe.org;ip=68.244.124.0;] imap - C: A2800 select "Inbox"
    2008-02-17 22:17:33,192 DEBUG [ImapSSLServer-710] [name=jeffw@fs1.rfc1918.smoe.org;ip=68.244.124.0;] imap - dropping connection because Session is closing
    2008-02-17 22:17:33,193 DEBUG [ImapSSLServer-710] [name=jeffw@fs1.rfc1918.smoe.org;ip=68.244.124.0;] imap - S: * BYE fs1.rfc1918.smoe.org IMAP4rev1 server terminating connection


    Any way to find out why the 'Session is closing'?

  3. #3
    Join Date
    Oct 2007
    Posts
    88
    Rep Power
    8

    Default

    any ideas about this problem? it's still doing it....

  4. #4
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default

    Did you have a big change to the system clock? Does a server restart fix the issue?
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    Join Date
    Oct 2007
    Posts
    88
    Rep Power
    8

    Default

    Quote Originally Posted by dkarp View Post
    Did you have a big change to the system clock? Does a server restart fix the issue?
    The system's been running NTP and is in sync:

    ntpdc> pe
    remote local st poll reach delay offset disp
    ================================================== =====================
    =europium.canoni 204.152.64.2 2 1024 377 0.08531 0.002373 0.12177
    =LOCAL(0) 127.0.0.1 13 64 377 0.00000 0.000000 0.03056
    =jane.rfc1918.sm 204.152.64.2 2 1024 377 0.00058 0.412120 0.12184
    =proxy.rfc1918.s 204.152.64.2 16 1024 0 0.00000 0.000000 0.00000

    What do you mean by a 'server restart'? Just restarting zimbra or a reboot?

    The problem persisted thru my upgrade from 5.0.1 to 5.0.2, so Zimbra was shut down then...

    -j

  6. #6
    Join Date
    Oct 2007
    Posts
    88
    Rep Power
    8

    Default

    Quote Originally Posted by dkarp View Post
    Did you have a big change to the system clock? Does a server restart fix the issue?
    While playing around today, I noticed that if I stopped other mail apps from accessing my mailbox (primarily Apple's Mail.app) mutt no longer loses connections (and I'm not getting any errors in the mailbox.log).

    As soon as I start up Mail.app, I'll start to lose Mutt's connections.

    This doesn't seem to happen with my NE install running on Redhat.

    Does that provide any hint as to what might be going on?

  7. #7
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default

    You're allowed 5 concurrent IMAP selected folders per user. When you open a 6th, the first connection is dropped.

    What may be happening is that your other apps are keeping multiple connections open (e.g. one for Inbox, one for Trash, etc.). When you open a mutt connection and select a folder, one of the earlier connections is dropped; if that app then immediately attempts to reopen the dropped connection, you'll see another connection drop. If the other clients reopen connections aggressively, you could see your new connection drop.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  8. #8
    Join Date
    Oct 2007
    Posts
    88
    Rep Power
    8

    Default

    Quote Originally Posted by dkarp View Post
    You're allowed 5 concurrent IMAP selected folders per user. When you open a 6th, the first connection is dropped.

    What may be happening is that your other apps are keeping multiple connections open (e.g. one for Inbox, one for Trash, etc.). When you open a mutt connection and select a folder, one of the earlier connections is dropped; if that app then immediately attempts to reopen the dropped connection, you'll see another connection drop. If the other clients reopen connections aggressively, you could see your new connection drop.
    Interesting. Can that limit be raised?

    I tend to have multiple clients going at the same time for testing, so the limit seems to be hitting me pretty hard....

    -j

  9. #9
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default

    At the moment, it's hard-coded. But please do file a request in bugzilla to have it either raised or configurable...
    Bugzilla - Wiki - Downloads - Before posting... Search!

  10. #10
    Join Date
    Oct 2007
    Posts
    88
    Rep Power
    8

    Default

    Quote Originally Posted by dkarp View Post
    At the moment, it's hard-coded. But please do file a request in bugzilla to have it either raised or configurable...
    Thanks, will do.

    5 is a pretty harsh limit. Can you comment on how hard it'll be for you to increase it?

Similar Threads

  1. Zimbra fails after working for 2 weeks
    By Linsys in forum Administrators
    Replies: 10
    Last Post: 10-07-2008, 01:42 AM
  2. Outlook 2003 dropping IMAP connection after 5.0 GA upgrade
    By Mark Daniel in forum Administrators
    Replies: 7
    Last Post: 01-06-2008, 10:00 AM
  3. Can't start Zimbra!
    By zibra in forum Administrators
    Replies: 5
    Last Post: 03-22-2007, 12:34 PM
  4. Safe to exclude these directories from backup?
    By hikenboots in forum Administrators
    Replies: 3
    Last Post: 02-14-2006, 05:45 PM
  5. Error on IMAP - Tomcat crashes!
    By rodrigoccurvo in forum Administrators
    Replies: 5
    Last Post: 11-30-2005, 07:14 PM

Posting Permissions

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