Discussion:
[Davmail-users] trouble with authentication
K Richard Pixley
2016-08-30 18:16:43 UTC
Permalink
I've used davmail before and it "just worked". But that was on macosx
and with a different company several years ago. Today I'm trying on
ubuntu-16.04 and it's failing on authentication. When I set up a log, I
see what follows.

Can anyone interpret this for me? I don't know why "all interfaces
down" would be nor do I understand why the host would be unreachable.
And those first few trace lines, "VXNl..." and "UGFz..." look strange to
me. Just for reference, my password starts with "GTzb...." and is 50
characters long.

I'm not much of a java person, but "String index out of range" looks
like a stack trace to me.

--rich

2016-08-30 10:58:01,173 DEBUG [davmail.imap.ImapServer] davmail -
Connection from /127.0.0.1 on port 1143
2016-08-30 10:58:01,619 DEBUG [ImapConnection-50974]
davmail.exchange.ExchangeSession - Test configuration status: 301
2016-08-30 10:58:01,619 DEBUG [ImapConnection-50974] davmail - > * OK
[CAPABILITY IMAP4REV1 AUTH=LOGIN MOVE] IMAP4rev1 DavMail 4.7.2-2427
server ready
2016-08-30 10:58:01,620 DEBUG [ImapConnection-50974] davmail - < 1
authenticate login
2016-08-30 10:58:01,621 DEBUG [ImapConnection-50974] davmail - > +
VXNlcm5hbWU6
2016-08-30 10:58:01,621 DEBUG [ImapConnection-50974] davmail - <
Y25wNjM3QHplYnJhLmNvbQ==
2016-08-30 10:58:01,621 DEBUG [ImapConnection-50974] davmail - > +
UGFzc3dvcmQ6
2016-08-30 10:58:01,622 DEBUG [ImapConnection-50974] davmail - < ********
2016-08-30 10:58:02,741 WARN [ImapConnection-50974]
davmail.exchange.ExchangeSession - All network interfaces down or host
unreachable !
2016-08-30 10:58:02,741 DEBUG [ImapConnection-50974]
davmail.exchange.ExchangeSession -
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at davmail.http.DavMailCookieSpec.validate(DavMailCookieSpec.java:46)
at
org.apache.commons.httpclient.HttpMethodBase.processCookieHeaders(HttpMethodBase.java:1643)
at
org.apache.commons.httpclient.HttpMethodBase.processResponseHeaders(HttpMethodBase.java:1586)
at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1738)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at
davmail.http.DavGatewayHttpClientFacade.getHttpStatus(DavGatewayHttpClientFacade.java:296)
at
davmail.exchange.ExchangeSession.isBasicAuthentication(ExchangeSession.java:358)
at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:197)
at
davmail.exchange.dav.DavExchangeSession.<init>(DavExchangeSession.java:500)
at
davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:147)
at
davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:94)
at davmail.imap.ImapConnection.run(ImapConnection.java:137)
2016-08-30 10:58:02,741 ERROR [ImapConnection-50974] davmail - All
network interfaces down or host unreachable !
2016-08-30 10:58:02,742 DEBUG [ImapConnection-50974] davmail - > 1 NO
LOGIN failed
2016-08-30 10:58:02,743 DEBUG [ImapConnection-50974] davmail - < LOGIN
********
2016-08-30 10:58:03,557 WARN [ImapConnection-50974]
davmail.exchange.ExchangeSession - All network interfaces down or host
unreachable !
2016-08-30 10:58:03,557 DEBUG [ImapConnection-50974]
davmail.exchange.ExchangeSession -
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at davmail.http.DavMailCookieSpec.validate(DavMailCookieSpec.java:46)
at
org.apache.commons.httpclient.HttpMethodBase.processCookieHeaders(HttpMethodBase.java:1643)
at
org.apache.commons.httpclient.HttpMethodBase.processResponseHeaders(HttpMethodBase.java:1586)
at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1738)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at
davmail.http.DavGatewayHttpClientFacade.getHttpStatus(DavGatewayHttpClientFacade.java:296)
at
davmail.exchange.ExchangeSession.isBasicAuthentication(ExchangeSession.java:358)
at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:197)
at
davmail.exchange.dav.DavExchangeSession.<init>(DavExchangeSession.java:500)
at
davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:147)
at
davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:94)
at davmail.imap.ImapConnection.run(ImapConnection.java:112)
2016-08-30 10:58:03,557 ERROR [ImapConnection-50974] davmail - All
network interfaces down or host unreachable !
2016-08-30 10:58:03,557 DEBUG [ImapConnection-50974] davmail - > 3 NO
LOGIN failed



________________________________
- CONFIDENTIAL-

This email and any files transmitted with it are confidential, and may also be legally privileged. If you are not the intended recipient, you may not review, use, copy, or distribute this message. If you receive this email in error, please notify the sender immediately by reply email and then delete this email.

------------------------------------------------------------------------------
Mickaël Guessant
2016-09-04 21:30:17 UTC
Permalink
Post by K Richard Pixley
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at davmail.http.DavMailCookieSpec.validate(DavMailCookieSpec.java:46)
=> Looks like a protocol issue or a broken cookie, this happened before
with some broken load balancers / reverse proxies

You will have to enable WIRE DEBUG logs to get more details.
--
Mickael Guessant
mailto:***@free.fr


------------------------------------------------------------------------------
Loading...