Secure vs cleartext url leads to: org.ektorp.DocumentNotFoundException #90

Open
pulkitsinghal opened this Issue Oct 4, 2012 · 9 comments

Comments

Projects
None yet
3 participants

If I configure my client using a cleartext (http) url:

            // create the client
            org.ektorp.http.HttpClient httpClient = new StdHttpClient.Builder()
            .url("http://my.couchdb.com:80")
            .username("user")
            .password("pwd")
            .build();

then everything works.

BUT if I try to use a secure (https) URL like so:

            // create the client
            org.ektorp.http.HttpClient httpClient = new StdHttpClient.Builder()
            .url("https://my.couchdb.com:443")
            .username("user")
            .password("pwd")
            .relaxedSSLSettings(true)
            .build();

Then I get an exception stating:
org.ektorp.DocumentNotFoundException: nothing found on db path: ..., Response body: null

I tried 1.2.1, 1.2.2 and 1.3.0 with all of them yielding the same results.

I've attached the snapshot for the dependency hierarchy from my pom.xml file, if that makes any difference.

BTW I also tried this piece of code and it yields the same error:

            // create the client
            org.ektorp.http.HttpClient httpClient = new StdHttpClient.Builder()
            .host("my.couchdb.com")
            .port(443)
            .username("user")
            .password("pwd")
            .relaxedSSLSettings(true)
            .build();
Owner

helun commented Oct 6, 2012

have you verified that you can reach the secure url through other means such as your browser?

Yes copy/pasting the exact same url into my browser and providing the credentials works just fine.

Is anybody else experiencing this bug?

Contributor

dongshengbc commented Jan 9, 2013

Have you tried to add .enableSSL(true)? That works for me. I was using my cloudant.com. What CouchDB service are you using? I want to reproduce the issue.

Btw, I am using <ektorp.version>1.4.0-SNAPSHOT</ektorp.version>, and I did not try other version.

Thanks for responding! I'm working on creating an atomic code sample that you may run to see the bug and help further.

Contributor

dongshengbc commented Jan 9, 2013

Great! Let me know when you have it.

On Wed, Jan 9, 2013 at 10:07 AM, pulkitsinghal notifications@github.comwrote:

Thanks for responding! I'm working on creating an atomic code sample that
you may run to see the bug and help further.


Reply to this email directly or view it on GitHubhttps://github.com/helun/Ektorp/issues/90#issuecomment-12048004.

Contributor

dongshengbc commented Jan 9, 2013

Added, but I am not sure if I added the right one. My skype id is
dongshengcn.

ds

On Wed, Jan 9, 2013 at 10:51 AM, pulkitsinghal notifications@github.comwrote:

I have it ready, but its taking way too long to sanitize the passwords
etc. would you mind using something like webex screen sharing to work with
me instead? My skype handle is pulkitsinghal if you want to ping me for the
webex link.


Reply to this email directly or view it on GitHubhttps://github.com/helun/Ektorp/issues/90#issuecomment-12050238.

Ok this is super strange:

The following works with Cloudant hosted CouchDB:

        org.ektorp.http.HttpClient httpClient =
                new StdHttpClient.Builder()
                .host("mydbs.cloudant.com")
                .port(443)
                .enableSSL(true)
                .relaxedSSLSettings(true)
                .username("user")
                .password("pwd")
                .build();

But fails with IrisCouch hosted CouchDB as I stated in the bug earlier:

        org.ektorp.http.HttpClient httpClient =
                .host("mydbs.iriscouch.com")
                .port(443)
                .enableSSL(true)
                .relaxedSSLSettings(true)
                .username("user")
                .password("pwd")
                .build();

Does this have something do to with Ektorp's support for different version of CouchDB?
a) CouchDB v1.0.2 (used by Cloudant) https works
b) CouchDB v1.2.0 (used by IrisCouch) https doesn't work but http still works ... strange

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment