de.flapdoodle.embed.mongo: Wrong URL for MacOS/OSX download
Currently, i have issue with running Spring Boot application with embedded database. Version: de.flapdoodle.embed:de.flapdoodle.embed.mongo -> 3.0.0
active
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-5.0.5.tgz
expected
https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-5.0.5.tgz
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 40 (16 by maintainers)
I can confirm that using
3.5.5
solves the problem for me.I was getting the same errors about the wrong link format (on x86-64). I retried today with version
3.4.5
and embedded mongo version set to5.0.6
and everything worked fine 😃P.S.: May I suggest to include possible valid versions when setting a non-supported version? (e.g. 5.0.8) I had to check as in https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/359#issuecomment-1012832865 to get a valid version number 😃
I can confirm that flapdoodle:3.2.7 and mongodb:4.4.9 works together.
From looking at some of the links generated by https://www.mongodb.com/try/download/community, I believe this affects all versions of MongoDB >= 4.2.x.
Here are some of the URLs:
@michaelmosmann what is the first version of embedded-mongo which will handle this? I ask, because then we could raise a ticket against Spring-Boot, which currently (as of Spring-Boot 2.6.2, the latest at time of writing) manages the version of embedded-mongo to 3.0.0.
@toolforger thanks for your input… i was busy just to put everything together but your suggestion are a big improvment:)
@toolforger ah…yes… you are right:) i will add some hints about that
@toolforger ok… so i try to fix it for 2.6 and 2.7 … about the two versions:
… if i have finished it, i will write an comment in this ticket:)
@giovanniberti … there is an issue how spring tried to integrate this project … which already led to some confusion… i will have a look into this … maybe i can give some hints (log message, exception) for this kind of situation
I’ve found it on the source code @miroslavvojtus on Version class (enum).
@jgriff M1: this will be fun … no… i think this will be some kind of new pain …maybe… until there is a way to detect M1 somehow and mongodb will provide some special download for that it should work somehow…
I can also confirm latest spring boot
2.6.2
with--spring.mongodb.embedded.version=3.4.23
renders the correct dl url.Another coming complication will be multi-arch for apple M1, which will require Mongo (as well as the rest of the internet) to start shipping
linux/arm64/v8
variants. And then downstream support here to recognize it and adjust the dl url accordingly. However, Rosetta 2 seems to be doing an ok job with thex86_64
so far for me. YMMVI suppose that issue is here: https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/blob/4e9ffbe26f02d0560d8d9e4ab73f3aca0f399681/src/main/java/de/flapdoodle/embed/mongo/Paths.java#L105 Path was probably changed by remote server and thats why it does not work anymore
For windows it’s the same. It’s impossible to select MongoDB 4+ which will work on linux and windows at the same time.
With spring boot 2.6+ “spring.mongodb.embedded.version” property is required - version 3.5.5 is working.