flapdoodle-oss / de.flapdoodle.embed.mongo

...will provide a platform neutral way for running mongodb in unittests.
Apache License 2.0
907 stars 161 forks source link

Download version 3.6+ is not working #236

Closed sydneyhenrard closed 6 years ago

sydneyhenrard commented 6 years ago

I tried to use version 3.6.1 but the download is not working with a 403 error:

java.io.IOException: Server returned HTTP response code: 403 for URL: https://downloads.mongodb.org/win32/mongodb-win32-x86_64-3.6.1.zip

The pom.xml is configured like:

    <embedded-mongo.version>2.0.3</embedded-mongo.version>

        <dependency>
            <groupId>de.flapdoodle.embed</groupId>
            <artifactId>de.flapdoodle.embed.mongo</artifactId>
            <version>${embedded-mongo.version}</version>
            <scope>test</scope>
        </dependency>

My system info:

λ ver

Microsoft Windows [Version 10.0.16299.248]

λ wmic os get osarchitecture
OSArchitecture
64-bit
Loki-Afro commented 6 years ago

MongoDb 3.6+ with windows is currently not working

Wait for https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/232 ;)

ryabko commented 6 years ago

But in #232 that issue with "403 error" isn't mentioned and I think you'll be getting this "403 error" even after #232 is fixed. The issue described in current ticket takes place because of bad constructed URL. It wants to download /win32/mongodb-win32-x86_64-3.6.1.zip whereas the only correct path is /win32/mongodb-win32-x86_64-2008plus-ssl-3.6.1.zip. I had the same issue. I run embedded mongo from SpringBoot. I set spring.mongodb.embedded.version: 3.6.2 and got the error you get. Then I found out I need to add some more properties to make it build correct URL, so I added spring.mongodb.embedded.features: features: ONLY_WITH_SSL, ONLY_WINDOWS_2008_SERVER and the "403 error" problem has gone. But I still can't get it running :-) that time probably because of #232

Loki-Afro commented 6 years ago

@ryabko correct but #232 is resolved when its working for windows again ... so such an 403 error would come up anyway - just wanted to be extra brief ;)

ryabko commented 6 years ago

Thanks) By the way, I've just added NO_HTTP_INTERFACE_ARG feature, and it works now for me! Windows 10, mongo 3.6.2.

Loki-Afro commented 6 years ago

@ryabko @sydneyhenrard you could also adapt the solution from #256