embedded mongo is downloading ubuntu binary on amazon linux 2 #469
-
Is there a way to download a particular os version binary, by specifying it in test properties. In my case it seems to be downloading ubuntu on Amazon linux 2(yum based) system and then is running into errors. This is the relevant stack trace.
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
@fnaeem78 hmm.. so amazon-linux2 is not detected.. you can override it this way: https://github.com/flapdoodle-oss/de.flapdoodle.os#run .. but can you provide some more information about this host (hostname, content of /etc/os-release)? |
Beta Was this translation helpful? Give feedback.
-
This is /etc/os-release. The Platform object when printed is showing this : |
Beta Was this translation helpful? Give feedback.
-
@michaelmosmann does this look right. I put this in my test class and it still failed to detect. the last bit I added to force it to detect amazon, based upon one of the regex that I found in the code of the os package. but to no avail, it is still falling back to ubuntu. I saw a comment, (#89 (comment)) by you which suggested putting in a tgz file in the linux directory. under .embedmongo. I did that for my build user mongo 6.08 for amzn2 , also created an archives directory. All of them owned by the build user, it still gave me the same error of falling back to Ubuntu. Tried it both with and without the override, same result. |
Beta Was this translation helpful? Give feedback.
-
@fnaeem78 You should try: de.flapdoodle.os.override=Linux|X86_64|Amazon|AmazonLinux2 .. and this must be a system property. So run your build with that... for instance:
The comment is for a very old version of this software.. and does lead to the wrong direction. The current problem: the os detection does not guess the right os.. so it uses the wrong distribution. The comment is related to the situation where the download failed, so that a manual download could fix that, if you put it to the location where the downloads are cached. |
Beta Was this translation helpful? Give feedback.
-
@fnaeem78 .. i think with your information i can enhance the amazon dist detection... i guess i can make a new release at the weekend. |
Beta Was this translation helpful? Give feedback.
-
thankyou, that worked. please tag me when you merge your PR so I can grab the latest binary. |
Beta Was this translation helpful? Give feedback.
-
@fnaeem78 did a new release of de.flapdoodle.embedded.mongo to 4.7.1.. it should now detect your amazon2 and in any case provide a more detailed error message if something fails.. will be in maven central in 12 to 24 hrs. |
Beta Was this translation helpful? Give feedback.
-
.. i close this, reopen if needed. |
Beta Was this translation helpful? Give feedback.
@fnaeem78 did a new release of de.flapdoodle.embedded.mongo to 4.7.1.. it should now detect your amazon2 and in any case provide a more detailed error message if something fails.. will be in maven central in 12 to 24 hrs.