Announcement Announcement Module
Collapse
No announcement yet.
Connection dropped by server?; while polling mail:inbound-channel-adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connection dropped by server?; while polling mail:inbound-channel-adapter

    Hi All,

    Here i am having a issue while polling email-exchangeServer(2007).

    below is my configuration

    <int-mail:inbound-channel-adapter
    id="c.incidentmanagement.proxy.email.inbound.adapt er"
    store-uri="${c.incidentmanagement.proxy.email.mail.proto col}://${c.incidentmanagement.proxy.email.mail.username}: ${c.incidentmanagement.proxy.email.mail.password}@ ${c.incidentmanagement.proxy.email.mail.host}:${c. incidentmanagement.proxy.email.mail.port}/${c.incidentmanagement.proxy.email.mail.folder}"
    java-mail-properties="javaImapProperties" auto-startup="true"
    should-mark-messages-as-read="true" should-delete-messages="false"
    channel="integration.cluster.inbound">
    <intoller fixed-rate="60000"/>
    </int-mail:inbound-channel-adapter>

    <utilroperties id="javaImapProperties">
    <prop key="mail.imap.socketFactory.fallback">false</prop>
    <prop key="mail.store.protocol">imap</prop>
    <prop key="mail.debug">true</prop>
    </utilroperties>


    Error Message:

    DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.fetchsize: 16384
    DEBUG: mail.imap.statuscachetimeout: 1000
    DEBUG: mail.imap.appendbuffersize: -1
    DEBUG: mail.imap.minidletime: 10
    DEBUG: trying to connect to host "email.emc.com", port 993, isSSL false
    [task-scheduler-1] DEBUG: org.springframework.beans.factory.support.DefaultL istableBeanFactory - Returning cached instance of singleton bean 'errorChannel'
    [task-scheduler-1] ERROR: org.springframework.integration.handler.LoggingHan dler - org.springframework.integration.MessagingException : failure occurred while polling for mail
    at org.springframework.integration.mail.MailReceiving MessageSource.receive(MailReceivingMessageSource.j ava:73)
    at org.springframework.integration.endpoint.SourcePol lingChannelAdapter.doPoll(SourcePollingChannelAdap ter.java:89)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :146)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :144)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller$1.run(AbstractPollingEndpoin t.java:207)
    at org.springframework.integration.util.ErrorHandling TaskExecutor$1.run(ErrorHandlingTaskExecutor.java: 52)
    at org.springframework.core.task.SyncTaskExecutor.exe cute(SyncTaskExecutor.java:48)
    at org.springframework.integration.util.ErrorHandling TaskExecutor.execute(ErrorHandlingTaskExecutor.jav a:49)
    at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller.run(AbstractPollingEndpoint. java:202)
    at org.springframework.scheduling.support.DelegatingE rrorHandlingRunnable.run(DelegatingErrorHandlingRu nnable.java:53)
    at org.springframework.scheduling.concurrent.Reschedu lingRunnable.run(ReschedulingRunnable.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$301(ScheduledThreadPoolE xecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(ScheduledThreadPoolExecutor .java:206)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: javax.mail.MessagingException: Connection dropped by server?;
    nested exception is:
    java.io.IOException: Connection dropped by server?
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPSt ore.java:618)
    at javax.mail.Service.connect(Service.java:291)
    at javax.mail.Service.connect(Service.java:172)
    at javax.mail.Service.connect(Service.java:121)
    at org.springframework.integration.mail.AbstractMailR eceiver.openSession(AbstractMailReceiver.java:203)
    at org.springframework.integration.mail.AbstractMailR eceiver.openFolder(AbstractMailReceiver.java:208)
    at org.springframework.integration.mail.AbstractMailR eceiver.receive(AbstractMailReceiver.java:227)
    at org.springframework.integration.mail.MailReceiving MessageSource.receive(MailReceivingMessageSource.j ava:59)
    ... 18 more

    Could you please help me on this

  • #2
    When posting code and config, please use [ code ] ... [ /code ] tags (no spaces in brackets).

    Port 993 uses SSL, you need to use 'imaps' and an SSL socket factory...

    Code:
    		<prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
    		<prop key="mail.imap.socketFactory.fallback">false</prop>
    		<prop key="mail.store.protocol">imaps</prop>

    Comment


    • #3
      Hi Gray,

      I tried with your inputs still I am seeing below error:
      Code:
      <prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
      		<prop key="mail.imap.socketFactory.fallback">false</prop>
      		<prop key="mail.store.protocol">imaps
      		</prop>
      Error details:

      -----------------
      DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
      DEBUG: Tables of loaded providers
      DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Pro vider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport ,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provide r[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
      DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport ,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
      DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
      DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc]
      DEBUG: mail.imap.fetchsize: 16384
      DEBUG: mail.imap.statuscachetimeout: 1000
      DEBUG: mail.imap.appendbuffersize: -1
      DEBUG: mail.imap.minidletime: 10
      DEBUG: trying to connect to host "email.emc.com", port 993, isSSL true
      * OK The Microsoft Exchange IMAP4 service is ready.
      A0 CAPABILITY
      * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN CHILDREN IDLE NAMESPACE LITERAL+
      A0 OK CAPABILITY completed.
      IMAP DEBUG: AUTH: NTLM
      IMAP DEBUG: AUTH: GSSAPI
      IMAP DEBUG: AUTH: PLAIN
      DEBUG: protocolConnect login, host=email.emc.com, user=corp\svc_unityaicdev\DevUnITyIncidentManageme ntProxy, password=<non-null>
      A1 AUTHENTICATE PLAIN
      +
      Y29ycFxzdmNfdW5pdHlhaWNkZXZcRGV2VW5JVHlJbmNpZGVudE 1hbmFnZW1lbnRQcm94eQBjb3JwXHN2Y191bml0eWFpY2RldlxE ZXZVbklUeUluY2lkZW50TWFuYWdlbWVudFByb3h5AFBpMVF3ZW RSNDNXeGM3OHcz
      A1 NO AUTHENTICATE failed.
      [task-scheduler-1] DEBUG: org.springframework.beans.factory.support.DefaultL istableBeanFactory - Returning cached instance of singleton bean 'errorChannel'
      [task-scheduler-1] ERROR: org.springframework.integration.handler.LoggingHan dler - org.springframework.integration.MessagingException : failure occurred while polling for mail
      at org.springframework.integration.mail.MailReceiving MessageSource.receive(MailReceivingMessageSource.j ava:73)
      at org.springframework.integration.endpoint.SourcePol lingChannelAdapter.doPoll(SourcePollingChannelAdap ter.java:89)
      at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :146)
      at org.springframework.integration.endpoint.AbstractP ollingEndpoint$1.call(AbstractPollingEndpoint.java :144)
      at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller$1.run(AbstractPollingEndpoin t.java:207)
      at org.springframework.integration.util.ErrorHandling TaskExecutor$1.run(ErrorHandlingTaskExecutor.java: 52)
      at org.springframework.core.task.SyncTaskExecutor.exe cute(SyncTaskExecutor.java:48)
      at org.springframework.integration.util.ErrorHandling TaskExecutor.execute(ErrorHandlingTaskExecutor.jav a:49)
      at org.springframework.integration.endpoint.AbstractP ollingEndpoint$Poller.run(AbstractPollingEndpoint. java:202)
      at org.springframework.scheduling.support.DelegatingE rrorHandlingRunnable.run(DelegatingErrorHandlingRu nnable.java:53)
      at org.springframework.scheduling.concurrent.Reschedu lingRunnable.run(ReschedulingRunnable.java:81)
      at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.access$301(ScheduledThreadPoolE xecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$S cheduledFutureTask.run(ScheduledThreadPoolExecutor .java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: javax.mail.AuthenticationFailedException: AUTHENTICATE failed.
      at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPSt ore.java:613)
      at javax.mail.Service.connect(Service.java:291)
      at javax.mail.Service.connect(Service.java:172)
      at javax.mail.Service.connect(Service.java:121)
      at org.springframework.integration.mail.AbstractMailR eceiver.openSession(AbstractMailReceiver.java:203)
      at org.springframework.integration.mail.AbstractMailR eceiver.openFolder(AbstractMailReceiver.java:208)
      at org.springframework.integration.mail.AbstractMailR eceiver.receive(AbstractMailReceiver.java:227)
      at org.springframework.integration.mail.MailReceiving MessageSource.receive(MailReceivingMessageSource.j ava:59)
      ... 18 more

      -----------------------------
      Last edited by samba.gaddam; Apr 11th, 2013, 11:00 AM.

      Comment


      • #4
        It's a different error now - the server is no longer dropping the connection - you have an authentication problem...

        * OK The Microsoft Exchange IMAP4 service is ready.
        A0 CAPABILITY
        * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN CHILDREN IDLE NAMESPACE LITERAL+
        A0 OK CAPABILITY completed.
        IMAP DEBUG: AUTH: NTLM
        IMAP DEBUG: AUTH: GSSAPI
        IMAP DEBUG: AUTH: PLAIN
        DEBUG: protocolConnect login, host=email.emc.com, user=corp\svc_unityaicdev\DevUnITyIncidentManageme ntProxy, password=<non-null>
        A1 AUTHENTICATE PLAIN
        +
        Y29ycFxzdmNfdW5pdHlhaWNkZXZcRGV2VW5JVHlJbmNpZGVudE 1hbmFnZW1lbnRQcm94eQBjb3JwXHN2Y191bml0eWFpY2RldlxE ZXZVbklUeUluY2lkZW50TWFuYWdlbWVudFByb3h5AFBpMVF3ZW RSNDNXeGM3OHcz
        A1 NO AUTHENTICATE failed.
        Check your credentials.

        Comment

        Working...
        X